Audio 录制音频:gstreamer中的libav编码器/解码器

Audio 录制音频:gstreamer中的libav编码器/解码器,audio,gstreamer,codec,Audio,Gstreamer,Codec,我想重新编码音频文件的音频流。以下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 ! a

我想重新编码音频文件的音频流。以下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 ...
我得到以下错误:

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似乎拥有所需的所有编解码器

你的管道一切正常,但是

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

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

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

同样的情况也适用于解码器avdec_aptx,其中接收器功能“未知”,但文档中明确提到了接收器功能

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


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

aptx肯定不是AAC。你完全正确。这是个打字错误,我马上就把它修好了。感谢您指出这一点。我使用Gstreamer版本1.16.2运行Arch Linux。遗憾的是,编解码器还没有完全实现。同时,我发现了一个使用ffmpeg的解决方案。然而,从长远来看,使用gstreamer来实现这一点是很好的。。。