.ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

.ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

Michael Bishop-5
Hi folks,

I'm new to this list and I've run out of ideas for converting some files I have.

I've got some .ogg files and am trying to convert them to .wav files (using IMA-ADPCM). When I do it in Audacity, it sounds fine, but through sox, it sounds horrible with a crackling in the right ear.

Here is what the Audacity parameters look like:

Format: Uncompressed Files
Options:
 Header: WAV (Microsoft)
 Encoding: IMA ADPCM

And here is what I'm doing with sox:

  sox --norm=-3 music.ogg -e ima-adpcm music.wav

The audacity file sounds great and it is the sox that has the cracklings.

Any ideas as to why I might get this horrible sound?

Thanks in advance,

_ michael


-------------



Here is the soxi output:

mbishop$ soxi c1_amb_beach_loop.wav

Input File     : 'c1_amb_beach_loop.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 13-bit
Duration       : 00:00:25.03 = 1103930 samples = 1877.43 CDDA sectors
File Size      : 1.12M
Bit Rate       : 358k
Sample Encoding: 4-bit IMA ADPCM

mbishop$ soxi c1_amb_beach_loop-audacity.wav 

Input File     : 'c1_amb_beach_loop-audacity.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 13-bit
Duration       : 00:00:25.04 = 1104181 samples = 1877.86 CDDA sectors
File Size      : 1.11M
Bit Rate       : 354k
Sample Encoding: 4-bit IMA ADPCM


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: .ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

ashayk
I had a very similar problem with ffmpeg and IMA4, I don't know if it's related but the symptoms were quite similar to what you describe. I filed a bug report with the ffmpeg crew and the noise issue was eventually resolved. Pure speculation here, but it's possible there is shared or similar codec code somewhere in the mix. You might try with a recent ffmpeg build just to compare.

Cheers,

Alex


From: Michael Bishop <[hidden email]>
To: [hidden email]
Sent: Wednesday, 19 December 2012 2:09 AM
Subject: [SoX-users] .ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

Hi folks,

I'm new to this list and I've run out of ideas for converting some files I have.

I've got some .ogg files and am trying to convert them to .wav files (using IMA-ADPCM). When I do it in Audacity, it sounds fine, but through sox, it sounds horrible with a crackling in the right ear.

Here is what the Audacity parameters look like:

Format: Uncompressed Files
Options:
 Header: WAV (Microsoft)
 Encoding: IMA ADPCM

And here is what I'm doing with sox:

  sox --norm=-3 music.ogg -e ima-adpcm music.wav

The audacity file sounds great and it is the sox that has the cracklings.

Any ideas as to why I might get this horrible sound?

Thanks in advance,

_ michael


-------------



Here is the soxi output:

mbishop$ soxi c1_amb_beach_loop.wav

Input File     : 'c1_amb_beach_loop.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 13-bit
Duration       : 00:00:25.03 = 1103930 samples = 1877.43 CDDA sectors
File Size      : 1.12M
Bit Rate       : 358k
Sample Encoding: 4-bit IMA ADPCM

mbishop$ soxi c1_amb_beach_loop-audacity.wav 

Input File     : 'c1_amb_beach_loop-audacity.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 13-bit
Duration       : 00:00:25.04 = 1104181 samples = 1877.86 CDDA sectors
File Size      : 1.11M
Bit Rate       : 354k
Sample Encoding: 4-bit IMA ADPCM


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users



------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: .ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

Michael Bishop-5
Yes, I'm even having the same problem converting from .aif to .wav+IMA-ADPCM. :( This seems to be a problem in the sox IMA-ADPCM  encoder :(

---
Software Engineer

On Tuesday, December 18, 2012 at 2:31 PM, Alex Shaykevich wrote:

I had a very similar problem with ffmpeg and IMA4, I don't know if it's related but the symptoms were quite similar to what you describe. I filed a bug report with the ffmpeg crew and the noise issue was eventually resolved. Pure speculation here, but it's possible there is shared or similar codec code somewhere in the mix. You might try with a recent ffmpeg build just to compare.

Cheers,

Alex


From: Michael Bishop <[hidden email]>
To: [hidden email]
Sent: Wednesday, 19 December 2012 2:09 AM
Subject: [SoX-users] .ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

Hi folks,

I'm new to this list and I've run out of ideas for converting some files I have.

I've got some .ogg files and am trying to convert them to .wav files (using IMA-ADPCM). When I do it in Audacity, it sounds fine, but through sox, it sounds horrible with a crackling in the right ear.

Here is what the Audacity parameters look like:

Format: Uncompressed Files
Options:
 Header: WAV (Microsoft)
 Encoding: IMA ADPCM

And here is what I'm doing with sox:

  sox --norm=-3 music.ogg -e ima-adpcm music.wav

The audacity file sounds great and it is the sox that has the cracklings.

Any ideas as to why I might get this horrible sound?

Thanks in advance,

_ michael


-------------



Here is the soxi output:

mbishop$ soxi c1_amb_beach_loop.wav

Input File     : 'c1_amb_beach_loop.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 13-bit
Duration       : 00:00:25.03 = 1103930 samples = 1877.43 CDDA sectors
File Size      : 1.12M
Bit Rate       : 358k
Sample Encoding: 4-bit IMA ADPCM

mbishop$ soxi c1_amb_beach_loop-audacity.wav 

