<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi,<br><br>I'm having some funny issues while trying to decode <span style class="">IMA</span> <span style class="">ADPCM</span> files. I'm working with mono/8000hz <span style class="">IMA</span> <span style class="">ADPCM</span> <span style class="">WAV</span> files and when i try to play then with <span style class="">gst</span>-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.<br>
<br></div>If i play the audio with "play", it plays correctly.<br><br>Debugging a little further, it seems that someone on the pipeline (my bet is on <span style class="">adpcmdec</span>) is generating holes on the stream that causes the audio to be all messed up. If i use a <span style class="">audioparse</span> to correct the holes, the audio plays correctly.<br>
<br></div>To generate a audio file on the <span style class="">IMA</span> <span style class="">ADPCM</span> format that causes the problem:<br><br><span style class="">gst</span>-launch-1.0 <span style class="">audiotestsrc</span> <span style class="">num</span>-buffers=10 <span style class="">samplesperbuffer</span>=8000 ! audio/x-raw,rate=8000,format=S16LE ! <span style class="">wavenc</span> ! <span style class="">filesink</span> location=test.<span style class="">wav</span><br>
<br><span style class="">sox</span> test.<span style class="">wav</span> -e <span style class="">ima</span>-<span style class="">adpcm</span> test-<span style class="">adpcm</span>.<span style class="">wav</span><br><br></div>
Perfect playback (~10 seconds of audio):<br><br>play test-<span style class="">adpcm</span>.<span style class="">wav</span><br><br></div>Messed up playback (~5 seconds of audio):<br><br><span style class="">gst</span>-launch-1.0 <span style class="">filesrc</span> location=test-<span style class="">adpcm</span>.<span style class="">wav</span> ! <span style class="">wavparse</span> ! <span style class="">adpcmdec</span> ! <span style class="">audioconvert</span> ! <span style class="">pulsesink</span><br>
<br></div>Perfect playback (~10 seconds of audio):<br><br><span style class="">gst</span>-launch-1.0 <span style class="">filesrc</span> location=test-<span style class="">adpcm</span>.<span style class="">wav</span> ! <span style class="">wavparse</span> ! <span style class="">adpcmdec</span> ! <span style class="">audioparse</span> channels=1 rate=8000 raw-format=4 ! <span style class="">audioconvert</span> ! <span style class="">pulsesink</span><br>
<br></div>It seems that half of the audio is lost on this gap problem, but the audio is there since with <span style class="">audioparse</span> everything goes just fine.<br><br></div><span style class="">audioparse</span> 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 <span style class="">audioparse</span> (makes sense with the rest of the problems i found).<br>
<br></div>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<span style class=""></span>.<br><br></div>
<div>The tests have been executed on a Ubuntu 12.04 with Gstreamer 1.2.1.<br></div><div><br></div>Best Regards,<br><span style class="">Tiago</span> <span style class="">Katcipis</span><br></div>