[gst-devel] Playing RAW Audio after Resampling
Sameer Naik
sameer.subscriptions at damagehead.com
Tue Dec 30 14:38:45 CET 2008
Hi,
I have created a test raw audio file with the parameters
audio/x-raw-int, width=16, depth=16, endianness=1234, signed=true, channels=2,
rate=22050, using the following command
1]
gst-launch filesrc location=audio.mp3 ! mad ! audioconvert ! audioresample !
audio/x-raw-int, width=16, depth=16, rate=22050, endianness=1234,
signed=\(boolean\)true, channels=2 ! filesink location=sound.raw
Now if i try to play this raw audio file using the following pipeline (22050Hz
resampled to 48000Hz),
2]
gst-launch filesrc location=sound.raw ! audio/x-raw-int, width=16, depth=16,
rate=22050, endianness=1234, signed=\(boolean\)true, channels=2 !
audioresample ! audio/x-raw-int, width=16, depth=16, rate=48000,
endianness=1234, signed=\(boolean\)true, channels=2 ! osssink
I hear no output whatsoever.
------
If i first resample the file to 48000Hz and store it on disk, using the command
3]
gst-launch filesrc location=sound.raw ! audio/x-raw-int, width=16, depth=16,
rate=22050, endianness=1234, signed=\(boolean\)true, channels=2 !
audioresample ! audio/x-raw-int, width=16, depth=16, rate=48000,
endianness=1234, signed=\(boolean\)true, channels=2 ! filesink
location=resampled.raw
and then if i try to play this file, using the command
4]
gst-launch filesrc location=sound.raw ! audio/x-raw-int, width=16, depth=16,
rate=48000, endianness=1234, signed=\(boolean\)true, channels=2 ! osssink
Then i get proper audio output.
I am trying to figure out what is happening in case of pipeline 2, that audio
is not playing. I am guessing the buffers need to be re-timestamped after the
audioresample, is that the problem here? and if so is there a plugin that i
can use to timestamp the buffers?
Regards
~Sameer
More information about the gstreamer-devel
mailing list