This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TDA4VE-Q1:J721S2 编码器比特率设置

Guru**** 2454880 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1514928/tda4ve-q1-j721s2-encoder-bitrate-setting

器件型号:TDA4VE-Q1
主题中讨论的其他器件:test2.

工具/软件:

根据这个  

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1282498/tda4ve-q1-how-to-set-encoder-bitrate

我们使用 J721S2 和 SDK8.4

我们再次使用补丁和测试编码器比特率设置。

https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/?h=ti-linux-6.1.y-cicd&id=12598d7a3ca52f5166b67cc714329029b4502543

但结果仍然失败、所有测试输出大小都相同。

我们如何才能更改编码器 Birate?

这是我们的测试日志:

************************************************************************

测试 1:
2025年05月16日 11:04:51.261] gst-launch-1.0 videotestsrc pattern=ball num-buffers=5000 ! video/x-raw、格式=NV12、wiidth=852、高度=480、帧速率=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]将管道设置为已暂停...
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)
[Pipeline 11:05:19.523] 2025年05月16日 是一个很好的管道...
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]重新分配延迟...
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]管道是 PREROLLED ...
[ 2025年05月16日 11:05:19.570]设置管道玩...
[GstSystemClock:2025年05月16日 11:05:19.570]新时钟:GstSystemClock
2025年05月16日 11:05:50.053]获得了元素“pipine0"的“的 EOS。
2025年05月16日 11:05:50.069]执行在 0:00:30.494698680 之后结束
[NULL 11:05:50.069]将管道设置为 2025年05月16日...
2025年05月16日 11:05:50.069]释放管道...
[EVM 2025年05月16日 11:05:50.084] root@j721s2-EVM:/opt/vision_apps

测试 2:
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、格式=NV12、wiidth=852、高度=480、帧速率=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]将管道设置为已暂停...
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]管道是前排...
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]重新分配延迟...[510.346103] pix_mp->plane_fmt[0].sizeimage 2097152、widthxheight=(852x480)
2025年05月16日 11:06:12.071]
[LED 2025年05月16日 11:06:12.102]流水线是 PREROLLED ...
[ 2025年05月16日 11:06:12.102]设置管道玩...
[GstSystemClock:2025年05月16日 11:06:12.102]新时钟:GstSystemClock
2025年05月16日 11:06:43.250]获得了元素“pipine0"的“的 EOS。
2025年05月16日 11:06:43.250]执行在 0:00:31.143707420 之后结束
[NULL 11:06:43.250]将管道设置为 2025年05月16日...
2025年05月16日 11:06:43.250]释放管道...

测试 3:
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、格式=NV12、wiidth=852、高度=480、帧速率=30/1! v4l2h264enc extra-controls=“enc、frame_level_rate_control_enable=1、video_bitrate_mo de=1、video_bitrate=1000000“! 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]将管道设置为暂停...
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]管道是前排...
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]重新分配延迟...
2025年05月16日 11:06:52.657][550.931860] pix_MP->plane_fmt[0].sizeimage 2097152、widthxheight=(852x480)
[LED 2025年05月16日 11:06:52.688]流水线是 PREROLLED ...
[ 2025年05月16日 11:06:52.688]设置管道玩...
[GstSystemClock:2025年05月16日 11:06:52.703]新时钟:GstSystemClock
[ 2025年05月16日 11:07:23.213]获得了元素“pipine0"的“的 EOS。
2025年05月16日 11:07:23.213]执行在 0:00:30.521193976 之后结束
[NULL 11:07:23.229]将管道设置为 2025年05月16日...
[ 2025年05月16日 11:07:23.229]释放管道...

