Laurent’s Blog

Wednesday, 12 November, 2008

Converting WMA 5.1 to AC3 – Part 1

Filed under: Audio Encoding — Tags: , , , , , , , — hemie143 @ 9:49

Lately, I wanted to convert a WMV file to a more standard format. So, I thought about my preferred encoding tool (actually just an interface to encoders), which is MeGUI. But that conversion failed…

The WMV contained a VC-1 video stream which can easily be read by MeGUI with the help of AviSynth. The WMV file also contained a WMA3 audio stream. The total size of the file was about the size of a DVD-9 and the movie was a bit longer than 2 hours.

As usual, I first convert the audio, just to be able to calculate the bitrate for the video encoding. However, in this case, it failed and the error log of MeGUI reported an exception “The pipe has been ended”. Mmhh, strange. So, I thought I had to follow another path. Back to basics.

Actually, I discovered that the WMA3 stream was not very standard. The specs were :

  • Codec : Windows Media Audio 10 Pro
  • Bitrate : variable at 383 kbps
  • Channels : 6 (5.1)
  • Sampling rate : 96 KHz (very very strange and rather useless)
  • Resolution : 24 bit

I had to stick with Aften because this is the best AC3 encoder. However, it is only able to encode WAV to AC3. Maybe there was the option to convert the WMA stream into a giganormous WAV file or into 6 different WAVs, one for each channel, but that was certainly not the most elegant solution.

Here were my requirements :

  1. Keep the best quality available.
  2. Keep the 5.1 channels.
  3. Convert from 96 KHz to a standard 48 KHz.
  4. Convert to a standard constant bitrate of 448 kbps.

The solution I found was to pipe the audio stream into Aften. And how do you do that ? With bepipe.exe and AviSynth, of course.  bepipe.exe is a small tool provided with the BassAudio libraries, which are the best audio decoding libraries.

To be continued in part 2

1 Comment »

  1. […] Hoborg, Is this any help? Converting WMA 5.1 to AC3 – Part 1 Laurent’s Blog […]

    Pingback by SAF v4.00RC1 (StandAlone Filters) - DXVA ready (MPEG2, H.264 and VC-1). - Page 322 - MediaPortal Forum — Monday, 19 October, 2009 @ 14:00


RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.