[FFmpeg-user] Webcam capture quality problem

Thilo Borgmann thilo.borgmann at mail.de
Sun Jun 4 11:04:09 EEST 2023


Am 03.06.23 um 23:26 schrieb Jens Haulund via ffmpeg-user:
> Hi All,
> I'm on a Mac - I use ffmpeg to stream recorded videos to YouTube and other RTMP servers. The quality is good and I have no issues. Se example below (and feel free to recommend other/better settings. I'm new to this)
> ffmpeg -i file.mp4 -c:v libx264 -preset veryfast -b:v 3000k -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 60 -c:a aac -b:a 128k -ac 2 -f flv rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx-wa8f-ufzs-32wj
> 
> ^^ works great.
> My problem starts when I replace the mp4 file input with a webcam: I cannot get any of my webcams to output more than 10-15fps, and the quality is horrendous.
> This is the very basic command I run to get my Logitech C920 webcam to dump to a file, not even streaming. I know this command is not fully developed, but it should be able to dump to a file in 30fps:
> ffmpeg -f avfoundation -video_size 1920x1080 -r 30 -i "Logi" ./test.mpg -y
> Any help will be most appreciated.
> Thanks!Jens

Look at the output of "-f avfoundation -list_devices 1", it will tell you which framerates are supported by your cam(s).

If you're having problems afterwards, post both here, list_devices 1 and the output of your recording command.

-Thilo



More information about the ffmpeg-user mailing list