Problem with IMA ADPCM decoding

Sebastian Dröge sebastian at centricular.com
Wed Apr 9 23:34:33 PDT 2014


On Mi, 2014-04-09 at 14:25 -0300, Tiago Katcipis wrote:
> Hi,
> 
> I'm having some funny issues while trying to decode IMA ADPCM files. I'm
> working with mono/8000hz IMA ADPCM WAV files and when i try to play then
> with gst-launch i can hear a lot of audio gaps on the audio, and the total
> playback time is at half of the original audio file.
> 
> If i play the audio with "play", it plays correctly.
> 
> Debugging a little further, it seems that someone on the pipeline (my bet
> is on adpcmdec) is generating holes on the stream that causes the audio to
> be all messed up. If i use a audioparse to correct the holes, the audio
> plays correctly.
> 
> To generate a audio file on the IMA ADPCM format that causes the problem:
> 
> gst-launch-1.0 audiotestsrc num-buffers=10 samplesperbuffer=8000 !
> audio/x-raw,rate=8000,format=S16LE ! wavenc ! filesink location=test.wav
> 
> sox test.wav -e ima-adpcm test-adpcm.wav
> 
> Perfect playback (~10 seconds of audio):
> 
> play test-adpcm.wav
> 
> Messed up playback (~5 seconds of audio):
> 
> gst-launch-1.0 filesrc location=test-adpcm.wav ! wavparse ! adpcmdec !
> audioconvert ! pulsesink
> 
> Perfect playback (~10 seconds of audio):
> 
> gst-launch-1.0 filesrc location=test-adpcm.wav ! wavparse ! adpcmdec !
> audioparse channels=1 rate=8000 raw-format=4 ! audioconvert ! pulsesink
> 
> It seems that half of the audio is lost on this gap problem, but the audio
> is there since with audioparse everything goes just fine.
> 
> audioparse did not completely resolved my problem, because i need to query
> the duration of the audio in time, and doing this with this pipeline
> returns half the real duration of the audio, even with audioparse (makes
> sense with the rest of the problems i found).
> 
> I will continue to investigate the problem, just wanted to now if this is a
> know problem or if I'm doing something wrong. If it is really a problem i
> can open a bug.

Please create a bug report for this and to make testing easier also
attach one working and one broken file to it. This is supposed to work
the way you do it, there's either a bug on our side or the files
generated by sox are not 100% correct.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140410/8b87f55f/attachment.sig>


More information about the gstreamer-devel mailing list