【问题标题】:Recoding audio: libav encoder/decoder in gstreamer重新编码音频:gstreamer 中的 libav 编码器/解码器
【发布时间】:2019-11-24 15:58:53
【问题描述】:

我想重新编码音频文件的音频流。以下 gstreamer 管道运行良好:

gst-launch-1.0 filesrc location=input.flac ! decodebin ! audioconvert ! \
               sbcenc ! sbcdec ! autoaudiosink

但是,当我将编码器/解码器切换到 libav aptx 时,出现以下错误:

gst-launch-1.0 filesrc location=input.flac ! decodebin ! audioconvert ! \
               avenc_aptx ! avdec_aptx ! autoaudiosink

我收到以下错误:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0: Delayed linking failed.
Additional debug info:
../gstreamer/gst/parse/grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0:
failed delayed linking some pad of GstDecodeBin named decodebin0 to some pad of GstAudioConvert named audioconvert0
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacParse:flacparse0: Internal data stream error.
Additional debug info:
../gstreamer/libs/gst/base/gstbaseparse.c(3634): gst_base_parse_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFlacParse:flacparse0:
streaming stopped, reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

我的管道中缺少什么?如何使用 FFMPEG/libav 编解码器?

我是 gstreamer 新手,想使用 cli 工具将音频流重新编码为一堆不同的编解码器。 libav 似乎拥有所有需要的编解码器。

【问题讨论】:

  • aptx 肯定不是 AAC。
  • 你是绝对正确的。这是一个错字,我马上改正了。感谢您指出。

标签: audio gstreamer codec


【解决方案1】:

您的管道一切正常,但是...

执行gst-launch-1.0 --version检查您的Gstreamer版本。

使用 Gstreamer 版本 1.15.90,我检查了 avenc_aptxgst-inspect-1.0 avenc_aptx,发现此编码器的 SRC(源)功能是“未知的”。 Gstreamer 元素需要共享功能才能相互连接。

另一方面,avenc_aptx 的文档明确指出存在 SRC 功能(音频/aptx....)。

解码器avdec_aptx 的情况相同,其中 SINK 功能是“未知的”,但文档清楚地提到了 SINK 功能。

因此,您的问题很可能是由于您的 Gstreamer 版本部分(不完全)实现了 aptx 编码器和解码器。

尝试将 Gstreamer 升级到最新版本,再次检查 aptx 编码器/解码器,如果 SRC/SINK 功能可见,请重新运行您的管道。

【讨论】:

  • 我使用 Gstreamer 版本 1.16.2 运行 Arch Linux。遗憾的是,编解码器尚未完全实现。与此同时,我找到了使用 ffmpeg 的解决方法。但是,从长远来看,使用 gstreamer 会很好......
猜你喜欢
  • 1970-01-01
  • 2014-02-06
  • 2015-11-06
  • 2023-03-24
  • 2017-03-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多