interleave 2 adpcm audio source

Antonio Ospite ao2 at ao2.it
Mon Jan 19 13:31:48 PST 2015


On Mon, 19 Jan 2015 12:58:35 -0800 (PST)
ge_keep <pcouliba at yahoo.com> wrote:

> I have 2 adpcm mono audio files (file1 and file2) without the header data in
> each file. So basically the raw audio compressed 4 bit/sample data in each
> file. The headers were chopped on purpose but I do know the sampling rate,
> the bit/sample. I want to create a single stereo file (interleaved.adpcm)
> out of these 2 files by interleaving the samples. No header needed in the
> output file either.
> I have tried the following but getting "could not link..." error:
> 
> gst-launch -v interleave name=i ! filesink location=interleaved.adpcm \
> filesrc location=file1 !
> "audio/x-adpcm,channels=1,endianness=(int)1234,width=(int)4,depth=(int)4,signed=true,rate=9600"
> ! i. \
> filesrc location=file2 !
> "audio/x-adpcm,channels=1,endianness=(int)1234,width=(int)4,depth=(int)4,signed=true,rate=9600"
> ! i. 
> 
> I am getting "could not link filesrc0 to i" error.
> 
> Can gst-launch help accomplish this task? waht should be the gst-launch cmd
> in this case?

The interleave element works on audio/x-raw so I think you need to
decode with adpcmdec first, then interleave (better if you specify the
channel-mask property in the caps BTW), then re-encode in a format which
suits you.

If I may, try to build pipelines incrementally, split the problem in
sub-problems: first try to play a file in the source format, then try to
write one in the target format generating data with audiotestsrc, then
try to interleave two of them into a single file.

Ciao,
   Antonio

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?


More information about the gstreamer-devel mailing list