How to convert AC3 audio to Wav audio?

Viewed 835

I would like to convert a AC3 audio file (ATSC A/52 aka AC-3 aka Dolby Digital stream 6 channels) to Wave audio file (16khz mono/1 channel).

While searching on the internet, a lot of people just used ffmpeg -i file.ac3 file.wav however, i'm not sure if that even works.

I keep getting

[ac3 @ 0x55ac1a0b0660] exponent -1 is out-of-rangets/s speed= 125x
[ac3 @ 0x55ac1a0b0660] error decoding the audio block
[ac3 @ 0x55ac1a0b0660] frame sync error
Error while decoding stream #0:0: Invalid data found when processing input
etc

while I do the same command. How do I convert ac3 to wav (16khz mono)?

*Note: I also tried ffmpeg -i file.ac3 -codec:a:1 ac3 -codec copy -b:a 384 file.wav -ac 1 -ar 16000. But this doesn't output an actual wav file.

1 Answers

ffmpeg -i file.ac3 -vcodec copy -acodec pcm_s16le -ar 16000 -ab 128k -ac 1 file.wav should do it!

Related