FAQ  •  Register  •  Login

Problem playing AAC on old yamaha Amp

<<

FishHo

Serviio newbie

Posts: 11

Joined: Mon Nov 28, 2011 10:21 am

Post Mon Nov 28, 2011 12:29 pm

Problem playing AAC on old yamaha Amp

Hi All

After much trial and error , and reading other forums, my Yamaha Amp cant handle AVC/AAC in an MP4. It only plays it as two channel stereo. Sounds fine and with the inbuilt effects I get a quite reasonable fake 5.1

Doesn't matter if the mp4 is on a USB or DLNA.

The DLNA player is a Samsung BD 5300 and i'm useing the Samsung C/D player profile. The info from the player correctly determins that the Audio is 5.1 AAC so Serviio is working fine. All other files are fine and no other formats have any problems .....works great.

Since this will be a permanent solution I thought about modifying the MP4 section to transcode all *.MP4 from AAC 5.1 to AC3 5.1 in the profile. As per.

<Matches container="mp4" aCodec="ac3" />

And force it to transcode. Good news is that the receiver now sees 5 channels but ...... It sounds like they are playing in a trash can. Truely awfull. It's tinny and all distorted. I tried useing the latest FFMPEG build to convet it manually "-vcodec copy -acodec ac3 etc" and is exactly the same sounds awful.
Again doesn't matter if the mp4 is on a USB or DLNA.

I used Handbrake to convert the files to MKV and the force ac3 passthrough and that works really well.

Since I dont plan on changing the Amp any time soon , do I have to transcode all the MP4's using handbrake of can this be accomodated inthe profile.

Video fileinfo.

General
Complete name : C:\Users\Public\Videos\Drama Films\Cowboys\Cowboys.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 2.19 GiB
Duration : 2h 15mn
Overall bit rate mode : Variable
Overall bit rate : 2 315 Kbps
Encoded date : UTC 2011-11-21 16:25:55
Tagged date : UTC 2011-11-21 16:25:55

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 2h 15mn
Bit rate : 1 992 Kbps
Maximum bit rate : 17.9 Mbps
Width : 1 280 pixels
Height : 528 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.123
Stream size : 1.88 GiB (86%)
Writing library : x264 core 119 r2106 07efeb4
Encoding settings : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=1992 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=50000 / vbv_bufsize=50000 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2011-11-21 16:25:55
Tagged date : UTC 2011-11-21 16:28:14

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 2h 15mn
Bit rate mode : Variable
Bit rate : 320 Kbps
Maximum bit rate : 338 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 309 MiB (14%)
Language : English
Encoded date : UTC 2011-11-21 16:27:39
Tagged date : UTC 2011-11-21 16:28:14

----------------------------------------------

ffmpeg.exe -i "C:\Users\Public\Videos\Drama Films\Cowboys\Cowboys.mp4"
ffmpeg version N-35057-g2c44aed, Copyright (c) 2000-2011 the FFmpeg developers
built on Nov 21 2011 02:41:21 with gcc 4.6.2
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libope
ncore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --en
able-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
libavutil 51. 26. 0 / 51. 26. 0
libavcodec 53. 36. 0 / 53. 36. 0
libavformat 53. 21. 0 / 53. 21. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 49. 0 / 2. 49. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Public\Videos\Drama Films\Cowb
oys\Cowboys.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
creation_time : 2011-11-21 16:25:55
Duration: 02:15:13.47, start: 0.000000, bitrate: 2314 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x528,
1990 kb/s, 23.98 fps, 23.98 tbr, 96k tbn, 47.95 tbc
Metadata:
creation_time : 2011-11-21 16:25:55
handler_name :
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, s16, 319 kb/s
Metadata:
creation_time : 2011-11-21 16:27:39
handler_name : GPAC ISO Audio Handler
At least one output file must be specified
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Nov 28, 2011 12:44 pm

Re: Problem playing AAC on old yamaha Amp

try forcing higher bitrate with -ab parameter in FFmpeg
<<

FishHo

Serviio newbie

Posts: 11

Joined: Mon Nov 28, 2011 10:21 am

Post Tue Nov 29, 2011 12:02 pm

Re: Problem playing AAC on old yamaha Amp

Hi Zip

Well this is what I set up. I tried this on 5 MP4 files from different sources all off them AVC and AAC at 720p.

