VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. I posted in a really old thread found here and was encouraged to start a new one.

    Im wondering how to convert 6ch AAC audio to 6ch AC3, as my surround system does not detect the 6ch AAC properly.
    My Logitech Z-5450 detects 6ch AC3 as DTS whereas the 6ch AAC is detected as stereo (or alternatively upmixed using ProLogic II)

    I have used avidemux to convert my movies from 6ch AAC (MP4, AVC+AAC) to 6ch AC3 (MKV, AVC+AC3) but the old thread mentioned that AAC to AC3 conversion wasn't as simple as I thought, and that I might be doing it all wrong?

    I understand that the channels differ somehow and probably aren't rendered "right" when converted. As to HOW they differ I'd like to know.
    Maybe someone could also explain why the old thread discourages this kind of conversion, stating that the resulting AC3 will "sound crappy"?

    Finally, how does avidemux convert the audio, and should i be using some other program for this task? If so, which and why? (Vidcoder mentioned by redwudz)

    Thanks in advance!

    some additional info:
    I used mediainfo to confirm the audiostreams both before and after the conversion.
    Both file extensions are .mp4.
    In avidemux i use the presets "copy" for video and "AC3 (lav)" for audio. I havent tried AC3 (aften) and do not know the difference between the two.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Quote Quote  
  3. Originally Posted by Baldrick View Post
    Seems like both only accept mkv sources? I'm usually converting MP4 files.
    That said, both mkv and mp4 are fine in my case, it's the AAC audio the reciver doesn't like.
    I guess I could go from MP4 AVC+AAC to MKV AVC+AAC (using any software really) and then use one of your mentioned programs.

    Could you elaborate as to why I should use any of them instead of Avidemux? In what way do they do a better job?
    Quote Quote  
  4. I'm not sure the info in that old thread is correct. My take on it.... and someone who knows more about it than I do might be able to correct me......

    According to the info here different formats use different channel ordering.
    That shouldn't be an issue when converting though. As far as I know a decoder would decode an audio stream and output the same order for wave files, then it'd be remapped accordingly (if necessary) by the encoder. Or something along those lines. You should be able to convert from one format to another without having to think about channel mapping. On playback the correct channel mapping should be used.

    I'm not sure about the statement "AAC follows different channel mixing algorithm than AC3" being correct. I'm pretty sure AC3 audio can contain info regarding how to downmix multi-channel audio to stereo (if that's what he meant), but there's only a few variations and they don't vary by a lot (mixing the rear channels and the front at slightly different volumes etc). Without that info, most audio would be downmixed using the a pretty standard formula regardless of the format. In your case, the objective is to keep the audio as 5.1ch anyway.
    The downside of converting AAC to AC3 might be a bit of (theoretical) quality loss, given AC3 is lossy, but that should be about it.

    I don't know much about using an external system for decoding, so maybe someone else can help there. I'd be guessing as to what's going on. According to the info I found the Logitech unit doesn't decode AAC. I'm not sure how it's ending up as stereo.
    Is the 5.1ch system connected to a PC or your TV etc? Digital connection I assume? Can you convert other audio formats to AC3 on the fly and output that for your Logitech unit to decode (rather than have to re-encode everything as AC3 manually)?

    There's probably no reason to use one program over another as long as it works. I'd do it a slightly longer way by opening an MP4 in foobar2000 and converting the audio to AC3 with the Aften encoder, then open the MP4 with MKVMergeGUI, replace the audio and save the output as an MKV. But that's just because I have those programs installed and I'm used to them. I don't know if there's any quality difference between using Aften and AC3 (lav) for encoding.

    XviD4PSP is a program which should let you convert while selecting "copy" for the video and converting only the audio.
    Quote Quote  
  5. Member
    Join Date
    Aug 2003
    Location
    United States
    Search Comp PM
    TAudioConverter has worked very good for me.
    Quote Quote  
  6. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    Audacity with the ffmpeg plugin will convert it to 5.1 ac3.
    I think,therefore i am a hamster.
    Quote Quote  
  7. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    A two step process but it is quick to do...
    1. Drop the mp4 file into MkvMergeGui
    2. Use either Popcorn audio convertor or mkv2ac3 to convert the audio...
    Only the audio is re encoded.
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  8. Thanks for all the suggestions but until someone says there's something wrong with my one step avidemux way, thats how I'm gonna do it

    @hello_hello
    on channels: That's what I thought, channels may be assigned differently, but that doesn't make converting bad. If I could only find a 5.1 AAC channel testing videoclip to test if avidemux (or any other converter) gets the channel order right.

    The speakers are connected to my computer via spdif, and I probably didn't express myself very clearly when I stated that "the AAC 5.1 is detected as stereo".
    I'm on the edge of my knowledge here, but I believe that just as a display tells the computer what resolutions it can accept (EDID?), the speakers have told my computer they don't decode 5.1 AAC. This info is carried on to whatever sound decoder im using, and it chooses to downmix the audio to stereo before outputting. Please correct me where I'm wrong.

    An intresting idea to convert on the go, I read something about someone using xmbc and a custom line of code when opening the file, too bad I couldn't find it anymore..
    I like and almost always use VLC for playback, and the manual conversion for the few movies that actually have 5.1 AAC takes about a minute anyway, so I don't "need" onthefly conversion. That being said, if anyone could guide me as to what I should write in CMD to open my MP4 AVC 5.1 AAC in vlc and provide onthefly audio conversion to AC3, please do!
    Quote Quote  
  9. Sending raw video data to an external device for decoding is something I've never actually done, and I don't use VLC. I had a quick look and couldn't see any re-encoding options, but that doesn't mean VLC can't.... I only had a quick look.
    You could use a player such as MPC-HC with ffdshow for audio decoding, and ffdshow is pretty configurable regarding the audio output. For selected audio types it'll output the raw audio (bitstream) and for the rest it'll re-encode it as AC3. It also has an option to only re-encode 5.1ch audio as AC3 which seems logical if the info I found regarding your Logitech unit is correct. It only supports stereo PCM (maybe that's typical) so I'd guess for stereo audio ffdshow could simply decode it and output PCM, whereas for 5.1ch AAC it'd need to re-encode it as 5.1ch AC3 or you'd only have stereo.

    AC3Filter could be used as an ffdshow alternative. Once again though, a DirectShow player such as MPC-HC would be required.

    ReClock has a similar option for re-encoding audio as AC3.... all audio or just multichannel. DirectShow again....

    LAV filters (which MPC-HC uses internally for audio decoding) seems to have all the same output options as ffdshow except for the ability to re-encode as AC3 on the fly.... as best as I can tell. Or LAV's a.... errrr..... DirectShow filter.

    This is what ffdshow's audio output options look like.

    Click image for larger version

Name:	ffdshow.gif
Views:	3780
Size:	8.5 KB
ID:	27041

    Maybe these days, PC sound cards have their own AC3 re-encoding options? Mine doesn't but it's a bit old (it has S/PDIF output options but no re-encoding).
    My TV can have it's S/PDIF output configured to be PCM or AC3, so I guess it can re-encode, but I've no idea how that all works. Anyway.... just some thoughts....

    If I could only find a 5.1 AAC channel testing videoclip to test if avidemux (or any other converter) gets the channel order right.
    You could probably work it out easily enough with any old multi-channel audio. As long as you can decode it with something which shows you the levels. Something which lets you mute or solo them in real time would be even better. It'd be fairly easy to check the centre channel is still in the centre and left is left and right is right etc. I can't remember, but have I mentioned ffdshow?

    Click image for larger version

Name:	ffdshow2.gif
Views:	3768
Size:	12.0 KB
ID:	27042

    Or does VLC have an output meter similar to foobar2000?

    Name:  foobar2000.gif
Views: 6884
Size:  6.0 KB

    Or there's Audacity. To import AAC you need a plugin. Audacity should show you where to download it. As Audacity decodes the audio when importing it, I assume the imported audio always uses the same channel order regardless of the input format (it's re-mapped when necessary).

    I took a standard AC3 audio steam and re-encoded it as AAC with foobar2000. I imported both the original and re-encoded versions into Audacity. They look the same. It appears Audacity always imports in the "wave file" channel order: FL, FR, C, LFE, RL, RR
    So either foobar2000 didn't remap the channels as required, and Audacity also didn't remap the channels as required, and two wrongs made a right, or it's being converted as it should.

    Name:  ac3.gif
Views: 7072
Size:  23.6 KBName:  aac.gif
Views: 6851
Size:  25.2 KB

    The channels look the same but the volumes look a little different. I've not compared them like that before. For some reason Audacity seems to import AAC a little louder than AC3, unless it's something to do with AC3 dialogue normalisation.....?
    According to ReplayGain the AC3 and AAC versions are the same volume (it only reports a 0.02dB difference) so it must be something Audacity is doing.
    Last edited by hello_hello; 24th Aug 2014 at 10:03.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!