[FFmpeg-user] Error when using v4l2 to encode H264

Carl Eugen Hoyos cehoyos at ag.or.at
Mon May 16 16:38:21 CEST 2016

Bogdan Mariesan <bogdan.mariesan <at> buddyguard.io> writes:

>  ./ffmpeg -f v4l2 -video_size 640x360 -rtbufsize 702000k 
> -framerate 30 -i /dev/video0 -r 30 -threads 4 -vcodec libx264 
> -pix_fmt yuv420p -tune zerolatency -preset ultrafast test.avi

Your exact command line works fine here, please test the following:
$ ffmpeg -i /dev/video0 -pix_fmt yuv420p out.mov

Note that "-r 30" in your command line looks like a bad idea, 
you should probably remove it and h264 in avi can lead to 
unexpected issues.

Carl Eugen

More information about the ffmpeg-user mailing list