FAQ  •  Register  •  Login

Problems with AAC 5.1

<<

JBF

Serviio newbie

Posts: 9

Joined: Mon Oct 22, 2012 9:21 pm

Post Fri Aug 23, 2013 1:45 pm

Problems with AAC 5.1

Hi all,

I have an MP4 file with two audio tracks, both AAC, one is 2 channel and the other is 5.1. I'm trying to play the video with 5.1 surround via my 2010 Bravia. Have played other files with AC3 and DTS 5.1 sound just fine.

Now I'm aware there is no mechanism to choose the second (5.1) audio track so I ran the file through mkvmerge to create an MKV containing just the video and 5.1 audio track. This still doesn't play back with surround sound.

I figured that perhaps the TV doesn't support 5.1 AAC audio so tried editing the profiles.xml file to contain the following, thinking it would transcode to AC3 but doesn't seem to work, it still won't play back with surround sound, in fact now it says 'temporarily cannot access the server':

  Code:
                        <!-- Remux h264 video + AC3/AAC audio to MPEG-TS stream without transcoding -->
                        <Video targetContainer="mpegts" forceInheritance="true">
                                <!-- <Matches container="mp4" vCodec="h264" aCodec="aac" /> -->
                                <Matches container="mp4" vCodec="h264" aCodec="ac3" />
                                <Matches container="3gp" vCodec="h264" aCodec="aac" />
                                <Matches container="3gp" vCodec="h264" aCodec="ac3" />   
                                <Matches container="matroska" vCodec="h264" aCodec="ac3" />
                        </Video>

                        <!-- Transcode AAC audio to AC3 -->
                        <Video targetContainer="mpegts" targetACodec="ac3" forceInheritance="true">
                                <!-- <Matches container="mp4" aCodec="aac" /> -->
                                <Matches container="matroska" aCodec="aac" />
                        </Video>



ffmpeg -i of the mkv shows this:

Stream #0:0: Video: h264 (High), yuv420p, 1920x800, SAR 1:1 DAR 12:5, 23.98 fps, 48 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(eng): Audio: aac, 48000 Hz, 5.1, s16 (default)

Any ideas what I'm doing wrong or what I need to do to get surround working for this file?
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Fri Aug 23, 2013 1:58 pm

Re: Problems with AAC 5.1

Could you check on serviio console that you don't enable "Stereo Downmix" box?
Delivery -> Transcoding tab -> Video settings -> Select Keep original
<<

JBF

Serviio newbie

Posts: 9

Joined: Mon Oct 22, 2012 9:21 pm

Post Fri Aug 23, 2013 6:08 pm

Re: Problems with AAC 5.1

Nope, it's on 'Keep Original'.
<<

JBF

Serviio newbie

Posts: 9

Joined: Mon Oct 22, 2012 9:21 pm

Post Fri Aug 23, 2013 6:54 pm

Re: Problems with AAC 5.1

This is ffmpeg -i output from the original mp4 file:

  Code:
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x800, 2223 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
    Metadata:
      creation_time   : 2012-12-02 05:24:01
      handler_name    : Video
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 84 kb/s
    Metadata:
      creation_time   : 2012-12-02 05:24:16
      handler_name    : GPAC ISO Audio Handler
    Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, s16, 226 kb/s
    Metadata:
      creation_time   : 2012-12-02 05:24:21
      handler_name    : GPAC ISO Audio Handler
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sat Aug 24, 2013 12:24 pm

Re: Problems with AAC 5.1

JBF wrote:This is ffmpeg -i output from the original mp4 file:


Could you try this command line , add the output.ts file to the library and check if its read?

ffmpeg -fflags +genpts -threads 2 -i INPUT.mkv -y -threads 2 -c:v copy -bsf:v h264_mp4toannexb -c:a copy -map 0:0 -map 0:2 -sn -f mpegts OUTPUT.ts
<<

JBF

Serviio newbie

Posts: 9

Joined: Mon Oct 22, 2012 9:21 pm

Post Sat Aug 24, 2013 1:00 pm

Re: Problems with AAC 5.1

I had to change it to:

ffmpeg -fflags +genpts -threads 2 -i INPUT.mkv -y -threads 2 -c:v copy -bsf:v h264_mp4toannexb -c:a copy -map 0:0 -map 0:1 -sn -f mpegts OUTPUT.ts

Because in the MKV input file there is only the one audio track. It built the output file, serviio will play it but still no surround sound :cry:
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sat Aug 24, 2013 2:21 pm

Re: Problems with AAC 5.1

I would like from original mp4 (mistake), so could you try with INPUT.mp4 file and map 0:2 ?
<<

JBF

Serviio newbie

Posts: 9

Joined: Mon Oct 22, 2012 9:21 pm

Post Sat Aug 24, 2013 2:31 pm

Re: Problems with AAC 5.1

Yep I was having a play around just now and tried that too with the same result.

I've decided that it doesn't seem serviio/ffmpeg are capable of 5.1 AAC -> AC3 conversion. I've just tested MP42MKVAC3 and it seems to do the job ok, then the output MKV file plays with surround via serviio. I was a bit concerend that hte channel mapping might not be correct given what I've been reading about AAC -> AC3 conversion but appears to be ok. Not really sure how to tell if it's 100% but front centre is in the correct position for sure.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Sat Aug 24, 2013 4:28 pm

Re: Problems with AAC 5.1

OK...do you see some message during the ffmpeg transcoding process, there were probably something that ffmpeg does not like on audio track?

Return to Sony

Who is online

Users browsing this forum: No registered users and 38 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.