Solution to MP4 (H264 AAC) 5.1 Multichannel Audio


#1

Took a while to sort through this, but I now have a solution and thought I’d share for those that might have similar issues. 

Assuming you have (as most people do) a typical receiver that can decode Dolby Digital (ie AC3), but NOT AAC 5.1, you’ll have to convert the type of container from mp4 to mkv and the audio track in that container from AAC to AC3 (mp4 does NOT support AC3 apparently).

While there may be other ways to do this, the one which I found the fastest and involves the least amount of steps (without having to recode the video) uses 2 pieces of software “HDConvertToX” and “Heartware Audio Converter”.

Load mp4 file into HDConvertToX - this creates a subfolder with the mkv version of the file.

Move that file into the “Heartware Audio Converter” folder.

Load mkv into Heartware Audio Converter (click on browse for source file).  Click browse for target and add “ac3” to end of source filename.

Click Run.

For a typical 1.5 gig mp4, the whole process takes ~ 5-10 minutes.


#2

I should add that this is a workaround that I *think* could be unnecessary if WD did a firmware update whereby AAC could be output as PCM to the receiver.  Not 100% sure about this though.

Much of what I learned was through other people’s experiences with Popcorn Hour - a more pricey competitor to the WDTVLive which has similar limitations.


#3

thank you!


#4

AAGAA wrote:
[…]

Load mkv into Heartware Audio Converter (click on browse for source file).  Click browse for target and add “ac3” to end of source filename.

Click Run.

 

[…]

quick question: can you confirm that the converted file has a working 5.1 AC3 audio stream?

Thanks


#5

Thanks a lot.

I was struggling for last couple of hours for converting AAC 5.1 for mp4 files.  I will give this a try


#6

AAGAA wrote:

I should add that this is a workaround that I *think* could be unnecessary if WD did a firmware update whereby AAC could be output as PCM to the receiver.  Not 100% sure about this though.

Conversion to multichannel PCM would only work for HDMI receivers.  AFAIK, optical doesn’t have the bandwidth for 6 uncompressed channels of audio.  Not sure if any other NMT manufacturers using the same Sigma chip offer this feature… last I read, even Poporn Hour users have to recode AAC 5.1 tracks to get them working with AVRs.

On the plus side, Heartware’s Audio Converter works well, not just for AAC 5.1 but for DTS too.  I’ve been able to recode DTS tracks into AC3 and output a new MKV with both tracks really easily.  When I finally upgrade my AVR, I can still use DTS.  :slight_smile:


#7

I am not able to make Heartware’s Audio Converter work.  It always say that source file in use which is not correct.  Any other audio encoder?


#8

sumitgup wrote:

I am not able to make Heartware’s Audio Converter work.  It always say that source file in use which is not correct.  Any other audio encoder?

Actually, the best software to re-encode almost anything (video or audio) is ffmpeg.  This freeware is at the heart of most of nearly all freeware GUIs (and many commercial products) you can get.  It’s command line driven, but that shouldn’t scare you away as there are plenty of example tutorials out there to help you with the syntax.


#9

Is there any audio only encoder that any one can recommend?  I dont want to reencode video its a long process


#10

If you are comfortable with command line interface, nothing is better, faster (or easier) than ffmpeg (freeware).


#11

Yeah i am familiar with command line interface, but i checked the docs and I dont see any command which transcodes the audio.

Do you know any?

It will be helpfull for lot of people who are struggling to play multi channel sounds in wd live.


#12

sumitgup wrote:

I am not able to make Heartware’s Audio Converter work.  It always say that source file in use which is not correct.  Any other audio encoder?

Did you give the output file the same name as the input file?  That would cause issues, as it can’t overwrite a file it’s using.

Give it a different name and it should work.


#13

sumitgup wrote:

Yeah i am familiar with command line interface, but i checked the docs and I dont see any command which transcodes the audio.

 

Do you know any?

 

It will be helpfull for lot of people who are struggling to play multi channel sounds in wd live.

