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.

[参考译文] SK-AM69:Gstreamer RTSP、v4l2h264decc

Guru**** 2551110 points


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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1567094/sk-am69-gstreamer-rtsp-with-v4l2h264dec

器件型号:SK-AM69


工具/软件:

您好、
我使用安装的 ti-processor-sdk-linux-am69-sk-10_01_08_01-Linux-x86-Install.bin 并闪存 tisdk-default-image-AM69-sk.rootfs.wic SD 卡。

控制器类型 GST-launch-1.0 + RTSP + v4l2h264dec 但我遇到了一些问题。 以下是命令和日志:

gst_debug=3 gst-launch-1.0 rtspsrc location=rtsp://192.168.109.242/live_st1 delay=50! rtph264depay! h264parse! v4l2h264dec! 视频转换! waylandsink

Weston@AM69-sk:/tmp$ gst_debug=3 gst-launch-1.0 rtspsrc location=rtsp://192.168.109.242/live_st1 delay=50! rtph264depay! h264parse! v4l2h264dec! 视频转换! 途径
和受电方
正在将管道设置为已暂停...
流水线是实时的,不需要 PREROLL ...
进度:(打开)打开流
流水线是 PREROLLED。
已预装、正在等待进度完成...
进度:(连接)连接到 rtsp://192.168.109.242/LIVE_ST1
进度:(打开)检索服务器选项
进度:(打开)检索介质信息
0:00:00.098474086 1857 0xff90000b70 WARN udpsrc gstudpsrc.c:1638:gst_udpsrc_open: 警告:无法创建请求的 524288 字节的缓冲区
S(不允许操作)。 需要 net.admin 权限?
0:00:00.098565213 1857 0xff90000b70 WARN udpsrc gstudpsrc.c:1648:gst_udpsrc_open: 在请求 524288 时、UDP 缓冲区为 212992 字节
0:00:00.099317033 1857 0xff90000b70 Warn udpsrc gstudpsrc.c:1638:gst_udpsrc_open: 警告:无法创建请求的 524288 字节的缓冲区
S(不允许操作)。 需要 net.admin 权限?
0:00:00.099359189 1857 0xff90000b70 WARN udpsrc gstudpsrc.c:1648:gst_udpsrc_open: 在请求 524288 时、UDP 缓冲区为 212992 字节
进度:(请求)设置流 0
进度:(打开)打开的流
正在设置播放管道...
新时钟:GstSystemClock
进度:(请求)发送播放请求
重新分配延迟...
进度:(请求)发送播放请求
0:00:00.109526662 1857 0xff90000d20 FIXME 默认 gstutils.c:4036:gst_pad_create_stream_id_internal: 创建随机流 ID、请考虑我
改进创建流 ID 的确定性方法
重新分配延迟...
进度:(请求)已发送播放请求
重新分配延迟...
0:00:00.128166954 1857 0xff90001230 WARN v4l2 gstv4l2object.c:3408:gst_v4l2_object_reset_comprest_region: 无法获取默认 co
带有 VIDIOC_G_SELECTION 的转置矩形:参数无效
重新分配延迟...
0:00:00.137190824 1857 0xff90001230 WARN GST_CAPS gstpad.c:5813:pre_eventfunc_check: cap video/x-h264、stream-format=(string) byte-st
REAM、ALIGNED=(string) au、WIDTH=(int) 1920、HEIGHT=(int) 1080、帧速率=(Fraction) 30/1、 coded-Picture-structure=(字符串)帧、chroma-format=(字符串)4:2:0、位深度 LUM
a=(uint) 8、bit-depth-chroma=(uint) 8、比色法=(string) 0:1:0:0、已解析=(布尔值)true、profile=(string) high、 Level=(string)4.2 不被接受
0:00:00.138125618 1857 0xff90001230 WARN GST_CAPS gstpad.c:5813:pre_eventfunc_check: cap video/x-h264、stream-format=(string) byte-st
REAM、ALIGNED=(string) au、WIDTH=(int) 1920、HEIGHT=(int) 1080、帧速率=(Fraction) 30/1、 coded-Picture-structure=(字符串)帧、chroma-format=(字符串)4:2:0、位深度 LUM
a=(uint) 8、bit-depth-chroma=(uint) 8、比色法=(string) 0:1:0:0、已解析=(布尔值)true、profile=(string) high、 Level=(string)4.2 不被接受
0:00:00.138873893 1857 0xff90001230 WARN GST_CAPS gstpad.c:5813:pre_eventfunc_check: cap video/x-h264、stream-format=(string) byte-st
REAM、ALIGNED=(string) au、WIDTH=(int) 1920、HEIGHT=(int) 1080、帧速率=(Fraction) 30/1、 coded-Picture-structure=(字符串)帧、chroma-format=(字符串)4:2:0、位深度 LUM
a=(uint) 8、bit-depth-chroma=(uint) 8、比色法=(string) 0:1:0:0、已解析=(布尔值)true、profile=(string) high、 Level=(string)4.2 不被接受
0:00:00.139521816 1857 0xff90001230 WARN GST_CAPS gstpad.c:5813:pre_eventfunc_check: cap video/x-h264、stream-format=(string) byte-st
REAM、ALIGNED=(string) au、WIDTH=(int) 1920、HEIGHT=(int) 1080、帧速率=(Fraction) 30/1、 coded-Picture-structure=(字符串)帧、chroma-format=(字符串)4:2:0、位深度 LUM
a=(uint) 8、bit-depth-chroma=(uint) 8、比色法=(string) 0:1:0:0、已解析=(布尔值)true、profile=(string) high、 Level=(string)4.2 不被接受
0:00:00.154962384 1857 0xff90000ed0 warm basesrc gstbasesrc.c:3134:gst_base_src_loop: 错误:内部数据流错误。
0:00:00.154997770 1857 0xff90000ed0 warm basesrc gstbasesrc.c:3134:gst_base_src_loop: 错误:流已停止、原因未协商(–4)
错误:来自元素/GstPipeline:pipaine0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1:内部数据流错误。