ffmpeg.exe -i "Cowboys.mp4" -vcodec copy -acodec ac3 -ar 48000 -ab 640k -ac 6 cowboys_ac3.mp4 and we got my crappy 5 channel dustbin audio.

Tried a few experiments..

Turned off transcoding and video was fine , AAC audio was downmixed to stereo and AC3 wouldn't play. Kind of what I expected.

Tried a ahemmm "competitors" product , Mezzmo and got exactly the same results decent 2 channel AAC and crappy 5.1 AC3

The strage part is that I use handbrake to convert into an MKV with AC3 passthrough it all works fine and DivX AC3 5.1 all works fine so I'm wondering if its the MP4 container thats stuffing me up.

Interestingly , when i get my 5 channel crappy audio , FF doesn't work and the length of the film shows as running for over 5000 minutes or some other random number ???

I'm absolutly convinced my amp is the root of all evil but was hoping to transcode my way round it useing 5.1 AC3 on the fly but I'm buggered if I can work out why it won't work in an MP4.

PS you need a smilie for "Bangs head against wall "
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Nov 29, 2011 4:17 pm

Re: Problem playing AAC on old yamaha Amp

try to transcode to mpegts. what does MediaInfo tell you about the bitrate of the resulting file?
<<

FishHo

Serviio newbie

Posts: 11

Joined: Mon Nov 28, 2011 10:21 am

Post Wed Nov 30, 2011 11:40 am

Re: Problem playing AAC on old yamaha Amp

Found the problem :D :D :D

I did what you suggested about bitrates and got the same results.. good 2 channel and crappy 5 channel.

-vcodec mpeg2video -b 4000000 -acodec copy -f mpegts output-mpeg2video.m2ts > 2 Channel

-vcodec mpeg2video -b 4000000 -acodec ac3 -ac 6 -ar 48000 -ab 640k -f mpegts mpeg2video-ac3.m2ts > naff 5 channel.

Did a lot more searching and installed Avanti which allowed me to reconfigure different options and play around.

Kept all the video options as source and packaged into an MP4 , just changing the audio options. Nothing seemed to work untill I tried the AC3 Fixed audio codec. That nailed it. Went back to dos an tried ..

-vcodec mpeg2video -b 4000000 -ac 6 -ar 48000 -acodec ac3_fixed -ab 640k -f mpegts mpeg2video-ac3-fixed.m2ts :D Audio quality is fantastic. Full 5.1 and it sounds better than any other 5.1 stuff I have tried.

Messed about with the -channel_coupling option which is related to floating point maths but didn't help eiher way.

So the ffmpeg - i outputs are .. rubbish first..