It all depends on what you want to do.  I haven’t looked back at this entire thread, so you’ll need to tell me exactly what you need the audio to look like.

  ffmpeg -i test.mkv -acodec mp2 outfile.mkv

will, for example, change the audio codec to MPEG-2.  Perhaps these sites will be helpful:

http://howto-pages.org/ffmpeg/#basicaudio

http://ffmpeg.org/ffmpeg-doc.html#SEC12


#14

I want to convert audio of my mkv file from AAC to stereo.  Here is the information of audio in my mkv file:

======
ID                               : 2
Format                           : AAC
Format/Info                      : Advanced Audio Codec
Format version                   : Version 4
Format profile                   : LC
Format settings, SBR             : Yes
Format settings, PS              : No
Codec ID                         : A_AAC
Duration                         : 2h 20mn
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz


#15

ffmpeg -i Input.Movie.mkv -acodec aac -ac 2 Ouptput.movie.mkv

ought to do the trick.


#16

I tried it but it gives me an error. I have the latest version

===============

E:\WDLive\FFmpeg-svn-22140>ffmpeg -i wus.mkv -acodec aac -ac 2 wus2.mkv
FFmpeg version SVN-r22140-Sherpya, Copyright © 2000-2010 the FFmpeg developers

  built on Mar  2 2010 03:26:44 with gcc 4.2.5 20080919 (prerelease) [Sherpya]
  libavutil     50. 9. 0 / 50. 9. 0
  libavcodec    52.55. 0 / 52.55. 0
  libavformat   52.54. 0 / 52.54. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.17. 0 /  1.17. 0
  libswscale     0.10. 0 /  0.10. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[matroska @ 0190d060]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (5994/1
25) -> 24.00 (24/1)
Input #0, matroska, from ‘wus.mkv’:
  Duration: 02:20:00.72, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.097000, end 8400.726000
    Metadata:
      title           : 00:00:00.097
    Stream #0.0(eng): Video: h264, yuv420p, 640x272, PAR 1:1 DAR 40:17, 47.62 fp
s, 24 tbr, 1k tbn, 47.95 tbc
    Stream #0.1(hin): Audio: aac, 24000 Hz, 5.1, s16
Output #0, matroska, to ‘wus2.mkv’:
  Metadata:
    encoder         : Lavf52.54.0
    Stream #0.0(eng): Video: mpeg4, yuv420p, 640x272 [PAR 1:1 DAR 40:17], q=2-31
, 200 kb/s, 1k tbn, 24 tbc
    Stream #0.1(hin): Audio: aac, 24000 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[aac @ 01a53940]SBR not implemented. Update your FFmpeg version to the newest on
e from SVN. If the problem still occurs, it means that your file has a feature w
hich has not been implemented.
[aac @ 01a53940]SBR not implemented. Update your FFmpeg version to the newest on
e from SVN. If the problem still occurs, it means that your file has a feature w
hich has not been implemented.
[aac @ 01a53940]SBR not implemented. Update your FFmpeg version to the newest on
e from SVN. If the problem still occurs, it means that your file has a feature w
hich has not been implemented.
Resampling with input channels greater than 2 unsupported.
Can not resample 6 channels @ 24000 Hz to 2 channels @ 24000 Hz


#17

Apparently FFMPEG does not downmix, so it can’t be used for this.

Best bet then is something like Audacity, or the like.


#18

If I’m reading correctly, FFMPeg is squawking about SBR (Spectral Bandwidth Replication) not the fact that it’s multichannel?


#19

No, it’s the multi-channel thing.  There is a lot of talk about this on the web – apparently a lot of folks would like to downmix using FFMPEG – but the only workarounds involve some heavy scripting.

If it were me I’d use Sound Forge Pro but that’s what I have.  I understand Audacity is pretty close, though (and isn’t it freeware?)


#20

PixelPower wrote:

 


sumitgup wrote:

I am not able to make Heartware’s Audio Converter work.  It always say that source file in use which is not correct.  Any other audio encoder?


 

Did you give the output file the same name as the input file?  That would cause issues, as it can’t overwrite a file it’s using.

 

Give it a different name and it should work.

Did you try this?