Using a webcam on linux and pushing to Wowza

Note: This is still a work in progress


  1. Standard USB webcam connected to Ubuntu 12
  2. Latest build of ffmpeg from the repo with libx264
  3. Wowza media server 3.6 hosted on Amazon EC2 (with Cloudfront CDN)

Check available devices with v42l

Get the current video format: v4l2-ctl -V

Format Video Capture:
Width/Height : 640/480
Pixel Format : ‘YUYV’
Field : None
Bytes per Line: 1280
Size Image : 614400
Colorspace : SRGB

v4l2-ctl –list-formats-ext


Start encoding

ffmpeg -re -f v4l2 -r 25 -s 640×480 -i /dev/video0 -b:v 300k -c:v libx264 -g 15 -pix_fmt yuv420p -an -f flv rtmp://wowzaserver/live/myStream

Bookmark the permalink.

Comments are closed.