Preparing a Blu-Ray Disc for AppleTV 2 on Windows for Beginners
Ripping Blu-Ray Disc (BD) to Apple TV 2 is trickier than with DVDs and as a newcomer I thought I would document what I have learned. There are plenty of great threads on the details of this (particularly here: https://forums.macrumors.com/threads/541517/ and https://forums.macrumors.com/threads/1034446/) but again as a beginner I didn’t even understand the vocabulary. So following a lot of reading, I thought a new thread would be useful for other beginners. Experts: there is no new material here, just my summary of what I’ve read elsewhere.
For comparison purposes, my DVD to Apple TV workflow is: Any DVD --> Clone DVD to VOBs --> Handbrake to a .m4v file --> iTunes Home Sharing. The slickest part of this workflow is Clone DVD as it extracts the main title very cleanly. http://www.slysoft.com/
THE SHORT VERSION OF THE BLU-RAY SOLUTION ON WINDOWS:
---------------
My BD workflow is this: Any DVD HD --> “Another EAC3toGUI-PLUS” to .MKV --> Handbrake “Apple TV 2” preset to .m4v. The details can be found in this excellent post: https://forums.macrumors.com/threads/1034446/ and below is my explanation why for beginners like me.
---------------
Apple TV 2 Requirements / Limitations
The Apple TV 2 has a display limit of 720p (vs 1080p on your BD) and does not support DTS audio standards (Ref: http://forum.handbrake.fr/viewtopic.php?f=7&t=8686). This means that to use your BDs on Apple TV 2 you need to specifically prepare both the audio and video streams. To maintain forced captions you have to explicitly include them, and this creates a fair amount of setup work for your re-encode computer but the latest tools make this fairly painless once you have things set up.
You also have to pull the correct movie off your BD, so:
Blu Ray Layout and Playlists as I understand it
First off, if you look at the file structure of a BD, it is very different than a DVD. The majority of the data lies in the BDMV/STREAM folder. (Ref: http://en.wikipedia.org/wiki/Blu-ray_Disc#Directory_and_file_structure)
Inside the STREAM folder are bits and pieces of the movies in *.m2ts files. (Ref: MPEG 2 Transport Streams: http://en.wikipedia.org/wiki/.m2ts) Some movies have a few number of m2ts files and some have hundreds. Because of something called Seamless Branching (Ref: http://en.wikipedia.org/wiki/Seamless_branching) the BD player can jump between m2ts files. The practical application of this involves extended edition movies where an alternate version of the movies inserts a scene here and there but leaves the rest of the movie in tact. Seamless Branching is used to implement this at the file level.
I bring this up because each “path” through the m2ts files constitutes a Blu-Ray playlist. To rip the “main title” off a BD, you have to pick the right playlist and have the encoder use that.
EAC3to (http://forum.doom9.org/showthread.php?t=125966) reports the following playlists on Inception-- the [38+1+39...] notation refers to the m2ts files and is the “string through the beads” it takes to assemble a feature on the disc:
Here’s what you should see in that list:
a) Three playlists on the disc
b) Each has chapters and multiple audio tracks
The advice commonly given is that the longest Playlist on the BD is likely the main title and the one you want. I chose this release for my example because that advice doesn’t work here-- the longest playlist at 3:10:22 is one where footage of the making of the movie has been interleaved with the actual film. The correct playlist in this case is the second one. How would you have known that without trial and error? Beats me. Took two tries for me. Maybe someone can comment on that.
MUXing around with it
You won’t get very far in reading about re-encoding Blu Ray discs without learning about multiplexing (muxing). (Ref: http://en.wikipedia.org/wiki/Blu-ray_Disc#Container_format )
Muxing is the process of combining audio, video, caption streams into one container. Relevant examples of containers are m2ts (http://en.wikipedia.org/wiki/.m2ts), mkv (http://en.wikipedia.org/wiki/Matroska), and m4v (http://en.wikipedia.org/wiki/M4v).
Demuxing is the process of extracting audio, video, caption, etc. streams into separate containers. For re-encoding purposes you would do this because the best tools specialize in audio vs video vs. captions and more.
It turns out that to get a good and efficient re-encode of a BD movie, you need to demux the streams in the playlist in order to save off captions (subtitles) and relevant audio streams, then reassemble the movie with just the parts you want. Captions might seem like an afterthought but the problem arises when a movie offers forced captions -- characters in a scene are speaking another language and the movies automatically places the translated words on the screen no matter the user preference on captions. This is important-- think about the native languages in Avatar.
So now what?
As mentioned above there is a great workflow for coverting BDs to Apple TV 2 here, written by dhy8386 at Mac Rumors Forums:
https://forums.macrumors.com/threads/1034446/
The tools that dhy8386 (https://forums.macrumors.com/members/215991/) suggests either have installers or are simple ZIP archives, all of which seem to install cleanly. This workflow suggests installing a number of free tools and using the “Another EAC3to GUI Plus” front end, which works great BUT you need to read the instructions on how to use the user interface. You will be very frustrated if you don’t take 10 minutes to learn the UI from the instructions. On that point, here is a hint: Analyze -> Select one of the playlists -> Name the Output File with a simple name like Inception.mkv (assists metadata lookup) -> Add Batch -> Run All.
Aftger step 3 of that workflow you end up with a very high quality 15-30GB MKV file containing the 1080p (or source resolution) movie, Handbrake-friendly Dolby Digital (http://en.wikipedia.org/wiki/AC3) audio (see below), chapters, and captions. My Q8200 running Windows 7x64 spends 30-60 minutes on encoding the BD to MKV.
But you can’t play an MKV file on iOS devices and this file is way too big anyway. Onward...
Converting MKV for iOS devices
(a discussion of Step 4 and 5 in the dhy8386 process)
Apple iTunes and iOS devices want their movies in M4V containers. Handbrake (http://handbrake.fr/) is an excellent tool to convert container formats. There is a user guide (http://trac.handbrake.fr/wiki/HandBrakeGuide), Wiki (http://trac.handbrake.fr/), and Forum (http://forum.handbrake.fr/) where you can learn about it. The topic of preparing movies for Apple TV 2 is very active in the forum and on Mac Rumors (https://forums.macrumors.com/forums/100/).
To convert your Blu-Ray MKV to M4V you will need the latest “nightly build” of Handbrake which is (IMHO) not as risky as it sounds-- Handbrake revs infrequently and the nightly builds include several new features such as an Apple TV 2 preset and Dolby Digital conversion. The nightly builds are found from forum links here: http://forum.handbrake.fr/viewtopic.php?f=4&t=15901
You have to make a few decisions about this step:
If the second two questions really matter to you then you’ll want to encode as though you are targeting a iPhone device as it results in smaller files more quickly.
Here’s why this matters. (Ref: http://forum.handbrake.fr/viewtopic.php?f=7&t=18266) You have to encode for the least-capable playback device.
(If this information is in error please comment; I don’t have most of these devices to experiment with.)
It is completely reasonable to expect to encode a movie (DVD or BD source) that is compact in size and plays well on an iPhone/iPad device and with reasonable quality on your Apple TV. The handbrake preset for this is called “Universal” which gives you a compressed DVD-like 480p resolution. These resulting files range from 0.5 - 2GB for me.
If you won’t need to play your BD movies on an iPhone 3GS then a 720p file is probably optimal for Apple TV 2. That file should work on your iPhone 4, iPad, and Apple TV 2 with very good resolution.
In terms of Audio, the Apple TV 2 cannot do anything with DTS. It is however able to pass Dolby Digital (AC-3) through to your 5.1 surround system through HDMI or Optical. The rest of your iOS devices cannot do anything with Dolby Digital so for platform compatibility you need to include a stereo track as well.
Using Handbrake to convert your MKV to M4V
The process offered by dhy8386 above (https://forums.macrumors.com/threads/1034446/) includes instructions on using Handbrake for this purpose. Though terse for beginners, it is great advice for your Apple TV 2. If you want to encode for a different device as your lowest common denominator, just use the built-in Handbrake profiles for that device. In particular, the “High Profile” preset used above breaks some iPhone compatibility but results in slightly better picture quality.
In the Video tab of Handbrake the advice is to change the Width to 1280 (which relates to the 1280 x 720 resolution of 720p). With anamorphic “loose” the actual display size may show fewer lines -- this happens when the movie is wider than 16:9. Handbrake shrinks the displayed lines to include the entire width, and the result is black bars on the top and bottom. If you want to override this you can experiment with cropping which is like a hardcoded zoom. An example with illustrated math is here: http://forum.handbrake.fr/viewtopic.php?f=7&t=19155
In the Audio tab of Handbrake, you should end up with two rows represented here (corrected per forum thread):
If your Audio tab doesn’t look at all like this then you have a version of Handbrake older than the nightly builds (http://forum.handbrake.fr/viewtopic.php?f=4&t=15901) or much newer than this discussion (svn3711 2010122001).
In the Subtitles tab you should have one entry which causes Handbrake to look for forced captions only and “burn” them in, which is to say render them as part of the movie frame:
I have yet to have Chapter Names appear in the Chapters tab. Further work to explore.
Do check the “Large file size” box. AFAIK all iOS devices support this and the tool tip is misleading (http://forum.handbrake.fr/viewtopic.php?f=7&t=18947).
You can use the Presets menu on the menu bar to save your settings as a preset for re-use.
Results
The Handbrake step takes 5-10 hours on my Q8200 and results in a m4v file of 2-6GB containing the 720p movie, one stereo track and one Dolby Digital 5.1 track, chapters, and forced captions.
In all, between the EAC3to step and the Handbrake step, I spend less than 5 minutes of my actual time preparing everything. The first one I did took hours of tinkering and research; hopefully this discussion helps others skip that part to some extent.
The 720p movie resulting from dhy8386’s process looks substantially better on my ATV2 and 50" Plasma than a 480p BD rip, better than a DVD rip, and better than a similar 1080p file (since the ATV2 only displays 720 lines the conversion is less effective than having Handbrake do it). It also has more clarity than ripping a BD movie directly from the disc using Handbrake (forgetting the Captions issue). As expected, all of these have far less quality than a Blu-Ray Disc playing directly from a Blu-Ray player connected to the TV.
Admittedly I am no expert and probably got a few details wrong. If so, please comment on them and I will update this post.
Revision: Initial, December 26 2010
Ripping Blu-Ray Disc (BD) to Apple TV 2 is trickier than with DVDs and as a newcomer I thought I would document what I have learned. There are plenty of great threads on the details of this (particularly here: https://forums.macrumors.com/threads/541517/ and https://forums.macrumors.com/threads/1034446/) but again as a beginner I didn’t even understand the vocabulary. So following a lot of reading, I thought a new thread would be useful for other beginners. Experts: there is no new material here, just my summary of what I’ve read elsewhere.
For comparison purposes, my DVD to Apple TV workflow is: Any DVD --> Clone DVD to VOBs --> Handbrake to a .m4v file --> iTunes Home Sharing. The slickest part of this workflow is Clone DVD as it extracts the main title very cleanly. http://www.slysoft.com/
THE SHORT VERSION OF THE BLU-RAY SOLUTION ON WINDOWS:
---------------
My BD workflow is this: Any DVD HD --> “Another EAC3toGUI-PLUS” to .MKV --> Handbrake “Apple TV 2” preset to .m4v. The details can be found in this excellent post: https://forums.macrumors.com/threads/1034446/ and below is my explanation why for beginners like me.
---------------
Apple TV 2 Requirements / Limitations
The Apple TV 2 has a display limit of 720p (vs 1080p on your BD) and does not support DTS audio standards (Ref: http://forum.handbrake.fr/viewtopic.php?f=7&t=8686). This means that to use your BDs on Apple TV 2 you need to specifically prepare both the audio and video streams. To maintain forced captions you have to explicitly include them, and this creates a fair amount of setup work for your re-encode computer but the latest tools make this fairly painless once you have things set up.
You also have to pull the correct movie off your BD, so:
Blu Ray Layout and Playlists as I understand it
First off, if you look at the file structure of a BD, it is very different than a DVD. The majority of the data lies in the BDMV/STREAM folder. (Ref: http://en.wikipedia.org/wiki/Blu-ray_Disc#Directory_and_file_structure)
Inside the STREAM folder are bits and pieces of the movies in *.m2ts files. (Ref: MPEG 2 Transport Streams: http://en.wikipedia.org/wiki/.m2ts) Some movies have a few number of m2ts files and some have hundreds. Because of something called Seamless Branching (Ref: http://en.wikipedia.org/wiki/Seamless_branching) the BD player can jump between m2ts files. The practical application of this involves extended edition movies where an alternate version of the movies inserts a scene here and there but leaves the rest of the movie in tact. Seamless Branching is used to implement this at the file level.
I bring this up because each “path” through the m2ts files constitutes a Blu-Ray playlist. To rip the “main title” off a BD, you have to pick the right playlist and have the encoder use that.
EAC3to (http://forum.doom9.org/showthread.php?t=125966) reports the following playlists on Inception-- the [38+1+39...] notation refers to the m2ts files and is the “string through the beads” it takes to assemble a feature on the disc:
Code:
1) 00101.mpls, 3:10:22
[38+1+39+9+40+11+41+15+42+17+43+19+44+21+45+23+46+25+47+27+48+29+49+31+50+33+
51+35+8+52+37].m2ts
- Chapters, 15 chapters
- VC-1, 1080p24 /1.001 (16:9)
- DTS Master Audio, English, multi-channel, 48kHz
- AC3, French, multi-channel, 48kHz
- AC3, Spanish, multi-channel, 48kHz
- AC3, Portuguese, multi-channel, 48kHz
2) 00100.mpls, 2:28:08
[1+4+9+10+11+13+15+16+17+18+19+20+21+22+23+24+25+26+27+28+29+30+31+32+33+34+3
5+36+37].m2ts
- Chapters, 15 chapters
- VC-1, 1080p24 /1.001 (16:9)
- DTS Master Audio, English, multi-channel, 48kHz
- AC3, French, multi-channel, 48kHz
- AC3, Spanish, multi-channel, 48kHz
- AC3, Portuguese, multi-channel, 48kHz
3) 00215.mpls, 0:44:13
[39+40+41+42+43+44+45+46+47+48+49+50+51+8+53].m2ts
- Chapters, 15 chapters
- VC-1, 1080p24 /1.001 (16:9)
- DTS Master Audio, English, multi-channel, 48kHz
- AC3, French, multi-channel, 48kHz
- AC3, Spanish, multi-channel, 48kHz
- AC3, Portuguese, multi-channel, 48kHz
Here’s what you should see in that list:
a) Three playlists on the disc
b) Each has chapters and multiple audio tracks
The advice commonly given is that the longest Playlist on the BD is likely the main title and the one you want. I chose this release for my example because that advice doesn’t work here-- the longest playlist at 3:10:22 is one where footage of the making of the movie has been interleaved with the actual film. The correct playlist in this case is the second one. How would you have known that without trial and error? Beats me. Took two tries for me. Maybe someone can comment on that.
MUXing around with it
You won’t get very far in reading about re-encoding Blu Ray discs without learning about multiplexing (muxing). (Ref: http://en.wikipedia.org/wiki/Blu-ray_Disc#Container_format )
Muxing is the process of combining audio, video, caption streams into one container. Relevant examples of containers are m2ts (http://en.wikipedia.org/wiki/.m2ts), mkv (http://en.wikipedia.org/wiki/Matroska), and m4v (http://en.wikipedia.org/wiki/M4v).
Demuxing is the process of extracting audio, video, caption, etc. streams into separate containers. For re-encoding purposes you would do this because the best tools specialize in audio vs video vs. captions and more.
It turns out that to get a good and efficient re-encode of a BD movie, you need to demux the streams in the playlist in order to save off captions (subtitles) and relevant audio streams, then reassemble the movie with just the parts you want. Captions might seem like an afterthought but the problem arises when a movie offers forced captions -- characters in a scene are speaking another language and the movies automatically places the translated words on the screen no matter the user preference on captions. This is important-- think about the native languages in Avatar.
So now what?
As mentioned above there is a great workflow for coverting BDs to Apple TV 2 here, written by dhy8386 at Mac Rumors Forums:
https://forums.macrumors.com/threads/1034446/
The tools that dhy8386 (https://forums.macrumors.com/members/215991/) suggests either have installers or are simple ZIP archives, all of which seem to install cleanly. This workflow suggests installing a number of free tools and using the “Another EAC3to GUI Plus” front end, which works great BUT you need to read the instructions on how to use the user interface. You will be very frustrated if you don’t take 10 minutes to learn the UI from the instructions. On that point, here is a hint: Analyze -> Select one of the playlists -> Name the Output File with a simple name like Inception.mkv (assists metadata lookup) -> Add Batch -> Run All.
Aftger step 3 of that workflow you end up with a very high quality 15-30GB MKV file containing the 1080p (or source resolution) movie, Handbrake-friendly Dolby Digital (http://en.wikipedia.org/wiki/AC3) audio (see below), chapters, and captions. My Q8200 running Windows 7x64 spends 30-60 minutes on encoding the BD to MKV.
But you can’t play an MKV file on iOS devices and this file is way too big anyway. Onward...
Converting MKV for iOS devices
(a discussion of Step 4 and 5 in the dhy8386 process)
Apple iTunes and iOS devices want their movies in M4V containers. Handbrake (http://handbrake.fr/) is an excellent tool to convert container formats. There is a user guide (http://trac.handbrake.fr/wiki/HandBrakeGuide), Wiki (http://trac.handbrake.fr/), and Forum (http://forum.handbrake.fr/) where you can learn about it. The topic of preparing movies for Apple TV 2 is very active in the forum and on Mac Rumors (https://forums.macrumors.com/forums/100/).
To convert your Blu-Ray MKV to M4V you will need the latest “nightly build” of Handbrake which is (IMHO) not as risky as it sounds-- Handbrake revs infrequently and the nightly builds include several new features such as an Apple TV 2 preset and Dolby Digital conversion. The nightly builds are found from forum links here: http://forum.handbrake.fr/viewtopic.php?f=4&t=15901
You have to make a few decisions about this step:
- What devices do I want this movie to play on: Apple TV 2, iPad (1 or 2), iPhone 3GS/4, iPhone 3 and earlier, and/or Apple TV 1st gen?
- Do I care how long the conversion takes (lower resolution output files are quicker)?
- Do I care how much space the converted movie consumes on my hard drive and on the iOS device?
If the second two questions really matter to you then you’ll want to encode as though you are targeting a iPhone device as it results in smaller files more quickly.
Here’s why this matters. (Ref: http://forum.handbrake.fr/viewtopic.php?f=7&t=18266) You have to encode for the least-capable playback device.
- iTunes accepts and can play back M4V movies in 1080p, 720p, and most lower resolutions. Higher resolution movies like 1080p will challenge all but the best hardware.
- Apple TV 2 devices play back M4V movies encoded in 1080p, 720p, and most lower resolutions. The ATV2 only outputs at 720p so anything higher than 720p is wasted and can lead to dropped frames if ATV2 cannot keep up.
- iPad and iPhone 4 (AFAIK) devices accept and play M4V movies at 720p or less. 1080p movies will be rejected at sync time. Thee devices not physically have the 720 lines but manage to display what they can (https://forums.macrumors.com/threads/1013681/).
- iPhone/iPod Touch devices of the 3GS generations and older will not play 1080p nor 720p movies and will reject those at sync time AFAIK.
- Some references: 720p (http://en.wikipedia.org/wiki/720p), 1080p (http://en.wikipedia.org/wiki/1080p), 480p (http://en.wikipedia.org/wiki/480p).
(If this information is in error please comment; I don’t have most of these devices to experiment with.)
It is completely reasonable to expect to encode a movie (DVD or BD source) that is compact in size and plays well on an iPhone/iPad device and with reasonable quality on your Apple TV. The handbrake preset for this is called “Universal” which gives you a compressed DVD-like 480p resolution. These resulting files range from 0.5 - 2GB for me.
If you won’t need to play your BD movies on an iPhone 3GS then a 720p file is probably optimal for Apple TV 2. That file should work on your iPhone 4, iPad, and Apple TV 2 with very good resolution.
In terms of Audio, the Apple TV 2 cannot do anything with DTS. It is however able to pass Dolby Digital (AC-3) through to your 5.1 surround system through HDMI or Optical. The rest of your iOS devices cannot do anything with Dolby Digital so for platform compatibility you need to include a stereo track as well.
Using Handbrake to convert your MKV to M4V
The process offered by dhy8386 above (https://forums.macrumors.com/threads/1034446/) includes instructions on using Handbrake for this purpose. Though terse for beginners, it is great advice for your Apple TV 2. If you want to encode for a different device as your lowest common denominator, just use the built-in Handbrake profiles for that device. In particular, the “High Profile” preset used above breaks some iPhone compatibility but results in slightly better picture quality.
In the Video tab of Handbrake the advice is to change the Width to 1280 (which relates to the 1280 x 720 resolution of 720p). With anamorphic “loose” the actual display size may show fewer lines -- this happens when the movie is wider than 16:9. Handbrake shrinks the displayed lines to include the entire width, and the result is black bars on the top and bottom. If you want to override this you can experiment with cropping which is like a hardcoded zoom. An example with illustrated math is here: http://forum.handbrake.fr/viewtopic.php?f=7&t=19155
In the Audio tab of Handbrake, you should end up with two rows represented here (corrected per forum thread):
Track, Source, Audio Codec, Mixdown, Samplerate, Bitrate, DRC
1, 1 English (AC3) (5.1 ch), AAC (faac), Dolby Pro Logic II, Auto, 320, 0
2, 1 English (AC3) (5.1 ch), AC3 Passthru, AC3 Passthru, Auto, Auto, 0
1, 1 English (AC3) (5.1 ch), AAC (faac), Dolby Pro Logic II, Auto, 320, 0
2, 1 English (AC3) (5.1 ch), AC3 Passthru, AC3 Passthru, Auto, Auto, 0
If your Audio tab doesn’t look at all like this then you have a version of Handbrake older than the nightly builds (http://forum.handbrake.fr/viewtopic.php?f=4&t=15901) or much newer than this discussion (svn3711 2010122001).
In the Subtitles tab you should have one entry which causes Handbrake to look for forced captions only and “burn” them in, which is to say render them as part of the movie frame:
Track, Forced Only, Burned In, Default, Srt Language, Char Code, Offset (ms)
1 English, Yes, Yes, Yes, -, -, 0
1 English, Yes, Yes, Yes, -, -, 0
I have yet to have Chapter Names appear in the Chapters tab. Further work to explore.
Do check the “Large file size” box. AFAIK all iOS devices support this and the tool tip is misleading (http://forum.handbrake.fr/viewtopic.php?f=7&t=18947).
You can use the Presets menu on the menu bar to save your settings as a preset for re-use.
Results
The Handbrake step takes 5-10 hours on my Q8200 and results in a m4v file of 2-6GB containing the 720p movie, one stereo track and one Dolby Digital 5.1 track, chapters, and forced captions.
In all, between the EAC3to step and the Handbrake step, I spend less than 5 minutes of my actual time preparing everything. The first one I did took hours of tinkering and research; hopefully this discussion helps others skip that part to some extent.
The 720p movie resulting from dhy8386’s process looks substantially better on my ATV2 and 50" Plasma than a 480p BD rip, better than a DVD rip, and better than a similar 1080p file (since the ATV2 only displays 720 lines the conversion is less effective than having Handbrake do it). It also has more clarity than ripping a BD movie directly from the disc using Handbrake (forgetting the Captions issue). As expected, all of these have far less quality than a Blu-Ray Disc playing directly from a Blu-Ray player connected to the TV.
Admittedly I am no expert and probably got a few details wrong. If so, please comment on them and I will update this post.
Revision: Initial, December 26 2010
Last edited: