Problem decoding audio using gnonlin

Ralph ralph.gucwa at racelogic.co.uk
Tue Jan 17 03:22:24 PST 2012


Ralph wrote
> 
> I'm trying to use gnonlin for playing a sequence of avi file fragments. 
> All avi files are the same:
> video: Xvid ISO MPEG-4 720x576 25fps
> audio: MPEG-1 Layer 2 48KHz 192kb/s stereo
> 
> The audio is played using:
> gnlfilesource - gnlcomposition - autoaudiosink
> 
> I link gnlcomposition to autoaudiosink when gnlcomposition creates a
> dynamic audio pad.
> The source pad reports the following caps:
> {audio/x-raw-int, channels=(int)[ 1, 2 ], rate=(int)[ 4000, 96000 ],
> signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16;
> audio/x-raw-int, channels=(int)[ 1, 2 ], rate=(int)[ 4000, 96000 ],
> signed=(boolean)true, endianness=(int)1234, width=(int)32, depth=(int)32;
> audio/x-raw-float, channels=(int)[ 1, 2 ], rate=(int)[ 4000, 96000 ],
> endianness=(int)1234, width=(int)32; audio/x-raw-float, channels=(int)[ 1,
> 2 ], rate=(int)[ 4000, 96000 ], endianness=(int)1234, width=(int)64}
> 
> It looks like an already decoded audio stream ("audio/x-raw" caps), but
> instead of a nice sound, a terrible digital noise can be heard from the
> speakers.
> What am I doing wrong?
> 
> A sample video file is available at:  http://ralphos.com/video/test6.avi
> http://ralphos.com/video/test6.avi  (only left channel contains audible
> sound).
> 


Problem solved.
When writing the original post I didn't mention that I had looked at the
source code of a few programs using gnonlin and had discovered that
audioconvert should be insterted between gnlcomposition and autoaudiosink. 
When I tried doing that, I got no audio at all and the video playback was
slowed down.
Today I discovered that what the pipeline was missing an audioresample
element.  It seems my soundcard was fixed at 44.1kHz and the audio channel
of the avi file was 48kHz and needed resampling.

The pipeline looks like this:
gnlfilesource - gnlcomposition - audioconvert - audioresample -
autoaudiosink


--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problem-decoding-audio-using-gnonlin-tp4292412p4302977.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list