[FFmpeg-user] fps output stuck at 5fps with flv / rtmp outpu

Andrew Peng pengc99 at gmail.com
Wed May 26 06:45:21 EEST 2021


I have a problem with ffmpeg 4.1.6 (raspbian release) that is really
strange. I'm trying to stream a webcam to an rtmp endpoint and the
framerate is stuck at 5fps.

Things i've checked:
 - camera can do 25fps at 800x600 with mjpeg or raw output, verified with
v4l2-ctl and ffmpeg
 - camera works to stream 25fps output on a windows computer using obs
 - camera is able to generate a test mp4 file saved locally using ffmpeg at
25fps

The problem is that the framerate plummets to 5fps when I add the -f flv
output option, even when saving to a local file. If I change the output
type to mp4, it can output at 25fps.

This happens when using the h264_omx and libx264 encoding engines.

Is there any particular reason why the output is getting nuked to 5fps when
using the flv output?

Here is the command line i'm using:

ffmpeg -video_size 800x600 -input_format yuyv422 -i /dev/video0 -vcodec
h264_omx -b:v 1024k -vf drawtext="fontsize=20: box=1: boxcolor=black at 0.75:
boxborderw=5: fontcolor=white: x=5: y=(h-text_h-5):
text='%{localtime\:%m/%d/%Y - %T}'" -f flv rtmp://rtmp.server.here


More information about the ffmpeg-user mailing list