Input #0, mpegts, from 'mpeg2video-ac3.m2ts':
Duration: 00:01:50.62, start: 1.400000, bitrate: 5133 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1280x528 [SAR 1:1 DAR 80:33], 104857 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0x101](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1
(side), s16, 640 kb/s

And the good one

Input #0, mpegts, from 'mpeg2video-ac3_fixed.m2ts':
Duration: 00:02:12.64, start: 1.400000, bitrate: 5140 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1280x528 [SAR 1:1 DAR 80:33], 104857 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Stream #0:1[0x101](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1
(side), s16, 640 kb/s

No difference what-so-ever that I can see. Actually I cant see why the info would show any difference, its showing the result , not the working out. I think I read somewhere that the "S16" is a computation flag but can't remember where.

In short I don't know if its a bug or an undocumented feature. I imagine most AVC\AAC Blu Ray rips are going to come from disreputable sources. If it plays as a good stereo then most people wouldn't even notice or write it off as bad encoding. If it plays as 5.1 all well and good. As I said earlier I still suspect my amp is involved but how its related I dont have a clue. I'm now more inclined to say its a bug in FFMPEG but without some corrobeoration I cant go any furthur.

A.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Nov 30, 2011 1:15 pm

Re: Problem playing AAC on old yamaha Amp

Interesting, I didn't know about this... I might add an option to overwrite the default ac3 encoder with ac3_fixed.
<<

Illico

User avatar

DLNA master

Posts: 4646

Joined: Fri Jul 23, 2010 8:08 am

Location: France

Post Wed Nov 30, 2011 1:19 pm

Re: Problem playing AAC on old yamaha Amp

ffmpeg documentation
AC-3 audio encoders.
These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as the undocumented RealAudio 3 (a.k.a. dnet).
The ac3 encoder uses floating-point math, while the ac3_fixed encoder only uses fixed-point integer math. This does not mean that one is always faster, just that one or the other may be better suited to a particular system. The floating-point encoder will generally produce better quality audio for a given bitrate. The ac3_fixed encoder is not the default codec for any of the output formats, so it must be specified explicitly using the option -acodec ac3_fixed in order to use it.

Zip, do you think that should be a new output format option?

Do you try another -ab 640k values : 256, 384 ?
Illico
Sony 2010 KDL-46EX501 | BDP-S373 | SMP-N100 | Windows 8-i7 | Network DD HD-CE1.5TLU2 | Livebox2-UHD86 | ServiiDroid | ServiiGo | BubbleUPnP
Serviio beta tester - Moderator
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Nov 30, 2011 4:09 pm

Re: Problem playing AAC on old yamaha Amp

i think I'll just add a switch, default to ac3. Might be device based in this case, but in future more FFmpeg based / PC based ?
<<

FishHo

Serviio newbie

Posts: 11

Joined: Mon Nov 28, 2011 10:21 am

Post Wed Nov 30, 2011 6:35 pm

Re: Problem playing AAC on old yamaha Amp

Floating point math seems to have been added fairly recently. I'll swap out the exe for an old version and see if its a regression issue.

I'm begining sense a disturbance in the force...

viewtopic.php?f=5&t=365&p=2033&hilit=aac+stereo#p2033

viewtopic.php?f=10&t=1381&p=6734&hilit=aac+stereo#p6734

and elsewhere ....

http://forum.conceiva.com/showthread.ph ... r-HT-C6500

http://www.hifivision.com/blu-ray-dvd-p ... avi-2.html

It seems this may be a Samsung issue rather that a transcoding issue. One poster notes that in his testing AAC is only 2 channel , not sure how that works as I thought AAC was a blu-ray default , perhaps its only 2 channel from external sources. That would explain why Stereo AAC sounds reasonably good as its being down-mixed deliberatly. DRM issues ??
<<

FishHo

Serviio newbie

Posts: 11

Joined: Mon Nov 28, 2011 10:21 am

Post Thu Dec 01, 2011 9:05 am

Re: Problem playing AAC on old yamaha Amp

Ok so I've been playing all day, really should have been working but you know how it goes :lol:

I wanted a proerly mastered AVC/AAC 5.1 clip , not that my files were not properly constructed but you can never be quite sure. Found a few excellent resource for Dolby/DTS clips

http://www.digital-digest.com/movies/mo ... type=dolby
http://www.demo-world.eu/trailers/

But the most useful was

http://www.h264info.com/clips.html

Right at the bottom is an MP4 5.1 AVC/AAC 1080p trailer from 'I am legend' for bluray. I think its the only one of its kind on the interent. When I loaded it up , sure enough downmixed to stereo. What I did notice is that all the AAC clips I could legitimatly get were all 2 channel. All the Dolby trailers are either 6 channel ac3 , or 2 channel AAC in either VOB or MP4 formats. Likewise for the studio trailers.

I'm seriously begining to wonder if AAC 5.1 on external formats is being deliberatly downmixed or "not supported" by Samsung.
<<

FishHo

Serviio newbie

Posts: 11

Joined: Mon Nov 28, 2011 10:21 am

Post Thu Dec 01, 2011 11:38 am

Re: Problem playing AAC on old yamaha Amp

FFMPEG regresion test.

1) Uninstall Servio Completely
2) Reinstall
3) Add line <Matches container="mp4" aCodec="aac" /> to <!-- transcode H264 MP4 files with LPCM audio --> section in Samsung C Series section
4) Restart services
5) Play 'I am legend' for bluray from previous post


Install FFmpeg version SVN-r15216 > wont play not supported file.

Install FFmpeg version SVN-r18709 > plays AAC in 5.1 :D

Install Servio supplied ffmpeg version N-31480 > > plays AAC in 5.1 WTF !!!

scratch head alot :shock:

Install latest ffmpeg version N-35057 > buzzes like crap in AAC 5.1 :o

