View Full Version : [APPLE TV] M4V AC3/AAC Issue
tuckbodi
2008-10-09, 21:11
I've searched these forums and although I've seen some postings with some issues with AC3 I could not find anything pertaining to AC3 and the AppleTV.
Running my movies on my AppleTV through say ATVFiles, my Handbraked files play fine. Movies with an AC3 track switch my 10 yr old Yamaha receiver (hooked up through toslink cable to ATV) into Dolby Digital surround sound as soon as they start. Yet when I try to use XBMC on my AppleTV all I get is stereo sound (or no sound as detailed below).
In System/Audio Hardware I've made sure the Audio Output is set to Digital and I have both Dolby Digital (AC3) Capable Receiver and DTS Capable Receiver selected (I've also tried both separately). Audio Output device is set to Built-in Line Output (only option).
When a movie starts, and I see/hear no surround sound) I pull up the Audio setting and while the Audio Output is set to Digital the Audio Stream is set to English Stereo (w/stereo sound coming through my speakers). If I change this setting to English-AC3 5.1 I then get no sound (and my stereo indicator doesn't change either).
Other notes:
- These movies are ripped with MTR then encoded with Handbrake with the AppleTV preset including AC3 + AAC audio.
- As I said previously these play fine on both my AppleTV through my stereo in AC3 and on my MBP in stereo AAC.
Thoughts? Ideas? Thx
turbinez
2008-10-09, 21:21
i get the same problem too... no sound, and i double checked my settings... i am using a 720p mkv file with AAC+AC3
Please post the log file located at ~/Library/Logs/xbmc.log to pastebin.com and provide a link here.
tuckbodi
2008-10-09, 22:00
http://pastebin.com/m12758444
tuckbodi
2008-10-14, 00:16
Well, haven't heard anything so I did some more digging around and stumbled on a thread on the Plex forums. Sounds like they're saying it might be a receiver issue, which I find strange as some people are able to play movies with AC3 through VLC (on a Mac) but not through Plex. Kinda like me as I'm able to get AC3 surround sound playing my movies through Sapphire and ATVFiles on my ATV but not through XBMC. So I know AC3 is doable on my ATV & receiver, it's why not with XBMC??
http://forums.plexapp.com/index.php?showtopic=1128&hl=ac3
On a side note, I believe both Sapphire and ATVFiles use QuickTime to play videos and they also use the Perian plugin. They both also have a setting you have to check to enable AC3 Passthrough within their apps.
Has anybody else had success playing a Handbraked AppleTV preset (AC3+AAC) file and get 5.1 Dolby Digital Surround Sound through their receiver? Or is this an universal issue with these files?
It looks like there's definitely an issue passing through AC3/DTS specifically on the Apple TV. The issue is not related to your receiver. It needs further investigation. Most likely related to how PortAudio handles ATV's audio device.
Gamester17
2008-10-15, 20:56
Please submit a new ticket on trac for the "[APPLE TV] AC3/DTS Digital Audio Pass-through to SP/DIF" issue http://xbmc.org/trac
http://xbmc.org/wiki/index.php?title=HOW-TO_Submit_a_Proper_Bug_Report
tuckbodi
2008-10-16, 03:32
Done
http://xbmc.org/trac/ticket/5188
matthoffman
2008-10-17, 01:40
I believe the decoding of AC3 does infact work
The issue lies in the fact that the AAC audio is track 1 and AC3 is track 2. XBMC by default appears to be selecting track 1. Which is of course the AAC 2 channel file. We need XBMC to auto detect the AC3 file (track 2) if the Dolby Digital passthrough mode is enabled in the settings for xbmc. I have messed around with this alot and I see no way of getting XBMC by default to use track 2 without either manually selecting it while watching a movie or to reencode all my files and not have the AAC file be part of my m4v file. Or if you reencode the m4v file make sure the AC3 is track 1 and AAC is track 2. I have some movies for some reason have the AC3 as track 1 and I can tell on my reciever that its decoding the AC3 track. For all other movies if I manually select track 2 my reciever see's the AC3 track and decodes it just fine. Hope my findings will help in solving this huge problem.
matt: I have tried to encode with just ac3 audio using Handbrake 0.9.2 for windows. (resulting in an mp4 file) using the Apple TV defaults + 2 pass encoding.
I have also tried encoding with Apple TV defaults (AAC + AC3 in an m4v container).
I am getting similar results to tuck. AAC track will play fine (xbmc labels it as stereo). AC3 track plays video fine, but audio is silent. Tried Digital and analog outputs with no luck.
AC3 in an .avi container plays fine.
Any other information i can provide that may help? (Using latest version of t3ch and mediastream 10-13-08)
matthoffman
2008-10-19, 19:15
igeekus:
Have you verified that you have a good fiber optic cable connected to your receiver? Have you tested it with a DVD player? What reciever are you using to decode the audio?
I myself have actually broke the fiber cable by accidently bending it to much.
That is one thing I would try. If it works with a DVD player then I guess there is something wrong with your particurlar amp recognizing the signal. From my understanding the audio coming from the fiber optic port is a RAW AC3 signal which any reciever today should be able to decode with no problems at all.
Are their other users on here that are having the same problem as you?
Does anybody else have problems decoding AC3 from a movie when the settings on the apple tv have digital out enabled?
matthoffman
2008-10-19, 19:20
Additionally, what version of XBMC are you using?
I see you put (Using latest version of t3ch and mediastream 10-13-08)
at the end of you reply.
Are you using xbmc beta 2 atlantis on an apple tv?
I think the t3ch versions were only released for the original xbox.
Sorry... I should have been more specific....
I am currently running xbmc Atlantis Beta 2 on an original xbox connected to a standard def tv by s-video. Audio is connected to a panasonic all-in-one system via optical cable (I can get model numbers if you think that would help).
Because of this, combined with tuck's issue, I think it either has something to do with handbrake's encoding of ac3 in an mp4 or m4v container or the xbmc decoding ac3 in the mp4/m4v container properly.
We are running similar builds on different hardware. Plus if I play an avi file with ac3 5.1, it registers and plays fine. That pretty much takes the hardware out of the equation.
Am I allowed to just rename .m4v into .avi? or I could try converting it using Super? If so I could try that and see if the ac3 information is there. Not sure what the best way to help is, but let me know if you have any other questions or suggestions :)
Thanks!!!
matthoffman
2008-10-20, 00:40
Why are you posting this in the appletv/OSX Forum?
Should this not be posted in the original Xbox Forum?
The .avi and .m4v containers can't be interchanged. If you rename the file it will not work correctly. I have no idea why it is not working for you on the original xbox. I only have an apple TV and everything is working fine for me except for the fact that I have to select the AC3 track in order to get the surround sound working. Additionally, handbrake does not "encode" AC3 it takes the raw audio right from the DVD and puts in in the M4v file. Also XBMC does not decode the AC3 audio it passes the RAW audio from the m4v file and then the reciever does the decoding for you. Somebody in the xbmc xbox forum may be having issues that you are having. Maybe it is a bug in the xbox version of the software. I am not really sure. A developer may be able to tell you more. But you are correct in stating that if the 5.1 audio from an avi works then its not your hardware.
You may try and tweak your settings in handbrake and not use the default appletv settings. I know if you search on here or the handbrake forums you can find the recommended settings for use on the original xbox. The original xbox does not have as powerfull hardware as the appletv. If you use the appletv preset you may run into problems with frames skipping in your movies, etc.
Also, why don't you just use the avi container since its working for you? the m4v file contaner was specifically made for the appletv. (pretty much the same as the .mp4 extension).
Best option if I where you, is to use the .mkv extension because that allows for chapter support. Don't know if the chapters will work in xbmc but the mkv format allows you to do chapters which the .avi container does not. I think you can use .mkv with ac3 audio in handbrake.
Why are you posting this in the appletv/OSX Forum?
Should this not be posted in the original Xbox Forum?
I am posting this here because tuckbodi appeared to be having the exact same issue on appletv hardware that I was having on xbox hardware.
I was just trying to help.
I'm researching this issue and encoding in m4v because I just purchased an appletv. If it was just an issue in the xbox version of the software, why is tuck having the same issue? Anyway, I thought the handbrake settings might be the issue also, but the video isn't skipping at all and I thought that might be the first to go? I dunno... it's wacky.
Thanks for the suggestion with mkv. Hopefully someone will come up with a container that takes the best of all worlds (for support, chapters, audio, etc) :)
Okay... I'm pretty sure the problem is mplayer....
Oh a whim I decided to take one my m4v's and play it using dvdplayer (context menu on item (title button on xbox remote)=> play using => DVDPLayer). stereo comes up but if I switch the audio to the second track, it displays as 5.1... and the receiver registers it as 5.1 audio....
sounds great too...
Hope this helps? :)
einhänder
2008-10-31, 04:03
from my experience it is a mplayer issue.
a few hours ago i tried to playback some dvd backups done via handbrake (mp4/h264/ac3/avg. bitrate 2500 kbps).
either playing these backups with xbmc's (atlantis beta2) mplayer on my xbox and osx or with a standalone mplayer (latest version) on osx results in the same problem: no sound but only video. mplayer doesn't show both of my audiostreams, only one of them is recognized as a stereo-stream, although both of them are ac3 (two languages).
when i'm playing the mp4s on my xbox or via osx by choosing the dvdplayer, everything is just fine. i increased the local cache to 4096mb to avoid lags.
from my experience it is a mplayer issue.
a few hours ago i tried to playback some dvd backups done via handbrake (mp4/h264/ac3/avg. bitrate 2500 kbps).
either playing these backups with xbmc's (atlantis beta2) mplayer on my xbox and osx or with a standalone mplayer (latest version) on osx results in the same problem: no sound but only video. mplayer doesn't show both of my audiostreams, only one of them is recognized as a stereo-stream, although both of them are ac3 (two languages).
when i'm playing the mp4s on my xbox or via osx by choosing the dvdplayer, everything is just fine. i increased the local cache to 4096mb to avoid lags.
get http://atv-xbmc-launcher.googlecode.com/svn/branches/temp/xbmc_remote/xbmc_remote
run it from your osx box, might have to chmod +x it..
./xbmc_remote <appletv ip> 9777
this directs keyboard entry from your OSX box to your appletv when the xbmc_remote sdl window is in front. Also need to enable remote events on the AppleTV in settings - network.
when playing a video, type "o", this shows the audio/video/cpu info.
looking at the audio will show which codec is being used.
ravidium
2008-11-11, 23:30
get http://atv-xbmc-launcher.googlecode.com/svn/branches/temp/xbmc_remote/xbmc_remote
run it from your osx box, might have to chmod +x it..
./xbmc_remote <appletv ip> 9777
this directs keyboard entry from your OSX box to your appletv when the xbmc_remote sdl window is in front. Also need to enable remote events on the AppleTV in settings - network.
when playing a video, type "o", this shows the audio/video/cpu info.
looking at the audio will show which codec is being used.
when you say "run it" can you explain that for a newbie please..got the file..what do i open it with etc...terminal?
when you say "run it" can you explain that for a newbie please..got the file..what do i open it with etc...terminal?
xbmc_remote is a command-line program. You run it from the command-line. The osx terminal application gives you a command-line environment.
"sudo chmod +x xbmc_remote" is a set of command-line operations. "sudo" gives you privilege, "chmod +x" changes set the execution bit.
"man sudo"
"man chmod"
for more info.
"./xbmc_remote <appletv ip> 9777" is the command-line. Notice the "./" in front of xbmc_remote. That's important. Also <appletv ip> is the ip address of your apple tv.
So for mine it's "./xbmc_remote 192.168.2.88 9777"
"pwd" shows the working directory. "ls" lists the directory contents.
google "osx command-line" will have lots of links regarding command-line operations using osx.
ravidium
2008-11-12, 00:38
xbmc_remote is a command-line program. You run it from the command-line. The osx terminal application gives you a command-line environment.
"sudo chmod +x xbmc_remote" is a set of command-line operations. "sudo" gives you privilege, "chmod +x" changes set the execution bit.
"man sudo"
"man chmod"
for more info.
"./xbmc_remote <appletv ip> 9777" is the command-line. Notice the "./" in front of xbmc_remote. That's important. Also <appletv ip> is the ip address of your apple tv.
So for mine it's "./xbmc_remote 192.168.2.88 9777"
"pwd" shows the working directory. "ls" lists the directory contents.
google "osx command-line" will have lots of links regarding command-line operations using osx.
oh wow okay ill take a stab at it and let you know - thanks!
tuckbodi
2008-11-12, 04:51
Okay... I'm pretty sure the problem is mplayer....
Oh a whim I decided to take one my m4v's and play it using dvdplayer (context menu on item (title button on xbox remote)=> play using => DVDPLayer). stereo comes up but if I switch the audio to the second track, it displays as 5.1... and the receiver registers it as 5.1 audio....
sounds great too...
Hope this helps? :)
I thought the AppleTV video player was DVD Player and did not use mplayer?! Is this not the case? I could not find a setting anywhere to be able to switch them. Using xbmc_helper I verified I was using DVD Player. Another interesting observation was when I selected the 2nd track for AC3 xbmc_helper verified it was seeing AC3 but again, was not passing it through (was silent). When the first track was selected it showed it as stereo and I did have sound (albeit stereo sound through my receiver).
I believe the decoding of AC3 does infact work
The issue lies in the fact that the AAC audio is track 1 and AC3 is track 2. XBMC by default appears to be selecting track 1. Which is of course the AAC 2 channel file. We need XBMC to auto detect the AC3 file (track 2) if the Dolby Digital passthrough mode is enabled in the settings for xbmc. I have messed around with this alot and I see no way of getting XBMC by default to use track 2 without either manually selecting it while watching a movie or to reencode all my files and not have the AAC file be part of my m4v file. Or if you reencode the m4v file make sure the AC3 is track 1 and AAC is track 2. I have some movies for some reason have the AC3 as track 1 and I can tell on my reciever that its decoding the AC3 track. For all other movies if I manually select track 2 my reciever see's the AC3 track and decodes it just fine. Hope my findings will help in solving this huge problem.
I tried switching the tracks in Handbrake as you suggested and it didn't help. Still no sound/passthrough on the AC3 track (track 1). In fact, doing this also broke the AC3 when played through NitoTV (which is playing my other AC3 files just fine) so I can't recommend swapping the tracks.
tuckbodi
2008-12-11, 07:17
Trying not to let this subject die as XBMC is nearly unusable for me without AC-3. I ran across some info up on the AwkwardTV forums from one of the plugin devs and one of the guys who wrote Perian (for the Mac and AppleTV). Their comment about getting AC-3 working with the plugin, ATVFiles:
http://forum.awkwardtv.org/viewtopic.php?f=18&t=2111&start=50#p12986
"You need Perian (and A52Codec, which is bundled with it) installed for AC3 passthrough to work. The setting in ATVFiles (this is separate than the setting in the ATV software) needs to be enabled too. If that setting isn't enabled, A52Codec should be decoding it as stereo.
It's a hack though, as it puts the AC3 coding in the PCM output audio stream, and not all receivers support that."
But maybe more importantly here is some links to additional info from one of the Perian dev's on what is going on with AC-3 and Apple:
http://www.cod3r.com/2008/03/wheres-real-ac3-passthrough-on-the-mac/
http://www.cod3r.com/2008/02/the-correct-way-to-enable-ac3-passthrough-with-quicktime/
http://www.cod3r.com/2008/04/imited-real-ac3-passthrough/
http://www.cod3r.com/2008/06/ac3-passthrough-compatibility-matrix/
Granted, this is all with QuickTime but I thought it might shed some light on the subject.