如何解决此问题?

顺便说一下
gst-launch-1.0 rtspsrc location=rtsp://192.168.109.242/live_st1 delay=50! rtph264depay! h264parse! avdec_h264! 视频转换! waylandsink
工作正常。

谢谢你

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

    尊敬的 Jason:

    您能尝试下面的流水线、看看它是否起作用吗?

    gst_debug=3 gst-launch-1.0 rtspsrc location=rtsp://192.168.109.242/live_st1 delay=50! rtph264depay wait-for-keyframe=1! h264parse! v4l2h264dec! 视频转换! waylandsink

    此致、

    Suren

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

    您好、Suren、

    感谢您的答复。

    我尝试过、但它不起作用、请查看下面的日志。

    此致、

    日志:
    Weston@AM69-sk:~$ gst_debug=3 gst-launch-1.0 rtspsrc location=rtsp://192.168.109.242/live_st1 delay=50! \
    > rtph264depay wait-for-keyframe=1! h264parse! v4l2h264dec! 视频转换! waylandsink
    正在将管道设置为已暂停...
    流水线是实时的,不需要 PREROLL ...
    进度:(打开)打开流
    流水线是 PREROLLED。
    已预装、正在等待进度完成...
    进度:(连接)连接到 rtsp://192.168.109.242/LIVE_ST1
    进度:(打开)检索服务器选项
    进度:(打开)检索介质信息
    0:00:00.078091736 1321 0xffff80000b70 WARN udpsrc gstudpsrc.c:1638:gst_udpsrc_open: 警告:无法创建请求的 524288 b 的缓冲区?
    0:00:00.078179742 1321 0xffff80000b70 WARN udpsrc gstudpsrc.c:1648:gst_udpsrc_open: UDP 缓冲区为 212992 字节、而需要 524288
    进度:(请求)设置流 0
    进度:(打开)打开的流
    正在设置播放管道...
    新时钟:GstSystemClock
    进度:(请求)发送播放请求
    重新分配延迟...
    进度:(请求)发送播放请求
    0:00:00.088038871 1321 0xffff80000d20 FIXME 默认 gstutils.c:4036:gst_pad_create_stream_id_internal: 创建随机流 ID、已考虑
    重新分配延迟...
    进度:(请求)已发送播放请求
    重新分配延迟...
    0:00:00.104402936 1321 0xff80001230 WARN v4l2 gstv4l2object.c:3408:gst_v4l2_object_reset_compose_region: 无法获取缺省
    重新分配延迟...
    0:00:00.427265413 1321 0xff80001230 WARN GST_CAPS gstpad.c:5813:pre_eventfunc_check: Caps video/x-h264、stream-format=(字符串)byted
    0:00:00.428262048 1321 0xff80001230 WARN GST_CAPS gstpad.c:5813:pre_eventfunc_check: Caps video/x-h264、stream-format=(字符串)byted
    0:00:00.429020946 1321 0xffff80001230 WARN GST_CAPS gstpad.c:5813:pre_eventfunc_check: Caps video/x-h264、stream-format=(字符串)byted
    0:00:00.429670442 1321 0xff80001230 WARN GST_CAPS gstpad.c:5813:pre_eventfunc_check: Caps video/x-h264、stream-format=(字符串)byted
    0:00:00.429914935 1321 0xff80000ed0 warm basesrc gstbasesrc.c:3134:gst_base_src_loop: 错误:内部数据流错误。
    0:00:00.429937645 1321 0xff80000ed0 warm basesrc gstbasesrc.c:3134:gst_base_src_loop: 错误:流已停止、原因未协商(–4)
    错误:来自元素/GstPipeline:pipaine0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0:内部数据流错误。
    其他调试信息:
    /usr/base/debug/gstreamer1.0/1.22.12/libs/gst/base/gstbasesrc.c src (3134):gst_base_src_loop ():/GstPipeline:pipaine0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0:
    流已停止、原因未协商(–4)
    执行在 0:00:00.342770967 之后结束
    正在将管道设置为空...
    0:00:00.430861939 1321 0xffff80000b70 警告默认 gstrtspconnection.c:1417:writev_bytes:操作已取消
    0:00:00.430907170 1321 0xffff80000b70 WARN rtspsrc gstrtspsrc.c:6796:gst_rtspsrc_try_send: 错误:无法发送消息。 (接收到 f 结束)
    错误:从元素/GstPipeline:pipaine0/GstRTSPSrc:rtspsrc0:无法写入资源。
    其他调试信息:
    /usr/srcu/debug/gstreamer1.0-plugins-good/1.22.12/gst/rtsp/gstrtspsrc.c src (6796):gst_rtspsrc_try_send ():/GstPipeline:pipaline0/GstRTSPSrc:rtspsrc0:
    无法发送消息。 (接收到文件结束)
    0:00:00.431066461 1321 0xff80000b70 WARN rtspsrc gstrtspsrc.c:9267:gst_rtspsrc_pause: 错误:无法发送消息。 (接收到文件结束)
    错误:从元素/GstPipeline:pipaine0/GstRTSPSrc:rtspsrc0:无法写入资源。
    其他调试信息:
    /usr/usr/debug/gstreamer1.0-plugins-good/1.22.12/gst/rtsp/gstrtspsrc.c src (9267):gst_rtspsrc_pause ():/GstPipeline0/GstRTSPSrc:rtspsrc0:
    无法发送消息。 (接收到文件结束)
    正在释放管道...

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

    尊敬的 Jason:

    您是否可以启用可访问的此 rtsp 流? 以便我们在最后进行验证

    此致、

    Suren

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

    您好、Suren、


    由于公司的安全策略、无法从外部访问此 RTSP 流。
    供应商和型号有关 AVER CAM520 Pro3.
    以下是相关网页:
    https://www.aver.com/Downloads/search?q=CAM520%20Pro3

    这是使用获得的信息 后探

    $ ffprobe -hide_banner -I rtsp://192.168.109.242/live_st1
    从“rtsp://192.168.109.242/LIVE_ST1“输入#0、rtsp:
    元数据:
    标题:来自 aver 的 RTSP/RTP 流
    备注:LIVE555 Streaming Media v2019.03.06.
    时长:不适用、起始:1.100100、比特率:不适用
    流#0:0:视频:H264(高)、yuv420p (tv、GBR/RESERVED / RESERVED、progressive)、1920x1080、 30 fps、29.97 TBR、90k TBN、60 tbc

    希望这有所帮助。

    我将更新其固件以查看这是否有任何区别。

    此致、
    Jason

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

    尊敬的 Jason:

    我怀疑这可能是 Gstreamer 中的比色法处理问题。 您是否可以在处理比色法的 V4L2 对象上应用以下补丁并告诉我们它是否解决了问题。

    diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c
    index f3e0e99829..03628fa559 100644
    --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c
    +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c
    @@ -2614,13 +2614,13 @@ return_data:
           "height", G_TYPE_INT, (gint) height, NULL);   gst_v4l2_object_add_aspect_ratio (v4l2object, s);
    -
    +#if 0
       if (!v4l2object->skip_try_fmt_probes) {
         gst_v4l2_object_add_interlace_mode (v4l2object, s, width, height,
             pixelformat);
         gst_v4l2_object_add_colorspace (v4l2object, s, width, height, pixelformat);
       }
    -
    +#endif
       if (G_IS_VALUE (&rates)) {
         gst_v4l2src_value_simplify (&rates);

    希望这有所帮助

    此致、

    Suren

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

    您好、Suren、

    是的、它现在已经开始工作了。
    非常感谢您的支持。

    此致、
    Jason