Apple TV and 5.1 support - some definitive answers
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Hi numbers987654321,
TBH, I'd initially considered adding this for a future version, but the filesize (1gb for audio?!), due to the lack of an open-source Apple Lossless implementation, makes it a fairly low priority. Of course, this being open-source, you could always have a go at coding it yourself!
- maurj.
TBH, I'd initially considered adding this for a future version, but the filesize (1gb for audio?!), due to the lack of an open-source Apple Lossless implementation, makes it a fairly low priority. Of course, this being open-source, you could always have a go at coding it yourself!
- maurj.
-
- Posts: 18
- Joined: Sat Apr 14, 2007 5:34 am
Assuming I can get BeSweet up on OS X
If I can get a BeSweet module compiled and working on OS X, then maybe there could be a solution. Also, can Handbrake call Quicktime plugings? Can you have it pass something to the Apple Lossless plugin, or do you try to not do that type of thing? Might be a cool option to do dd-wav audio.
Re: So... Do you think this may make a future verson of HB?
I hope not. Or rather, I'd never want that. You'd be starting with lossy then converting to another lossy then converting back to another lossy stream. Just Say No™.numbers987654321 wrote: ... or if the hope is that Apple will somehow enable the AAC 5.1 to transcode on-the-fly to DD or DTS. ...
My own wet dream goes something like this: the unmodified AC-3 or DTS wedged into the .mp4 or .m4v container, doesn't interfere with metadata, playable with help from an enhanced Perian and a miracle from Cupertino.
Well, I have been ripping a bunch of movies with HB, and adding ddwav for audio for ATV, and there are a few things I have learned.maurj wrote:TBH, I'd initially considered adding this for a future version, but the filesize (1gb for audio?!), due to the lack of an open-source Apple Lossless implementation, makes it a fairly low priority. Of course, this being open-source, you could always have a go at coding it yourself!
- maurj.
1. There are many ac3 to dd-wav apps out there, like besweet, and headAC3he. The great thing about the latter, is that it does the conversion without transcoding, so its a lossless conversion. However, I have found at least ATV, or maybe its a limitation of DD-WAV, that DD-WAV only likes ac3 files mastered at 44.1 khz. If you use headAC3ch, since most or all of dvd ac3 streams are 48khz, head incorectly sets at 44.1 on output, and it plays slow, and you can't fix by adjusting headers. So the only way to get a valid DD-WAV file, is to use besweet, which transcodes and outputs a DD-WAV with 44.1khz.
2. Uncompressed DD-WAVs are unrecognized in ATV. So far, I have only seen them work with apple lossless.
3. The problem of audio sync comes in. I get around it, by using another pc program DGMPGDec. So what I do, is I use an app on the PC, called dvddecrypter to make a full disc video folder of the DVD on my server. I then start ripping with handbrake on this. I have always done this, because many newer dvds, handbrake can't handle, but dvddecrypter, gets em all. While handbrake is ripping, I do a quick open and save project in DGMPGDec, which saves the AC3 streams with a filename, that tells you the audio sync offset, like -177ms, or 0ms or whatever. I stop the process right away, I just want this setting. On my mac I use mplayer to dump ac3 file of the movie. Then I have to make a dd-wav on pc using besweet, and besweet has a field to enter delay value. This outputs a dd-wav, that will sync perfectly. I have tried on about 7 movies, all with diff values, and it works. Of course, I have to take the dd-wav and export from QTPRO as apple lossless. What a PITA, huh? But when you hear the full DD sound, you can't go back to DPLII, or stereo.
So to get this done in handbrake, either ffmpeg will have to output dd-wav, or besweet becomes crossplatform. And ffmpeg doesn't encode apple lossless, so don't know about that either.
I have no idea what the solution is, I love how simple HB made this for me in the past, but I hope apple comes out with some DD-Live solution from AAC 5.1.
We will see.
-
- Veteran User
- Posts: 680
- Joined: Tue Apr 24, 2007 12:36 pm
-
- Posts: 18
- Joined: Sat Apr 14, 2007 5:34 am
ac3enc
maurj-
I'm going to give it a shot and see what I come up with. Are there any issues in using pieces of ffmpeg within Handbrake?
I'm going to give it a shot and see what I come up with. Are there any issues in using pieces of ffmpeg within Handbrake?
Maybe this would be useful... someone ask him for his code.
http://craz.net/programs/itunes/alac.html
http://craz.net/programs/itunes/alac.html
AC3 using multiple tools
Process steps using HandBrake, mplayer, BeSweet, and Quicktime Pro (along with another sample AC3):
http://www.garcias.com/TheGarcias/Dad%2 ... 6FE4E.html
http://www.garcias.com/TheGarcias/Dad%2 ... 6FE4E.html
-
- Bright Spark User
- Posts: 183
- Joined: Wed Mar 14, 2007 1:49 pm
Re: AC3 using multiple tools
honestly you guys, why make the encode process such a pain? why not just hack the ATV to passthrough AC3?aswick wrote:Process steps using HandBrake, mplayer, BeSweet, and Quicktime Pro (along with another sample AC3):
http://www.garcias.com/TheGarcias/Dad%2 ... 6FE4E.html
mine works and i did not have to open the ATV, and i can use the original AC3 stream from my original DVD.
i dont understand why some are pursuing this, i believe it is easier to hack the atv to do passthrough then to encode 100+ movies with this process...
dont get me wrong, its cool that you guys have another solution, but i dont think processing and reprocessing the audio over and over is the right solution.
Since I played with passthrough, let me explain exactly how it works. There are two different ways that audio is passed over the optical link. The first is raw PCM (wav format) and the second is encoded audio (AC3 or DTS). In addition, the optical link supports a variety of data rates, which correspond to sample rates (ex, 32 KHz, 44.1Khz, 48KHz, etc) Encoded audio is passed in the following manner:
In addition, the sample rates must match. So, if you want to rip 48KHz audio (which means most DVDs), good luck. The ATV's default output is 44.1KHz, which means you are screwed unless you change it. It then means that you cannot play 44.1KHz AC3 files without changing it back. I have asked the author of ATVFiles to implement this piece and it is coming in version 0.3.
- The optical link is set at same samplerate as the decompressed encoded audio
- The audio frame is packaged in a way such that the data is presented in the correct order on the optical link (this means that little endian machines *cough* intel *cough* have to reverse the order of all pairs of bytes, so that when the hardware reverses it again, it will be in the correct order).
- The audio frame is preceded by a specific header which the audio decoder can identify and thus know that the data is encoded audio instead of PCM
- The rest of the duration of the audio frame is ignored and the next frame starts exactly where the previous frame's decompressed size would end
In addition, the sample rates must match. So, if you want to rip 48KHz audio (which means most DVDs), good luck. The ATV's default output is 44.1KHz, which means you are screwed unless you change it. It then means that you cannot play 44.1KHz AC3 files without changing it back. I have asked the author of ATVFiles to implement this piece and it is coming in version 0.3.
Re: AC3 using multiple tools
aswick wrote:Process steps using HandBrake, mplayer, BeSweet, and Quicktime Pro (along with another sample AC3):
http://www.garcias.com/TheGarcias/Dad%2 ... 6FE4E.html
http://www.megaupload.com/?d=7V2UYBR1
THX 5.1 demo works great, on Apple Tv. Audio passes through and i get the blue light on my receiver that it is 5.1 audio.
!!Now some one needs to automate this process!!
Re: AC3 using multiple tools
For me, and the garcias.com page is mine, I think the best solution is going to be one without altering the ATV. It is a pain to do at the moment, but the reason I posted the steps, is to prove this is a viable method, and hopefully others can help automating this into a simple step, like HB does with DPLII. AVI is a ancient technology, and even though you can hack the ATV to play them with ATVFiles, its not the direction I personally want to go, but just my opinion. And as gbooker mentioned, almost all dvds are mastered at 48khz, and so the solution I posted on my site gets around that, providing the best working solution. I have ripped many movies, and works very well.loyalty_anchored wrote: honestly you guys, why make the encode process such a pain? why not just hack the ATV to passthrough AC3?
mine works and i did not have to open the ATV, and i can use the original AC3 stream from my original DVD.
i dont understand why some are pursuing this, i believe it is easier to hack the atv to do passthrough then to encode 100+ movies with this process...
dont get me wrong, its cool that you guys have another solution, but i dont think processing and reprocessing the audio over and over is the right solution.
-
- Bright Spark User
- Posts: 183
- Joined: Wed Mar 14, 2007 1:49 pm
Re: AC3 using multiple tools
how about MKV? the support is semi-there already, and they are working to improve it. i have no plans on using AVI in any way, shape or form.ragboy wrote:AVI is a ancient technology, and even though you can hack the ATV to play them with ATVFiles, its not the direction I personally want to go, but just my opinion. And as gbooker mentioned, almost all dvds are mastered at 48khz, and so the solution I posted on my site gets around that, providing the best working solution. I have ripped many movies, and works very well.
i guess i have to agree though, it is nice for some to have a solution that works with stock ATV. i would never butcher my audio stream that way! i would rather sell my ATV and just build a small media center PC of some sort. but that is just personal.
so all in all, i suppose the more options, the better in this case.
EDIT:
i was thinking about this further, how large do you find the DDWAV file to be for a normal DVD movie ? i have a feeling the space requirements to rip a movie with this method may be a pretty heavy limitation.
Re: AC3 using multiple tools
My goal is to only use the MP4 container, and since I don't think it will ever be possible to put a raw ac3 stream in an mp4 container like you do in AVI, the only other solutions are AAC, or ALAC.loyalty_anchored wrote: how about MKV? the support is semi-there already, and they are working to improve it. i have no plans on using AVI in any way, shape or form.
i guess i have to agree though, it is nice for some to have a solution that works with stock ATV. i would never butcher my audio stream that way! i would rather sell my ATV and just build a small media center PC of some sort. but that is just personal.
so all in all, i suppose the more options, the better in this case.
EDIT:
i was thinking about this further, how large do you find the DDWAV file to be for a normal DVD movie ? i have a feeling the space requirements to rip a movie with this method may be a pretty heavy limitation.
For the record, I am a developer, and a MS partner, so have all MS operating systems laying around. And previous to my apple tv, I had a Media Center 2005, hacked to play dts and ac3 passthrough from AVIs. I have a 1.2 Terrabyte server in my basement, and ripped with HB to my library. But I hated the MS interface, and at the end of the day, its still just a computer, and the way I had it setup is just a hackers delight, and would never go mainstream.
I love the apple TV. I luv the interface, the streaming right from my itunes, plays my thousands of protected files, without me having to break drm.
On MS, you cannot scan through an AVI very well while watching, but on my ATV, I can scan one of my MP4/DD-Wav files with no problem. And if someone can get the DD issue solved, either automating my solution, or another, I think it could easily become something anyone can do.
As far as size, I just ripped a movie, man of the year, about 1:54 hours. I ripped using 2pass 1600kbps DPLII, and the resulting file is 1.39 Gigs. If I pull the vid, just the vid is 1.29Gigs. The raw AC3 file is almost 400 megs. So this would have made a AVI of about 1.7 Gigs. When I use besweet to make the dd-wav file, it ends up about 1.2 gigs. Then I use ALAC, and it comes down to 850 megs. Resulting mp4 just over 2 gigs. So it is bigger, but only about ~400 megs.
Re: AC3 using multiple tools
I have my appletv hacked and ATVFiles up and working, but when i play handbraked AVI h.264 with AC3 passthrough it still downmixes to stereo. How are you getting this to work?loyalty_anchored wrote:mine works and i did not have to open the ATV, and i can use the original AC3 stream from my original DVD.
i dont understand why some are pursuing this, i believe it is easier to hack the atv to do passthrough then to encode 100+ movies with this process...
-
- Bright Spark User
- Posts: 183
- Joined: Wed Mar 14, 2007 1:49 pm
Re: AC3 using multiple tools
i am using the latest ATVfiles test build from a few days ago... not sure when it will officially be available, but it should not be long.Anamonde wrote:I have my appletv hacked and ATVFiles up and working, but when i play handbraked AVI h.264 with AC3 passthrough it still downmixes to stereo. How are you getting this to work?loyalty_anchored wrote:mine works and i did not have to open the ATV, and i can use the original AC3 stream from my original DVD.
i dont understand why some are pursuing this, i believe it is easier to hack the atv to do passthrough then to encode 100+ movies with this process...
@ragboy:
i am not whilling to give audio 800MB of space, but this is again my own personal preference, i feel it is not acceptable to go UP in size to LOOSE quality... but that is just me and my priorities, i do give you kudos for coming up with the solution you have though ! remember, not everyone has a 1TB+ server in their basement. although it is good for mainstream users since it allows 5.1 without ATVhacks... good stuff though, just not for me, plus isnt HB suppose to be a cross-platform open source project? how will this process be automated on an apple computer?
Sweetness! *waiting in anticcccccccccc........ipation*
Also, if A52Codec with perian supported FLAC, perhaps that could be a solution for handbrake instead of ALAC + DD-Wav ?
and... I seam to be retarded... ive installed mplayer, but cannot for the life of me figure out how to run it in terminal? Am I missing something?
Also, if A52Codec with perian supported FLAC, perhaps that could be a solution for handbrake instead of ALAC + DD-Wav ?
and... I seam to be retarded... ive installed mplayer, but cannot for the life of me figure out how to run it in terminal? Am I missing something?
Mplayer for os x, is a gui, but in the package contents, is a mplayer binary, that can be used in the terminal. But its old. FFMpegX will give you more, like FFMPEG and mplayer, and newer.Anamonde wrote:and... I seam to be retarded... ive installed mplayer, but cannot for the life of me figure out how to run it in terminal? Am I missing something?
For the best results, get the latest SVN source, and compile, but its not for the faint of heart.
Re: AC3 using multiple tools
I hear ya, but its only 400 megs. The AC3 stream, raw from the dvd is 400, so the diff is 400. I gotta think, that apple is working on AAC 5.1 to DD-Live, and a software update is going to activate it. That is what I hope for, more than my, or your solution.loyalty_anchored wrote:@ragboy:
i am not whilling to give audio 800MB of space, but this is again my own personal preference, i feel it is not acceptable to go UP in size to LOOSE quality... but that is just me and my priorities, i do give you kudos for coming up with the solution you have though ! remember, not everyone has a 1TB+ server in their basement. although it is good for mainstream users since it allows 5.1 without ATVhacks... good stuff though, just not for me, plus isnt HB suppose to be a cross-platform open source project? how will this process be automated on an apple computer?
In order to automate my process, someone would have to add the ability to transcode ac3 to dd-wav, prob in ffmpeg, since besweet code is based on ffmpeg code. And then, prob ffmpeg also, would have to encode apple lossless, since it already decodes, but doesn't encode.
Re: AC3 using multiple tools
Ok, so I tired the THX demo and it worked great after I installed the A52codec, Perian, as well as the ssh stuff. But then I added the ATVFiles and now when I play it all I hear is static... I obviously did something wrong but can't seem to backtrack enough to find where it was.ejbeckner wrote:aswick wrote:Process steps using HandBrake, mplayer, BeSweet, and Quicktime Pro (along with another sample AC3):
http://www.garcias.com/TheGarcias/Dad%2 ... 6FE4E.html
http://www.megaupload.com/?d=7V2UYBR1
THX 5.1 demo works great, on Apple Tv. Audio passes through and i get the blue light on my receiver that it is 5.1 audio.
!!Now some one needs to automate this process!!
Anyone have any suggestions? Thanks!
Re: AC3 using multiple tools
I ended up doing a factory restore and started over... Thanks anyway...aur0ra wrote: Ok, so I tired the THX demo and it worked great after I installed the A52codec, Perian, as well as the ssh stuff. But then I added the ATVFiles and now when I play it all I hear is static... I obviously did something wrong but can't seem to backtrack enough to find where it was.
Anyone have any suggestions? Thanks!
Re: AC3 using multiple tools
The THX demo I uploaded works on factory setup of Apple TV, you just need a receiver connected via optical, that will decode dolby digital CDs.aur0ra wrote:I ended up doing a factory restore and started over... Thanks anyway...aur0ra wrote: Ok, so I tired the THX demo and it worked great after I installed the A52codec, Perian, as well as the ssh stuff. But then I added the ATVFiles and now when I play it all I hear is static... I obviously did something wrong but can't seem to backtrack enough to find where it was.
Anyone have any suggestions? Thanks!
Re: AC3 using multiple tools
Right on. I started experimenting to figure out what caused the problem. Turns out ATVFiles does *something* to hose the DDWAV output. I don't know how or why, but after installing ATVFiles the demo didn't work.ragboy wrote: The THX demo I uploaded works on factory setup of Apple TV, you just need a receiver connected via optical, that will decode dolby digital CDs.
As a side note - I tried your method all night and wasn't able to get a DDWAV file to play. I thought I followed your instructions (again, it was late). Using AC3Machine and BeSweet v1.5b (since v1.4 didn't have the ac3enc.dll) cause the static sound on my computer (which is expected) but no sound at all from the receiver. I made sure to choose AC3-WAV from the options and turned everything else off.