Input File     : 'c1_amb_beach_loop-audacity.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 13-bit
Duration       : 00:00:25.04 = 1104181 samples = 1877.86 CDDA sectors
File Size      : 1.11M
Bit Rate       : 354k
Sample Encoding: 4-bit IMA ADPCM


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
_______________________________________________
Sox-users mailing list


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: .ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

Ulrich Klauer-2
In reply to this post by Michael Bishop-5
Michael Bishop <[hidden email]>:

> I've got some .ogg files and am trying to convert them to .wav files  
> (using IMA-ADPCM). When I do it in Audacity, it sounds fine, but  
> through sox, it sounds horrible with a crackling in the right ear.

>   sox --norm=-3 music.ogg -e ima-adpcm music.wav

First, as a workaround, you could use the libsndfile driver, like this:
sox --norm=-3 music.ogg -t sndfile -e ima-adpcm music.wav


I was able to reproduce the problem, but it puzzles me. Here is what I did:
- Take a stereo WAV PCM file. Convert into WAV with IMA-ADPCM. The  
right channel has a crackling, the left channel is OK.
- Read converted file from previous run with -t sndfile, to make sure  
that it isn't a reading problem. Same observation (left channel OK,  
right channel not).
- Repeat the conversion, with "remix 1 2 2 1 2" added. Channels 2, 3,  
5 are affected, channels 1 and 4 are OK.
- Retry with "remix 1 2 1 1 2". Only channels 2 and 5 are affected.  
Conclude that the problem depends on the input.
- Create another stereo WAV PCM file from the original input with  
channels swapped. Convert into IMA-ADPCM with "remix 1 2 2 1 2".  
Still, only channels 2, 3, 5 are affected, even though they now  
contain the audio that was OK last time. Dismiss previous conclusion.
- Create a five-channel WAV PCM file using "remix 1 2 2 1 2". Convert  
to IMA-ADPCM. Same result (channels 2, 3, 5 affected).
- ???

Ulrich


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: .ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

Michael Bishop-5
Yes, it's very strange. I ended up using straight wav temporarily. Additionally I can manually convert all these in Audacity. There are just many of them and I want to do them in batch. I can't figure out the right parameters in the "Chains" feature of Audacity to do them in batch. :(

---
Software Engineer

On Wednesday, December 19, 2012 at 11:09 AM, Ulrich Klauer wrote:

Michael Bishop <[hidden email]>:

I've got some .ogg files and am trying to convert them to .wav files
(using IMA-ADPCM). When I do it in Audacity, it sounds fine, but
through sox, it sounds horrible with a crackling in the right ear.

sox --norm=-3 music.ogg -e ima-adpcm music.wav

First, as a workaround, you could use the libsndfile driver, like this:
sox --norm=-3 music.ogg -t sndfile -e ima-adpcm music.wav


I was able to reproduce the problem, but it puzzles me. Here is what I did:
- Take a stereo WAV PCM file. Convert into WAV with IMA-ADPCM. The
right channel has a crackling, the left channel is OK.
- Read converted file from previous run with -t sndfile, to make sure
that it isn't a reading problem. Same observation (left channel OK,
right channel not).
- Repeat the conversion, with "remix 1 2 2 1 2" added. Channels 2, 3,
5 are affected, channels 1 and 4 are OK.
- Retry with "remix 1 2 1 1 2". Only channels 2 and 5 are affected.
Conclude that the problem depends on the input.
- Create another stereo WAV PCM file from the original input with
channels swapped. Convert into IMA-ADPCM with "remix 1 2 2 1 2".
Still, only channels 2, 3, 5 are affected, even though they now
contain the audio that was OK last time. Dismiss previous conclusion.
- Create a five-channel WAV PCM file using "remix 1 2 2 1 2". Convert
to IMA-ADPCM. Same result (channels 2, 3, 5 affected).
- ???

Ulrich


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
_______________________________________________
Sox-users mailing list


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: .ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

Ulrich Klauer-2
Michael Bishop <[hidden email]>:

> There are just many of them and I want to do them in batch. I can't figure out
> the right parameters in the "Chains" feature of Audacity to do them in
> batch. :(

You *can* use SoX, just not the internal format. I'll repeat what I wrote before:

> > First, as a workaround, you could use the libsndfile driver, like this:
> > sox --norm=-3 music.ogg -t sndfile -e ima-adpcm music.wav

Ulrich

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: .ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

Michael Bishop-5
Thank you. That solved my problem.

---
Software Engineer

On Thursday, December 20, 2012 at 6:03 PM, Ulrich Klauer wrote:

Michael Bishop <[hidden email]>:

There are just many of them and I want to do them in batch. I can't figure out
the right parameters in the "Chains" feature of Audacity to do them in
batch. :(

You *can* use SoX, just not the internal format. I'll repeat what I wrote before:

First, as a workaround, you could use the libsndfile driver, like this:
sox --norm=-3 music.ogg -t sndfile -e ima-adpcm music.wav

Ulrich

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
_______________________________________________
Sox-users mailing list


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: .ogg to IMA-ADPCM .wav sounds horrible. Any ideas?

Gyedo
This post has NOT been accepted by the mailing list yet.
In reply to this post by Michael Bishop-5
I found out there is a bug handling stereo ima-adpcm.
This bug is fixed with my patch:

http://sourceforge.net/p/sox/patches/110/