VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. Hello All,

    I have spent a lot of time looking for a solution to no avail.

    Problem:5.1 AC3 Audio channel mapping issue. The Center / Dialogue audio is coming out of the Left Front.

    I have discovered about 50+ movies with this issue. All done in a batch several years ago.

    The movies were originally in MP4 format with AAC 5.1.

    The audio was converted from AAC to AC3 using Yamb, during this process it would appear the audio channels were mapped in correctly. I would then create an MKV using mkvmerge.

    I have used TAudioConverter to extract the audio, and have uploaded the Audio to Google Drive LINK.

    What are my options to correct the channel mapping?

    According to http://avisynth.org.ru/docs/english/corefilters/getchannel.htm

    AAC 5.1 = FC, FL, FR, RL, RR, LFE
    AC3 5.1 = FL, FC, FR, RL, RR, LFE

    Below is the mediainfo.

    Code:
    Format                                   : Matroska
    Format version                           : Version 2
    File size                                : 2.16 GiB
    Duration                                 : 1h 58mn
    Overall bit rate                         : 2 616 Kbps
    Encoded date                             : UTC 2010-02-11 23:30:19
    Writing application                      : mkvmerge v2.9.8 ('C'est le bon') built on Aug 13 2009 12:49:06
    Writing library                          : libebml v0.7.7 + libmatroska v0.8.1
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4.1
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 8 frames
    Codec ID                                 : V_MPEG4/ISO/AVC
    Duration                                 : 1h 58mn
    Bit rate                                 : 2 296 Kbps
    Width                                    : 1 280 pixels
    Height                                   : 536 pixels
    Display aspect ratio                     : 2.40:1
    Frame rate mode                          : Constant
    Frame rate                               : 23.976 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.140
    Stream size                              : 1.85 GiB (86%)
    Writing library                          : x264 core 80 r1376M 3feaec2
    Encoding settings                        : cabac=1 / ref=8 / deblock=1:-2:-2 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=0.2:0.0 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-1 / threads=3 / sliced_threads=0 / nr=0 / decimate=0 / mbaff=0 / constrained_intra=0 / bframes=6 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=1 / wpredb=1 / wpredp=2 / keyint=250 / keyint_min=25 / scenecut=40 / rc_lookahead=42 / rc=2pass / mbtree=1 / bitrate=2296 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
    
    Default                                  : Yes
    Forced                                   : No
    
    Audio
    ID                                       : 2
    Format                                   : AC-3
    Format/Info                              : Audio Coding 3
    Mode extension                           : CM (complete main)
    Format settings, Endianness              : Big
    Codec ID                                 : A_AC3
    Duration                                 : 1h 58mn
    Bit rate mode                            : Constant
    Bit rate                                 : 320 Kbps
    Channel(s)                               : 6 channels
    Channel positions                        : Front: L C R, Side: L R, LFE
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Compression mode                         : Lossy
    Stream size                              : 270 MiB (12%)
    Default                                  : Yes
    Forced                                   : No
    Quote Quote  
  2. i always see these poor sods using Mp4 proggys to encode Dolby digital lol
    i wouldn't be using yamb to encode any audio stream mate.
    to my knowledge and experience it doesn't even mux mp4's correctly.

    if you wanna create an AC3 file use an AC3 encoder.. like Aften or eac3to either one of those can map the channels correctly mate.
    or if you have the silver Surcode for Dolby Digital works a treat.

    i would use smartlabs build of tsMuxeR. don't use the network optix build (what they have here) AfterDawn has Smartlabs build. use version 1.10.6 then you can extract the AAC audio stream. after that just load the extracted stream in Megui and set the encoder setting to Aften, configure your desired bitrate and re-encode the audio to the correct channels.
    Last edited by Acesn8s; 6th Feb 2015 at 21:05.
    Quote Quote  
  3. I now use mp42mkvac3 to convert MP4 AAC 5.1 to MKV AC3 5.1 which is a flawless solution.

    As mentioned these movies that have the issue were done years ago. All I am trying to do is correct the audio mapping issue.
    Quote Quote  
  4. Normally the audio is decoded using the wave channel mapping, then the encoder remaps it as required. It's not something the user should have to think about. However, if something's gone wrong....

    I don't know if there's a way to change the channel mapping without re-encoding. If you can decode via DirectShow, ffdshow's mixer filter lets you remap the channels.
    Foobar2000 also has a matrix mixer plugin that can be used when converting. If there's a lot to do and they're all the same, that might ultimately be easier as you can batch convert and it'll open MKVs directly (although if there's chapters it displays them as individual tracks in the playlist so you might need to demux the audio first). There's an encoder pack on the foobar2000 web site and I think it includes the Aften AC3 encoder.
    Foobar2000 might take a bit of time getting to know if you've not used it before.

    I don't know what mp4 programs Acesn8s is referring to. I don't think YAMB's capable of converting. Isn't it just a muxing program? I can't imagine how loading the audio into MeGUI and re-encoding is going to help because that'd assume the audio is in the correct channels which apparently it isn't. Although you could use MeGUI and configure the audio encoder to decode via directshow and use ffdshow's mixer filter to swap the channels around as it's being decoded.
    Quote Quote  
  5. I don't know what mp4 programs Acesn8s is referring to. I don't think YAMB's capable of converting. Isn't it just a muxing program? I can't imagine how loading the audio into MeGUI and re-encoding is going to help because that'd assume the audio is in the correct channels which apparently it isn't. Although you could use MeGUI and configure the audio encoder to decode via directshow and use ffdshow's mixer filter to swap the channels around as it's being decoded.

    the OP very clearly said he converted AAC to AC3 with yamb, did he not ??

    and yes it can extract audio to other formats, but imho isn't no where near qualified to do so.
    i would extract the audio to a wav file and let eac3to map the channels correctly. the only difference in the channel mapping from AAC to AC3 is 1 channel (the center) should not start first like the AAC channel mapping. once the OP gets one audio stream sorted, the rest should be easy.
    Last edited by Acesn8s; 7th Feb 2015 at 00:17.
    Quote Quote  
  6. Think I'm back in business.

    I used TAudioConverter to decode uncompressed wav.

    I then analyzed the track order in Audacity. Center track is in Left Front position.

    I then used AVANTI - FFmpeg/Avisynth GUI's built-in Audio channel mapper, and then re-encoded back to AC3.

    Click image for larger version

