[FFmpeg-user] Webcam capture quality problem

brucedickinson at wp.pl brucedickinson at wp.pl
Wed Jun 7 01:01:18 EEST 2023


Hi,

I don't have Mac so can't test this but I think first you should take a look
at avfoundation doc:

https://ffmpeg.org/ffmpeg-devices.html#avfoundation

to specify input framerate (from camera) you should use "-framerate"
assuming that your camera supports it. "-r 30" is used for output framerate
and should come after you specify codec to encode your stream. So your
command could look like this:

ffmpeg -f avfoundation -video_size 1920x1080 -framerate 30 -i "Logi" -c:v
libx264 -preset veryfast -b:v 3000k -maxrate 3000k -bufsize 6000k output.mp4

Cheers.

-----Original Message-----
From: ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> On Behalf Of Jens Haulund
via ffmpeg-user
Sent: Saturday, June 3, 2023 11:26 PM
To: ffmpeg-user at ffmpeg.org
Cc: Jens Haulund <jenshaulund at yahoo.com>
Subject: [FFmpeg-user] Webcam capture quality problem

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


_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org
with subject "unsubscribe".



More information about the ffmpeg-user mailing list