So I've got my head around it now. I took the latest FFMPEG build and copied it to my test films folder and manually encoded the ts file manually. IIRC I think I also copied it into the \servio\lib folder so I doomed my application testing early on in the piece.

Conclusions...
1) What I discovered about the fixed v. float still stands though,
N-35057 is "busted" using default options unless -acodec ac3_fixed option is added.
2) The display time is screwed up, shows as a runtime of 578 hours 42 mintes in both N-35057 and Serviio's N-31480. To resolve it, it probably needs the acodec ac3_fixed option.
3)In the info panel the option to jump ahead to a specific time is missing in both N-35057 and Serviio's N-31480. To resolve it, it probably needs the -acodec ac3_fixed option.

Sorry , ran out of time and off to bed.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Dec 02, 2011 10:30 am

Re: Problem playing AAC on old yamaha Amp

good find. I'll provide the latest FFmpeg for 0.6.1 so I hope it'll be fixed by then.
<<

ChrisP1

Serviio newbie

Posts: 11

Joined: Wed Dec 28, 2011 12:13 am

Post Sun Jan 01, 2012 5:59 pm

Re: Problem playing AAC on old yamaha Amp

I also have this problem on the latest 0.6.1 build also with a Yamaha DSP-AX757 amplifier and Sony BDP-480 render device. I change my config to transcode all aac into ac3 which works well. Not sure if aac should be supported by the amp or not.

  Code:
            <Video targetContainer="mpegts" targetACodec="ac3" aBitrate="320">
                <!-- FFmpeg cannot currently remux dts audio properly so it must be transcoded, but all other audio is left alone -->
                <Matches container="matroska" aCodec="dca" />
                <Matches container="ogg" vCodec="mpeg4" />
                <!-- 5.1 does not seem to play correctly in aac convert to DolbyDigital -->
                <Matches container="matroska" aCodec="aac" />
                <Matches container="mp4" aCodec="aac" />
                <Matches container="mpegts" aCodec="aac" />
            </Video>
<<

OldManPeabody

User avatar

Serviio newbie

Posts: 3

Joined: Sun Jan 02, 2011 6:57 am

Post Thu Mar 01, 2012 8:44 pm

Re: Problem playing AAC on old yamaha Amp

I had exactly the same problem - Serviio showing me the video file was 5.1 audio but my receiver was only spitting out 2 channels. I'm guessing the receiver was doing the downmix... My guess is that since the receiver is so old (~10 years) it doesn't know what to do with an AAC file.

The solution proposed by ChrisP1 fixed this and it sounds absolutely awesome. Thanks! :D

Yamaha RX V596
Sony BDP S370
Mac 10.6.8 | Serviio 6.2 | Sony BDP-S370 | Yamaha RX V596 | LG 50PX950
<<

executioner

Serviio newbie

Posts: 3

Joined: Fri May 25, 2012 12:16 am

Post Fri May 25, 2012 2:07 am

Re: Problem playing AAC on old yamaha Amp

ChrisP1 wrote:I also have this problem on the latest 0.6.1 build also with a Yamaha DSP-AX757 amplifier and Sony BDP-480 render device. I change my config to transcode all aac into ac3 which works well. Not sure if aac should be supported by the amp or not.

  Code:
            <Video targetContainer="mpegts" targetACodec="ac3" aBitrate="320">
                <!-- FFmpeg cannot currently remux dts audio properly so it must be transcoded, but all other audio is left alone -->
                <Matches container="matroska" aCodec="dca" />
                <Matches container="ogg" vCodec="mpeg4" />
                <!-- 5.1 does not seem to play correctly in aac convert to DolbyDigital -->
                <Matches container="matroska" aCodec="aac" />
                <Matches container="mp4" aCodec="aac" />
                <Matches container="mpegts" aCodec="aac" />
            </Video>


Not many amps decode aac AFAIK, had same problem with my onkyo using a WDTV Live which does not trancode multichannel aac to multichannel pcm, it only downmixes it to pcm stereo.

Using your post I included these lines on my WDTV Live profile:

<Matches container="mp4" aCodec="aac" />
<Matches container="matroska" aCodec="aac" />

and now at last I have multichannel from my movies with aac audio using serviio!!!! :D This should be default on profile!! If you use a PS3 or PC as a player, they transcode easily aac 5.1 to lpcm 5.1 for your receiver just so you know.

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 17 guests

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