Name:	Re-mapped.jpg
Views:	1983
Size:	52.8 KB
ID:	30084

    I then used mkvmerge GUI to mux the new AC3 5.1 audio track. All looks good.

    I uploaded the re-mapped AC3 to Google Drive Link
    Quote Quote  
  7. Originally Posted by Acesn8s View Post
    the OP very clearly said he converted AAC to AC3 with yamb, did he not ??
    Yes, and you also said "I always see these poor sods using Mp4 proggys to encode Dolby digital", but that doesn't give YAMB the ability to convert audio either.

    Originally Posted by Acesn8s View Post
    and yes it can extract audio to other formats, but imho isn't no where near qualified to do so.
    i would extract the audio to a wav file and let eac3to map the channels correctly. the only difference in the channel mapping from AAC to AC3 is 1 channel (the center) should not start first like the AAC channel mapping. once the OP gets one audio stream sorted, the rest should be easy.
    YAMB can't extract audio "to other formats" as far as I'm aware. If it can I'd like to learn how.
    I think you'll find there's no way to automatically fix it with eac3to or any other program. The channel mapping doesn't match the actual channel order. You'd need to specify a new channel mapping in the eac3to command line when extracting. eac3to has no way of knowing the left channel actually contains the centre channel audio. If there was a way to know that when extracting then obviously there'd be a way to know that when decoding and therefore there'd be no problem.

    It doesn't matter what channel mapping the various formats use. Audio is pretty much always remapped to the wav channel layout when it's decoded as a wave file. The encoders all expect to be fed the default wav channel mapping and they remap the channels to the appropriate order when encoding (some let you change/specify a mapping but it'd require doing so via the command line). The wav channel mapping is different to both AC3 and AAC.

    Anyway, WILDSTYL seems to have found a program that makes it easy. I assume it'll remap "on the fly" so there's no need to decode to wave file first. Re-mapping with ffdshow would have done the same thing, but AVANTI looks easier to use given it doesn't rely on the ability to decode via directshow. I might check it out myself later.

    I'm still wondering if there's a way to extract the audio and change the data in the audio stream so the correct channel mapping is used without needing to re-encode it, but I haven't been able to find a way to do it. Although that'd probably result in a non-standard channel mapping and I don't know if that'd be likely to cause playback problems. I can't imagine why it should, but I haven't found a way to do it anyway.
    Last edited by hello_hello; 7th Feb 2015 at 19:12.
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Ffmpeg.

    Scott
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!