[gst-devel] problem using alawdec

Michael Smith msmith at xiph.org
Mon Jul 13 19:30:31 CEST 2009


On Mon, Jul 13, 2009 at 8:54 AM, Tiago Katcipis<katcipis at inf.ufsc.br> wrote:
> I have a file that is alaw encoded, but the file has the bytes swaped, every
> two bytes must be swaped so the alaw decoder can decode properly. I started
> to try to build a pipe but i got stuck.
>
> The pipe:
>
> gst-launch -v filesrc location=alaw_inv.dat ! audio/x-raw-int,
> endianness=4321, channels=1, rate=8000, width=16, depth=16, signed=false !
> audioconvert ! audio/x-raw-int, endianess=1234, channels=1, rate=8000,
> width=16, depth=16, signed=false ! queue ! audio/x-alaw, rate=8000,
> channels=1 ! alawdec ! audioconvert ! wavenc ! filesink
> location=exemplo_convertido.
> wav

This won't work, because audioconvert won't just do byteswapping on
unknown data, which is basically what you want.

It also won't work because you seem to have 16 bit a-law? GStreamer's
alaw decoder doesn't support that; I've never heard of it being used -
are you sure it's a-law? Regardless, you'll need a special decoder.

Once you have written a decoder for this format, you can make that
decoder accept the endianness your data is in, so you don't need to
byteswap beforehand.

Mike




More information about the gstreamer-devel mailing list