Other Parts Discussed in Thread: TEST2
Tool/software:
According this
We use J721S2 and SDK8.4
We use the patch and test encoder bitrate setting again.
But result still fail, all test output size are the same.
How can we do to change encoder birate?
This is our test log:
******************************************************************
Test1:
[2025-05-16 11:04:51.261] gst-launch-1.0 videotestsrc pattern=ball num-buffers=5000 ! video/x-raw, format=NV12, wiidth=852, height=480, framerate=30/1 ! v4l2h264enc extra-controls="enc,frame_level_rate_control_enable=1,video_bitrate_mo de=1,video_bitrate=5000000" ! h264parse ! filesink location=/test_streams/demo5mbps.264 t m p/demo5mbps
[2025-05-16 11:05:19.414] [ 457.696474] pix_mp->plane_fmt[0].sizeimage 37440, widthxheight=(416x240)
[2025-05-16 11:05:19.430] Setting pipeline to PAUSED ...
[2025-05-16 11:05:19.430] [ 457.708560] pix_mp->plane_fmt[0].sizeimage 37440, widthxheight=(416x240)
[2025-05-16 11:05:19.445] [ 457.718738] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.445] [ 457.725451] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.461] [ 457.732287] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.461] [ 457.739037] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.461] [ 457.745843] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.476] [ 457.752608] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.476] [ 457.759357] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.492] [ 457.766095] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.492] [ 457.772841] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.508] [ 457.779584] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.508] [ 457.786335] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:05:19.523] Pipeline is PREROLLING ...
[2025-05-16 11:05:19.523] [ 457.795719] pix_mp->plane_fmt[0].sizeimage 2097152, widthxheight=(852x480)
[2025-05-16 11:05:19.523] Redistribute latency...
[2025-05-16 11:05:19.523] [ 457.804045] pix_mp->plane_fmt[0].sizeimage 2097152, widthxheight=(852x480)
[2025-05-16 11:05:19.570] Pipeline is PREROLLED ...
[2025-05-16 11:05:19.570] Setting pipeline to PLAYING ...
[2025-05-16 11:05:19.570] New clock: GstSystemClock
[2025-05-16 11:05:50.053] Got EOS from element "pipeline0".
[2025-05-16 11:05:50.069] Execution ended after 0:00:30.494698680
[2025-05-16 11:05:50.069] Setting pipeline to NULL ...
[2025-05-16 11:05:50.069] Freeing pipeline ...
[2025-05-16 11:05:50.084] root@j721s2-evm:/opt/vision_apps#
Test2:
[2025-05-16 11:06:01.241] root@j721s2-evm:/opt/vision_apps# gst-launch-1.0 videotestsrc pattern=ball num-buffers=5000 ! video/x-raw, format=NV12, wiidth=852, height=480, framerate=30/1 ! v4l2h264enc extra-controls="enc,frame_level_rate_control_enable=1,video_bitrate_mo de=1,video_bitrate=20000000" ! h264parse ! filesink location=/test_streams/demo20mbps.264 t m p
[2025-05-16 11:06:11.961] [ 510.238283] pix_mp->plane_fmt[0].sizeimage 37440, widthxheight=(416x240)
[2025-05-16 11:06:11.976] Setting pipeline to PAUSED ...
[2025-05-16 11:06:11.976] [ 510.250577] pix_mp->plane_fmt[0].sizeimage 37440, widthxheight=(416x240)
[2025-05-16 11:06:11.976] [ 510.260362] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:11.992] [ 510.267414] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:11.992] [ 510.274212] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:12.008] [ 510.280962] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:12.008] [ 510.287723] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:12.023] [ 510.294512] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:12.023] [ 510.301291] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:12.023] [ 510.308056] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:12.039] [ 510.314812] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:12.039] [ 510.321548] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:12.054] [ 510.328323] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:12.054] Pipeline is PREROLLING ...
[2025-05-16 11:06:12.054] [ 510.336965] pix_mp->plane_fmt[0].sizeimage 2097152, widthxheight=(852x480)
[2025-05-16 11:06:12.071] Redistribute latency...[ 510.346103] pix_mp->plane_fmt[0].sizeimage 2097152, widthxheight=(852x480)
[2025-05-16 11:06:12.071]
[2025-05-16 11:06:12.102] Pipeline is PREROLLED ...
[2025-05-16 11:06:12.102] Setting pipeline to PLAYING ...
[2025-05-16 11:06:12.102] New clock: GstSystemClock
[2025-05-16 11:06:43.250] Got EOS from element "pipeline0".
[2025-05-16 11:06:43.250] Execution ended after 0:00:31.143707420
[2025-05-16 11:06:43.250] Setting pipeline to NULL ...
[2025-05-16 11:06:43.250] Freeing pipeline ...
Test3:
[2025-05-16 11:06:43.265] root@j721s2-evm:/opt/vision_apps# gst-launch-1.0 videotestsrc pattern=ball num-buffers=5000 ! video/x-raw, format=NV12, wiidth=852, height=480, framerate=30/1 ! v4l2h264enc extra-controls="enc,frame_level_rate_control_enable=1,video_bitrate_mo de=1,video_bitrate=100000000" ! h264parse ! filesink location=/test_streams/demo100mbps.264 m p
[2025-05-16 11:06:52.547] [ 550.824212] pix_mp->plane_fmt[0].sizeimage 37440, widthxheight=(416x240)
[2025-05-16 11:06:52.547] Setting pipeline to PAUSED ...
[2025-05-16 11:06:52.563] [ 550.836249] pix_mp->plane_fmt[0].sizeimage 37440, widthxheight=(416x240)
[2025-05-16 11:06:52.563] [ 550.846171] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.579] [ 550.853129] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.579] [ 550.859954] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.594] [ 550.866723] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.594] [ 550.873484] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.594] [ 550.880360] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.610] [ 550.887138] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.610] [ 550.893879] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.625] [ 550.900625] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.625] [ 550.907388] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.641] [ 550.914137] pix_mp->plane_fmt[0].sizeimage 12288, widthxheight=(256x128)
[2025-05-16 11:06:52.641] Pipeline is PREROLLING ...
[2025-05-16 11:06:52.641] [ 550.923525] pix_mp->plane_fmt[0].sizeimage 2097152, widthxheight=(852x480)
[2025-05-16 11:06:52.657] Redistribute latency...
[2025-05-16 11:06:52.657] [ 550.931860] pix_mp->plane_fmt[0].sizeimage 2097152, widthxheight=(852x480)
[2025-05-16 11:06:52.688] Pipeline is PREROLLED ...
[2025-05-16 11:06:52.688] Setting pipeline to PLAYING ...
[2025-05-16 11:06:52.703] New clock: GstSystemClock
[2025-05-16 11:07:23.213] Got EOS from element "pipeline0".
[2025-05-16 11:07:23.213] Execution ended after 0:00:30.521193976
[2025-05-16 11:07:23.229] Setting pipeline to NULL ...
[2025-05-16 11:07:23.229] Freeing pipeline ...
Result:
[2025-05-16 11:07:23.229] root@j721s2-evm:/opt/vision_apps# ls -l tmp /tmp/
[2025-05-16 11:08:28.151] -rw-r--r-- 1 root root 2624313 Aug 30 11:53 demo100mbps.264
[2025-05-16 11:08:28.151] -rw-r--r-- 1 root root 2624313 Aug 30 11:52 demo20mbps.264
[2025-05-16 11:08:28.151] -rw-r--r-- 1 root root 2624313 Aug 30 11:51 demo5mbps.264

