[FFmpeg-user] How to set V4L2 M2M codec options like bitrate
Adam Nielsen
a.nielsen at shikadi.net
Sun Aug 15 17:15:21 EEST 2021
> > I'm using the h264_v4l2m2m codec to do hardware accelerated encoding on
> > a Raspberry Pi. This is working well, except I am unable to set any
> > encoder options such as bitrate, as I cannot find how to tell ffmpeg to
> > set V4L2 control options.
>
> You can use -b:v option to set the bitrate, i.e.
> ./ffmpeg -i input -codec:v h264_v4l2m2m -b:v 2M out.mp4
>
> There is a patch for documentation that I need to update. It may be useful
> to you:
> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200117034211.12142-1-andriy.gelman@gmail.com/
Ah excellent, many thanks for that, that does work for setting the
bitrate.
Unfortunately the most important option I need to change is the
"repeat_sequence_header" control, which I need to set to 1 as the
default of 0 means if you miss the initial frame of the video, you can
never join the stream mid-way through, as ffplay just produces heaps of
"non-existing PPS 0 referenced" messages and never opens the video
window.
Does this option have an equivalent to set on the ffmpeg command line,
now v4l2-ctl will no longer work?
Thanks again,
Adam.
More information about the ffmpeg-user
mailing list