如何解决如何将AAC流从avenc_aac混合到rtp有效负载?
我创建了这样的源流:
gst-launch-1.0 -e audiotestsrc wave=ticks apply-tick-ramp=true tick-interval=1000000000 freq=1000 volume=0.3 marker-tick-period=5 sine-periods-per-tick=20 ! avenc_aac ! mpegtsmux ! filesink location=avenc_aac.ts
使用decodbin播放就可以了:
gst-launch-1.0 -e filesrc location=avenc_aac.ts ! tsdemux ! audio/mpeg ! aacparse ! decodebin ! audioconvert ! autoaudiosink
点文件显示tsdemux的输出为audio/mpeg/mpegversion:2 stream-format:adts
。
但是无论我做什么,都不能链接到rtpmp4apay 我尝试没有任何解析器
$ gst-launch-1.0 -e filesrc location=avenc_aac.ts ! tsdemux ! audio/mpeg ! rtpmp4apay ! fakesinkSetting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstTSDemux:tsdemux0: Delayed linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
failed delayed linking some pad of GstTSDemux named tsdemux0 to some pad of GstRtpMP4APay named rtpmp4apay0
ERROR: from element /GstPipeline:pipeline0/GstTSDemux:tsdemux0: Internal data stream error.
Additional debug info:
mpegtsbase.c(1643): mpegts_base_loop (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
streaming stopped,reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
我尝试了aparparse,并将上限明确分配给mpegversion 4:
$ gst-launch-1.0 -e filesrc location=avenc_aac.ts ! tsdemux ! audio/mpeg ! aacparse ! audio/mpeg,mpegversion=4! rtpmp4apay ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstTSDemux:tsdemux0: Delayed linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
failed delayed linking some pad of GstTSDemux named tsdemux0 to some pad of GstAacParse named aacparse0
ERROR: from element /GstPipeline:pipeline0/GstTSDemux:tsdemux0: Internal data stream error.
Additional debug info:
mpegtsbase.c(1643): mpegts_base_loop (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
streaming stopped,reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
或尝试调整流格式,似乎没有任何效果:
$ gst-launch-1.0 -e filesrc location=avenc_aac.ts ! tsdemux ! audio/mpeg ! aacparse ! audio/mpeg,mpegversion=4,stream-format=raw ! rtpmp4apay ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstTSDemux:tsdemux0: Delayed linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
failed delayed linking some pad of GstTSDemux named tsdemux0 to some pad of GstAacParse named aacparse0
ERROR: from element /GstPipeline:pipeline0/GstTSDemux:tsdemux0: Internal data stream error.
Additional debug info:
mpegtsbase.c(1643): mpegts_base_loop (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
streaming stopped,reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
添加查找类型的作品:
gst-launch-1.0 -v filesrc location=avenc_aac.ts ! tsdemux ! audio/mpeg ! typefind ! aacparse ! rtpmp4apay ! filesink location=/tmp/test.rtp
但是直接戴上大写字母是行不通的:
gst-launch-1.0 -v filesrc location=avenc_aac.ts ! tsdemux ! audio/mpeg,mpegversion=2,stream-format=adts ! aacparse ! rtpmp4apay ! filesink location=/tmp/test.rtp
为什么直接使用capfilter不起作用,但使用typefind起作用?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。