views:

129

answers:

1

hi,

I am trying to interleave two audio files as given in the interleave GStreamer documentation:

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

But executing this command gives the following error:

0:00:00.125000000 2264 00332BC0 ERROR GST_PIPELINE grammar.tab.c:656:gst_parse_perform_link: could not link queue0 to i

If I remove the second filesrc related commands i.e. all the command after "filesrc location=file2.wav, the command runs fine. What is wrong with the above command?

Thanks

A: 

try

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.

the sink pads for the interleave element are request only, so i'm betting the i.sink0 pad does not exist when gst-launch tries to link the elements. leaving a single period (i.) tells gst-launch to try all pads until a suitable one is found.

for anything but the most basic examples, you're better off to create the pipeline manually in an easy high-level language like python.

see also

man gst-launch
Jeremiah Rose