Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5951

Graphics, sound and multimedia • Re: h264_v4l2m2m Encoder Video Quality Parameters

$
0
0
Hi ccwyatt,
I also experienced issues in configuring the HW H264 encoder using its kernel device and v4l2-ctl, my attempts also failed as changes to the h264_minimum_qp_value and h264_minimum_qp_value seems not to be persistent or simply effective.
Does anyone know why? it would be good to use this interface to control the encoder.

Code:

raspberrypi2w:~ $ v4l2-ctl -d /dev/video11 --set-ctrl h264_minimum_qp_value=1raspberrypi2w:~ $ v4l2-ctl -d /dev/video11 --all..Codec Controls                 video_b_frames 0x009909ca (int)    : min=0 max=0 step=1 default=0 value=0 flags=update                 video_gop_size 0x009909cb (int)    : min=0 max=2147483647 step=1 default=60 value=60             video_bitrate_mode 0x009909ce (menu)   : min=0 max=1 default=0 value=0 flags=update                                0: Variable Bitrate                                1: Constant Bitrate                  video_bitrate 0x009909cf (int)    : min=25000 max=25000000 step=25000 default=10000000 value=10000000           sequence_header_mode 0x009909d8 (menu)   : min=0 max=1 default=1 value=1                                0: Separate Buffer                                1: Joined With 1st Frame         repeat_sequence_header 0x009909e2 (bool)   : default=0 value=0                force_key_frame 0x009909e5 (button) : flags=write-only, execute-on-write          h264_minimum_qp_value 0x00990a61 (int)    : min=0 max=51 step=1 default=20 value=20          h264_maximum_qp_value 0x00990a62 (int)    : min=0 max=51 step=1 default=51 value=51            h264_i_frame_period 0x00990a66 (int)    : min=0 max=2147483647 step=1 default=60 value=60                     h264_level 0x00990a67 (menu)   : min=0 max=15 default=11 value=11..                     
However I can suggest you using -qmin and -qmax with ffmpeg which are indeed effective. best combination is 1-1 or 1-2. avoid using 0 as in my case produced a low bitrate video

Code:

ffmpeg -f v4l2 -i /dev/video0 -c:v h264_v4l2m2m -qmin 1 -qmax 1 -b:v 100M  test.mkv

Statistics: Posted by platux — Sat Oct 12, 2024 9:15 pm



Viewing all articles
Browse latest Browse all 5951

Trending Articles