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.

[参考译文] Linux/AM5728:MP4文件解码

Guru**** 2595770 points
Other Parts Discussed in Thread: AM5728

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/641413/linux-am5728-mp4-file-decode

主题中讨论的其他器件:AM5728

大家好:

现在、我们使用 am5728 gstreamer 来解码 mp4文件。

但失败了。

我们使用以下命令保存 mp4文件

gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4! 'video/x-raw、format=(string) YUY2、width=(int) 1280、height=(int) 720、framerate=(fraction) 60/1'! VPE num-input-buffers=8! 'video/x-raw、format=(string) NV12、width=(int) 1280、height=(int) 720、framerate=(fraction) 60/1'! 排队! ducatih264enc bitrate = 4000 level=51 profile=100! 排队! h264parse! 真棒! 文件链接位置= test.mp4

我们确保 test.mp4正常、因为我们可以在 Windows 10和 Ubuntu 14.04中成功解码它

当我们使用下面的命令来解码 mp4文件时,它将会报告错误

gst-launch-1.0 -e 文件 rc location=test.mp4! qtdemux! 排队! h264parse! ducatih264dec! 排队! 陆上接收机

错误是  

正在将管道设置为暂停...
管道是 PREROLLING ...
管道是 PREROLLED...
正在将管道设置为正在播放...
新时钟:GstSystemClock

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_CAPS_GET_structure:断言"GST_is_CAPS (CAP)"失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_structure_HAS_field:断言'Structure!= NULL'失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_CAPs_ise_绝密:断言"GST_is_CAPS (caps1)"失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言"(g_atural_int_get (&MINI_OBJECT->lockstate)& LOCK_MASK)< 4'失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言'mini_object->refcount >0'失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_CAPS_GET_structure:断言"GST_is_CAPS (CAP)"失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_structure_HAS_field:断言'Structure!= NULL'失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_CAPs_ise_绝密:断言"GST_is_CAPS (caps1)"失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言"(g_atural_int_get (&MINI_OBJECT->lockstate)& LOCK_MASK)< 4'失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言'mini_object->refcount >0'失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_CAPS_GET_structure:断言"GST_is_CAPS (CAP)"失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_structure_HAS_field:断言'Structure!= NULL'失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_CAPs_ise_绝密:断言"GST_is_CAPS (caps1)"失败

(GST-LAUNCH-1.0:1428):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言'mini_object->refcount >0'失败
捕获到 SIGSEGV
#0 b6b45e50 in poll () at ./sysdeps/unix/syscall-template.S:81
??中的#1 bb6c789f8 ()来自/usr/lib/libglib-2.0.so.0
旋转。 请运行'gdb GST-launch-1.0 1428'以继续调试、按 Ctrl-C 退出、或按 Ctrl-\转储内核。

我的处理器 SDK 是 Processor SDK RT_Linux 3.3

该板是定制的 am5728板。

那么 、还有其他人遇到了这个问题吗?

谢谢