结果:
[CCS 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 根根 2624313 Aug 30 11:53 demo100mbps.264
[ 2025年05月16日 11:08:28.151]-RW-r--r-1 根根 2624313 Aug 30 11:52 demo20mbps.264
[ 2025年05月16日 11:08:28.151]-RW-r--r-1 根根 2624313 Aug 30 11:51 demo5mbps.264

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:  

    您是否能够迁移到更新的 SDK? 这个 SDK 很旧、有很多错误。

    谢谢、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sarabesh:
    由于我们的工程已经进展到后期阶段、因此不太可能、我们没有时间更新到新 SDK。 您能为 sdk8.4 提供帮助吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、John:  

    很抱歉耽误你的时间。 让我在内部与我们的开发团队讨论。  

    谢谢、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sarabesh:
    这个问题怎么样? 有任何更新?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    John、您是否只在 vision-apps (Linux+RTOS) 中试用过这款产品? 如果是、您是否能够在仅 Linux 的 SDK 上试用此版本?

    谢谢您、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、 Sarabesh

    我们使用 Linux 控制台命令进行测试:

    gst-launch-1.0 videotestsrc pattern=ball num-buffers=5000! video/x-raw、格式=NV12、wiidth=852、高度=480、帧速率=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

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您看到了什么日志? 您 是否可以在 GST_DEBUG=2 下运行?

    谢谢您、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这是测试日志。

    >>>>>>>>>>>>>>>>>>>> 第二百六十四章

    root@j721s2-evm:~# gst_debug=2 gst-launch-1.0 videotestsrc pattern=ball num-buffers=5000! video/x-raw、格式=NV12、宽度=852、高度=480、帧速率=30/1! v4l2h264enc extra-controls=“enc、frame_level_rate_control_enable=1、video_bitrate_mode=1、video_bitrate=5000000“! h264parse! filesink location=/tmp/demo5mbps.264

    正在将管道设置为已暂停...

    0:00:00.069428060 1191    0x23099870 WARN                   v4l2 gstv4l2object.c:4292:gst_v4l2_object_probe_cap: 无法使用 VIDIOC_CROPCAP 探测像素宽高比:参数无效

    流水线是 PREROLLING ...

    重新分配延迟...

    0:00:00.187730045 1191    0x23094800 WARN         v4l2bufferpool gstv4l2bufferpool.c:820:gst_v4l2_buffer_pool_start: 缓冲区不确定或不足、启用复制阈值

    0:00:00.201729405 1191    0x23094800 WARN         v4l2bufferpool gstv4l2bufferpool.c:820:gst_v4l2_buffer_pool_start: 缓冲区不确定或不足、启用复制阈值

    流水线是 PREROLLED。

    正在设置播放管道...

    新时钟:GstSystemClock

    0:00:38.229658210 1191 0xff9801a9e0 WARN          v4l2allocator gstv4l2allocator.c:1370:gst_v4l2_allocator_dqbuf: V4L2 提供的缓冲器具有字节 0、该字节太小而无法包含 DATA_OFFSET 0

    从元素“pipine0"获取“获取 EOS。

    执行在 0:00:38.024893670 之后结束

    正在将管道设置为空...

    0:00:38.231722740 1191    0x23099870 警告             缓冲池 gstbufferpool.c:1408:gst_buffer_pool_set_flushing: 无法更改非活动池的刷新状态

    0:00:38.231887000 1191    0x23099870 警告             缓冲池 gstbufferpool.c:1408:gst_buffer_pool_set_flushing: 无法更改非活动池的刷新状态

    正在释放管道...

     

    >>>>>>>>>>>>> 第二百六十四章

    root@j721s2-evm:~# gst_debug=2 gst-launch-1.0 videotestsrc pattern=ball num-buffers=5000! video/x-raw、格式=NV12、宽度=852、高度=480、帧速率=30/1! v4l2h264enc extra-controls=“enc、frame_level_rate_control_enable=1、video_bitrate_mode=1、video_bitrate=20000000“! h264parse! filesink location=/tmp/demo20mbps.264

    正在将管道设置为已暂停...

    0:00:00.068492765 1439    0x1fb09870 WARN                   v4l2 gstv4l2object.c:4292:gst_v4l2_object_probe_cap: 无法使用 VIDIOC_CROPCAP 探测像素宽高比:参数无效

    流水线是 PREROLLING ...

    重新分配延迟...

    0:00:00.186648075 1439    0x1fb04800 warn         v4l2bufferpool gstv4l2bufferpool.c:820:gst_v4l2_buffer_pool_start: 缓冲区不确定或不足、启用复制阈值

    0:00:00.200201555 1439    0x1fb04800 警告         v4l2bufferpool gstv4l2bufferpool.c:820:gst_v4l2_buffer_pool_start: 缓冲区不确定或不足、启用复制阈值

    流水线是 PREROLLED。

    正在设置播放管道...

    新时钟:GstSystemClock

    0:00:38.352780645 1439 0xffb401a9e0 warn          v4l2allocator gstv4l2allocator.c:1370:gst_v4l2_allocator_dqbuf: V4L2 提供的缓冲器具有字节 0、该字节太小而无法包含 DATA_OFFSET 0

    从元素“pipine0"获取“获取 EOS。

    执行在 0:00:38.149629345 之后结束

    正在将管道设置为空...

    0:00:38.355049010 1439    0x1fb09870 警告             bufferpool gstbufferpool.c:1408:gst_buffer_pool_set_flushing: 无法更改非活动池的刷新状态

    0:00:38.355205415 1439    0x1fb09870 警告             bufferpool gstbufferpool.c:1408:gst_buffer_pool_set_flushing: 无法更改非活动池的刷新状态

    正在释放管道...

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sarabesh:
    如何解决此问题、请更新状态。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、John:  

    我很抱歉,我 6 月的大部分时间都不在办公室。 据我所知、如果该功能尚不存在、我们在此 SDK 上没有可以提供的比特率补丁。 我会重新检视代码库并回复您。

    谢谢、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sarabesh:
    该项目已准备好投入大规模生产。 这个问题变得非常重要。 请对其给予高优先级。 谢谢你。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、John:  

    在搜索代码时、您是否在 Linux 驱动程序中看到 V4L2 比特率控制?

    此外、您还能分享您正在使用的输入流吗? 流媒体有多长时间?

    谢谢、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sarabesh:

    在搜索代码时、您是否在 Linux 驱动程序中看到 V4L2 比特率控制?
    [otobrite]:您能指出您正在谈论的 Linux 驱动程序中的源代码是什么吗?

    此外、您还能分享您正在使用的输入流吗? 流媒体有多长时间?
    [otobrite]:流式传输示例 (cmd) 是由您提供的,请查看上面的消息。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、John:  

    是的、源代码位于 Linux 内核的 drivers/media/platform/chipsnmedia/wave5 中。

    此致、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sarabesh:
    在 Linux 内核上找不到 chipsnmedia 文件夹、  
    我们只需在 PSDK_Linux/board-support/linux-5.10.120/drivers/staging/media/wave5 上找到 wave5 文件夹。
    请提供帮助。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    让我确认旧内核上的路径并返回给您。

    谢谢、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sarabesh:

    这个问题是紧急的,状态如何?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、John、抱歉带宽有限。 是、我可以确认驱动程序使用的路径。 我仍在调查此版本的驱动程序中是否启用了比特率控制(以及在多大程度上)。 它看起来好像正在写入正确的寄存器、但缺少一些控件。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、John:  

    请 查看 SDK 8.6、并选择启用 V4l2 比特率控制所需的补丁。

    在从 8.4 到 8.6 SDK 的更新中、似乎对 wave5 代码库进行了重大恢复。 下面列出了用于恢复和添加新 v4l2 层的提交。

    该驱动程序在这些 SDK 之间进行了大量的返工、但它确实发生在同一个内核版本上。 我们无法提供任何支持支持,因此请继续使用 git 树中的资源。

    谢谢您、
    Sarabesh S.