Problem with IMA ADPCM decoding
Tiago Katcipis
katcipis at inf.ufsc.br
Wed Apr 9 10:25:43 PDT 2014
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.
The tests have been executed on a Ubuntu 12.04 with Gstreamer 1.2.1.
Best Regards,
Tiago Katcipis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140409/1a8bc65a/attachment.html>
More information about the gstreamer-devel
mailing list