此致

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    启动新主题时、请输入您的器件型号和软件。 这些是必填字段。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Biser Gatchev-XID

    很抱歉、我们没有器件型号

    如何获取器件型号

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

    有关 AM5728的更多信息。 这是器件型号:

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

    您好!

    解码流水线看起来错误。 请尝试以下操作:
    GST-LAUNCH-1.0 playbin UI=文件:///home/root/x1.mp4视频接收器= waylandsink
    请仅更改文件和文件名的路径。
    请告诉我结果。

    BR
    玛格丽塔

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

    您好、 Margarita:

    以下命令可以正常工作。

     GST-LAUNCH-1.0 playbin UI=file:///home/root/x1.mp4 video -sink=waylandsink

    那么、我们如何像这样将 playbin 更改为实际流水线:

    gst-launch-1.0 -e 文件 rc location=test.mp4! qtdemux! 排队! h264parse! ducatih264dec! 排队! 陆上接收机

    谢谢

    此致

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

    您可以尝试:
    gst-launch-1.0文件 rc location=test.mp4! qtdemux! h264parse! 杜拉蒂哈264decvpe! 'video/x-raw、format=(string) NV12、width=(int) 800、height=(int) 600'! 陆上接收机
    请根据您的分辨率更改电容滤波器。

    您也可以尝试以下操作:
    gst-launch-1.0文件 rc location=test.mp4! qtdemux! h264parse! 杜拉蒂哈264decvpe! 陆上接收机




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

    您好、 Margarita:

    感谢您的回复

    1我们已经测试了命令

    gst-launch-1.0文件 rc location=test.mp4! qtdemux! h264parse! 杜拉蒂哈264decvpe! 'video/x-raw、format=(string) NV12、width=(int) 800、height=(int) 600'! 陆上接收机

    但它只能播放几个帧、然后崩溃。

    以下是错误:

    正在将管道设置为暂停...
    [45.682893] OMAP-IMU 55082000.MMU:55082000.MMU:版本2.1
    管道是 PREROLLING ...
    管道是 PREROLLED...
    正在将管道设置为正在播放...
    新时钟:GstSystemClock

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_CAPS_GET_structure:断言"GST_is_CAPS (CAP)"失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_structure_has 字段:断言'Structure!= NULL'失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_CAPS_IS 绝密性等于:断言"GST_IS _CAPS (caps1)"失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言"(g_atural_int_get (&MINI_OBJECT->lockstate)& LOCK_MASK)< 4"失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言'mini_object->refcount >0'失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_CAPS_GET_structure:断言"GST_is_CAPS (CAP)"失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_structure_has 字段:断言'Structure!= NULL'失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_CAPS_IS 绝密性等于:断言"GST_IS _CAPS (caps1)"失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言'mini_object->refcount >0'失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_CAPS_GET_structure:断言"GST_is_CAPS (CAP)"失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_structure_has 字段:断言'Structure!= NULL'失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_CAPS_IS 绝密性等于:断言"GST_IS _CAPS (caps1)"失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言"(g_atural_int_get (&MINI_OBJECT->lockstate)& LOCK_MASK)< 4"失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言'mini_object->refcount >0'失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_CAPS_GET_structure:断言'GST_IS_CAPS (CAP)'失败[47.068961]---- [在此处剪切]-----


    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_structure_has 字段:断言'Structure!= NULL'失败

    (GST-LAUNCH-1.0:1330):Gstreamer-critical **:GST_CAPS_IS 绝密性等于:断言"GST_IS _CAPS (caps1)"失败
    ***`gst-launch-1.0'中的错误:free():无效指针:b5392e78 ***
    47.077025]警告:CPU:1 PID:1334、位于/home/gtbldadm/processor-sdk-linux-rt-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work-shared/am57xx-evm/kernel-source/drivers/media/platform/ti-vpe/v)
    [47.126857]链接的模块:sii9293 (O) adv7842 (O) bc_example (O) CBC drbg xhci_plat_hcd xhci_hrpusbcore xfrm_user xfrm4_tunnel rpmsg_pru ipcomp xfrm_ipcomp_pcmp_proc_4)
    [47.197275] CPU:1 PID:1334通信:qtdemux0:接收器被污染:G O 4.4.4.41-rt50-g968d071ce9 #1
    [47.197278]硬件名称:通用 DRA74X (平展器件树)
    [47.197282]回溯:
    [47.197299][ ](dump_backtrace)从[ ](show_stack+0x18/0x1c)
    [47.197308] r7:bf0cd704 r6:600e0013 r5:00000000 r4:c0944374
    [47.197318][ ](show_stack)从[ ](dump_stack+0x8c/0xa0)
    [47.197328][ ](dump_stack)从[ ](warn_slESpath_common+0x88/b8)
    [47.197336] r7:bf0cd704 r6:00000179 r5:00000009 r4:00000000
    [47.197345][ ](warn_slowpath_common)、来自[ ](WARN_RASPEK_NULL_0x24/0x2C)
    [47.197353] R8:ed1ba5a0 r7:ee4f7a10 R6:ed74f73c R5:ed74f410 R4:ec515d6c
    [47.197370][ ](warn_slowpath_null)、来自[ ](vpdma_five_desc_buf+0x44/0x48 [ti_vpdma])
    [47.197391][ ](vpdma_five_desc_buf [ti_vpdma])、来自[ ](vpdma_five_desc_list+0x14/0x20 [ti_vpdma])
    [47.197395] R5:ed74f410 R4:ec515d6c
    [47.197417][ ](vpdma_five_desc_list [ti_vpdma])、来自[ ](VPE_RELEASE_0x3c/b0 [ti_VPE])
    [47.197421] R5:ed74f410 R4:ec515c00
    [47.197438][ ](VPE_RELEASE [ti_VPE])、来自[ ](v4l2_release+0x40/0x7c)
    [47.197444] r7:ee4f7a10 R6:00000000 R5:ed74f480 R4:ecb8b500
    [47.197455][ ](v4l2_release)从[ ](_fput + 0x88/0x1d0)
    [47.197459] R5:ec8d1e50 R4:ecb8b500
    [47.197467][ ](__fput)从[ ](___fput + 0x10/0x14)
    [47.197476] R10:ed6b3ec4 R9:dfe77180 R8:ec95b250 r7:ec450740 R6:dfe7c600 R5:c0974874
    [47.197479] R4:ec450c40
    [47.197489][ ](___fput)、来自[ ](Task_Work_run+0x98/0xcc)
    [47.197497][ ](task_work 运行)从[ ](do_exit+0x300/0x9c0)
    [47.197503] r7:d2895e40 R6:00000001 R5:ec450c58 R4:ec450740
    [47.197508][ ](do _exit)从[ ](do_group_exit+0x48/0xc4)
    [47.197511] r7:d2895edc
    [47.197520][ ](do _group_exit)从[ ](GET_SIGNAL +0x22c/0x5c0)
    [47.197526] r7:d2895edc R6:020c0027 R5:d2894000 R4:08430000
    [47.197535][ ](get_signal)从[ ](DO_SIGNAL +0xd0/0x3b4)
    [47.197544] R10:00000000 R9:d2894000 R8:00000000 r7:b6af1996 R6:d2895ec8 R5:b6af1994
    [47.197546] R4:d2895fb0
    [47.197554][ ](DO 信号)从[ ](do_work _挂起+0xa8/0xc0)
    [47.197563] R10:00000000 R9:d2894000 R8:c000fbc4 r7:0000010c R6:d2895fb0 R5:c000fbc4
    [47.197565] R4:d2894000
    [47.197573][ ](Do_Work_Pending)、来自[ ](SLOW_work 挂起+ 0xc/0x20)
    [47.197580] r7:0000010c r6:b6bc5088 r5:b51ff470 r4:b51ff930
    [47.197582]--[结束线迹0000000000000002 ]--

    2、当我们使用以下堆进行测试时。

    gst-launch-1.0文件 rc location=test.mp4! qtdemux! h264parse! 杜拉蒂哈264decvpe! 陆上接收机

    它还可以播放几个帧、然后崩溃。

    以下是错误:

    root@am57xx-EVM:~# gst-launch-1.0文件 rc location=test.mp4! qtdemux! h264parse! 杜拉蒂哈264decvpe! 陆上接收机
    正在将管道设置为暂停...
    [211.081241] OMAP-IMU 55082000.MMU:55082000.MMU:2.1版
    管道是 PREROLLING ...
    管道是 PREROLLED...
    正在将管道设置为正在播放...
    新时钟:GstSystemClock

    (GST-LAUNCH-1.0:1348):Gstreamer-critical **:GST_CAPS_GET_structure:断言"GST_is_CAPS (CAP)"失败

    (GST-LAUNCH-1.0:1348):Gstreamer-critical **:GST_structure_HAS_field:断言'Structure!= NULL'失败

    (GST-LAUNCH-1.0:1348):Gstreamer-critical **:GST_CAPs_ise_绝密:断言"GST_is_CAPS (caps1)"失败

    (GST-LAUNCH-1.0:1348):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言"(g_atural_int_get (&MINI_OBJECT->lockstate)& LOCK_MASK)< 4'失败

    (GST-LAUNCH-1.0:1348):Gstreamer-critical **:GST_MINI_OBJECT_UNREF:断言'mini_object->refcount >0'失败

    (GST-LAUNCH-1.0:1348):Gstreamer-critical **:GST_CAPS_GET_structure:断言"GST_is_CAPS (CAP)"失败

    (GST-LAUNCH-1.0:1348):Gstreamer-critical **:GST_structure_HAS_field:断言'Structure!= NULL'失败

    (GST-LAUNCH-1.0:1348):Gstreamer-critical **:GST_CAPs_ise_绝密:断言"GST_is_CAPS (caps1)"失败
    ***`gst-launch-1.0'出错:双重释放或损坏(out):b530afc0***

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

    我在我的一侧测试了该流水线:
    root@am57xx-EVM:~# gst-launch-1.0文件 rc location=test.mp4! qtdemux! h264parse! 杜拉蒂哈264decvpe! 'video/x-raw、format=(string) NV12、width=(int) 800、height=(int) 480'! 陆上接收机
    正在将管道设置为暂停...
    [189.786042] OMAP-IMU 55082000.MMU:55082000.MMU:2.1版
    管道是 PREROLLING ...
    管道是 PREROLLED...
    正在将管道设置为正在播放...
    新时钟:GstSystemClock
    从元件"流水线0"获得 EOS。
    执行在0:00:19.933032570之后结束
    正在将管道设置为暂停...
    正在将管道设置为就绪...
    正在将管道设置为 NULL ...
    正在释放管道...

    您可以看到它正在工作。

    我还测试了这个:
    root@am57xx-EVM:~# gst-launch-1.0文件 rc location=test.mp4! qtdemux! h264parse! 杜拉蒂哈264decvpe! 陆上接收机
    正在将管道设置为暂停...
    [267.791520] OMAP-IMU 550820.MMU:550820.MMU:2.1版
    管道是 PREROLLING ...
    管道是 PREROLLED...
    正在将管道设置为正在播放...
    新时钟:GstSystemClock
    从元件"流水线0"获得 EOS。
    0:00:19.949526320后结束执行
    正在将管道设置为暂停...
    正在将管道设置为就绪...
    正在将管道设置为 NULL ...
    正在释放管道...

    它也在工作。

    由于视频文件可以与 playbin 一起播放,我建议您添加-v 并检查管道中连接的元素,以便您可以恢复管道。 Playbin 元素是具有自动文件类型识别的元素、并基于正确多路信号分离器/解码器等的自动选择和使用 Playbin 根据输入文件自动添加和链接元素。


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

    尊敬的 Margarita

    我们已使用以下命令成功播放 mp4文件
    gst-launch-1.0 -e -v 文件 rc location=test.mp4! qtdemux! 排队! h264parse! 'video/x-h264'! 杜拉蒂哈264decvpe! 排队! 陆上接收机

    现在、我们还有另一个问题、
    在 am5728平台中、有两个 mp4元素、即 qtmux 和 mp4mux。
    我们可以使用这两者来生成 mp4文件。
    gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4! 'video/x-raw、format=(string) YUY2、width=(int) 1280、height=(int) 720、framerate=(fraction) 60/1'! VPE num-input-buffers=8! 'video/x-raw、format=(string) NV12、width=(int) 1280、height=(int) 720、framerate=(fraction) 60/1'! 排队! ducatih264enc bitrate = 4000 level=51 profile=100! 排队! h264parse! mp4 mux! 文件链接位置= test.mp4

    gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4! 'video/x-raw、format=(string) YUY2、width=(int) 1280、height=(int) 720、framerate=(fraction) 60/1'! VPE num-input-buffers=8! 'video/x-raw、format=(string) NV12、width=(int) 1280、height=(int) 720、framerate=(fraction) 60/1'! 排队! ducatih264enc bitrate = 4000 level=51 profile=100! 排队! h264parse! 真棒! 文件链接位置= test.mp4

    那么、qtmux 和 mp4mux 之间的区别是什么?



    此致
    西溪

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

    您好!

    QuickTime 格式可以有一些 mp4不能的扩展名,反之亦然。

    Qtmux 元素将流(音频和视频)合并到 QuickTime (.mov)文件中。

    Mp4mux 元素将流(音频和视频)合并到 ISO MPEG-4 (.mp4)文件中。

    有关详细信息、请查看以下链接:

    https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-qtmux.html

    https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-mp4mux.html

    https://en.wikipedia.org/wiki/QuickTime_File_Format

    请、如果回答了您的问题、您能否关闭此主题。

    BR
    玛格丽塔

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