2

我正在尝试交错 GStreamer 文档中给出的两个音频文件:

gst-launch interleave name=i ! audioconvert ! wavenc ! filesink location=file.wav  filesrc location=file1.wav ! \
decodebin ! audioconvert ! "audio/x-raw-int,channels=1" ! queue ! i.sink0   filesrc location=file2.wav !  \
decodebin ! audioconvert ! "audio/x-raw-int,channels=1" ! queue ! i.sink1

但是执行此命令会出现以下错误:

0:00:00.125000000 2264 00332BC0 错误 GST_PIPELINE 语法.tab.c:656:gst_parse_perform_link: 无法将 queue0 链接到 i

如果我删除第二个filesrc相关命令,即“filesrc location=file2.wav”之后的所有命令,该命令运行正常。上述命令有什么问题?

谢谢

4

1 回答 1

0

尝试

gst-launch interleave name=i ! audioconvert ! wavenc ! filesink location=file.wav  filesrc location=file1.wav ! \
decodebin ! audioconvert ! "audio/x-raw-int,channels=1" ! queue ! i.   filesrc location=file2.wav !  \
decodebin ! audioconvert ! "audio/x-raw-int,channels=1" ! queue ! i.

interleave 元素的 sink pads 只是请求,所以我打赌当 gst-launch 尝试链接元素时 i.sink0 pad 不存在。留下一个句点 (i.) 告诉 gst-launch 尝试所有的 pad 直到找到合适的。

除了最基本的示例之外,您最好使用简单的高级语言(如 python)手动创建管道。

也可以看看

man gst-launch
于 2010-05-19T14:26:41.620 回答