[FFmpeg-user] Low FPS with H.264 Encoding When Using -pix_fmt yuv420p

Lisa lisas965624 at gmail.com
Wed May 22 17:36:14 EEST 2024


Hello,
when I use the following command in Raspberry Pi 4 model B, I am getting
only 8 fps for 1080p resolution.

*ffmpeg -use_wallclock_as_timestamps 1 -t 60 -i /dev/video0 -c:v
h264_v4l2m2m -b:v 8M -maxrate 2M -vsync 2 -bufsize 4M -r 30 -s hd1080
-pix_fmt yuv420p -g 30 -qmin 20 -qmax 50 output_1080p.mp4*

And when I use the same command, but remove -pix_fmt yuv420p, the output
video is 27 fps.


*ffmpeg -use_wallclock_as_timestamps 1 -t 60 -i /dev/video0 -c:v
h264_v4l2m2m -b:v 8M -maxrate 2M -vsync 2 -bufsize 4M -r 30 -s hd1080  -g
30 -qmin 20 -qmax 50 output1_1080p.mp4*
Why does the fps reduce when -pix_fmt yuv420p is used in the ffmpeg command?
Both the output videos have pixel format of YUV420, but when I use
'-pix_fmt yuv420p' in command, why does it reduce the fps ?
What are the default settings to tune the Encoding ?


More information about the ffmpeg-user mailing list