[gst-devel] Playing RAW Audio after Resampling

ved kpl ved.kpl at gmail.com
Tue Dec 30 20:05:25 CET 2008


HI,

The ossink is possibly not getting the new segment event in time in
pipeline 2, which can give trouble when resampled..
Try the following pipeline.

gst-launch filesrc location=sound.raw ! 'audio/x-raw-int, width=16,
depth=16, rate=22050, endianness=1234, signed=(boolean)true,
channels=2' ! wavenc ! wavparse ! audioresample ! 'audio/x-raw-int,
rate=48000' ! osssink -v


Ved.

On Tue, Dec 30, 2008 at 7:08 PM, Sameer Naik
<sameer.subscriptions at damagehead.com> wrote:
> 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
>
> ------------------------------------------------------------------------------
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>




More information about the gstreamer-devel mailing list