View Full Version : Convert MKV files for Apple TV
Nickb
Jul 27, 2007, 05:46 AM
Hello everyone.
First time on here, after having problems with my ATV i came on here to find the answer - and find it i did, so thanks for everyone posting comments, it helped me figure out a really annoying problem.
What id really like to know is if there is a program i can get to convert MKV files to use on ATV as i want to put high def films on there but most seem to be MKV files.
Any help would be great.
Nick
Nickb
Jul 27, 2007, 05:52 AM
p.s i use viddy up to convert my avi files - is this a good program to use, or is there a better one that i could use?
speakerwizard
Jul 27, 2007, 06:28 AM
visual hub will covert mkv to appletv as a preset, its a great app
Nickb
Jul 27, 2007, 06:42 AM
visual hub will covert mkv to appletv as a preset, its a great app
yeah i read about visual hub on another thread - good app then, might have to buy that. Does it take a long time to process.
Also what is the best app to use for ripping dvd's, as i tried one app and i took 24hours to convert 8% which cant be right, so what should i use?
mr_matalino
Jul 27, 2007, 10:09 AM
yeah i read about visual hub on another thread - good app then, might have to buy that. Does it take a long time to process.
Also what is the best app to use for ripping dvd's, as i tried one app and i took 24hours to convert 8% which cant be right, so what should i use?
Mactheripper is a popluar app to rip DVD's.
taeclee99
Jul 27, 2007, 11:12 AM
yeah i read about visual hub on another thread - good app then, might have to buy that. Does it take a long time to process.
Also what is the best app to use for ripping dvd's, as i tried one app and i took 24hours to convert 8% which cant be right, so what should i use?
Use handbrake to convert dvd's to apple tv compatible mp4's. It works great and best of all it's free.
Nickb
Jul 27, 2007, 11:55 AM
ok cool ill try those. But how do people rip HD dvd's? as ive been downloading some 720p torrents but takes ages.
peeaanuut
Nov 13, 2007, 09:26 PM
I tried using VH to convert a multichannel mkv and it says it cannot convert from multi channel. Do I need to do something different? I tried going into the advanced and choosing 2 channel and no go. Ideas?
motownflip
Nov 13, 2007, 10:54 PM
I just bought and am using visualhub now. Nice program. Wish it was faster, but oh well. Also, use meta x to tag your movies. Another nice, free program.
acidzerocool
Nov 15, 2007, 01:53 PM
A little off topic but what can I use to tag movies in the PC world? I have been doing the Amazon thing but takes for ever with all the movies I have.
billabong
Nov 15, 2007, 02:19 PM
Go with Visual Hub, I haven't had a single problem ever. Then use MetaX to tag them..
peeaanuut
Nov 15, 2007, 02:35 PM
VH seems to work for everything accept multichannel mkv files. Well at least ones from 720P rips that I have found. It works fine for the TV Rip HD downloads I have found but not sure if they were multichannel to begin with. I would really like to play some of these HD 720p movie rips without hacking the aTV. Im sure in time but I guess now its a no go.
billabong
Nov 16, 2007, 04:42 AM
VH seems to work for everything accept multichannel mkv files. Well at least ones from 720P rips that I have found. It works fine for the TV Rip HD downloads I have found but not sure if they were multichannel to begin with. I would really like to play some of these HD 720p movie rips without hacking the aTV. Im sure in time but I guess now its a no go.
Haven't had any problems with multichannel stuff, it has worked with DTS & Dolby 5.1 stuff...
jayholler
Jul 16, 2008, 06:43 PM
I got the demo from Visual Hub, transcoded a 720p H264 AC3 file and ended up with a 2 minute file that played great on the Apple TV. So then I viewed the log and pulled the ffmpeg command and options from that. Below is a script based on exactly that but stripping out the 2 minute restriction and the stuff visual hub uses to save the output to a file instead of the stderr screen.
### Transcode 720p H264 mkv files for the Apple TV
# Get the beginning time from the date cmd.
START=$(date)
# ffmpeg cmd
ffmpeg -y -i $1 -threads 4 -s 1280x720 -aspect 1280:720 -r ntsc-film -vcodec h264 -g 150 -qmin 8 -b 4500k -level 31 -loop 1 -sc_threshold 40 -partp4x4 1 -rc_eq 'blurCplx^(1-qComp)' -refs 2 -qmax 51 -maxrate 4500k -bf 1 -keyint_min 40 -async 50 -acodec aac -ar 48000 -ac 2 -ab 128k $1.mp4
# Get the ending time of the transcode process from the date cmd.
END=$(date)
# Inform us with an email
echo "Transcoding of $1 was started on $START and completed on $END." > /tmp/emailmessage.txt
/usr/local/bin/email.sh
My script also gives me an email using another script I set up on my linux box so I can be notified by email when it is done. I'm running this on Ubuntu Hardy Heron with the ffmpeg installed from the medibuntu repository. As long as your ffmpeg binary can handle x264, ac3, and aac it should work perfectly. Unfortunately I wasn't able to get the trick of not transcoding to work because the files I have are high profile H264 and the Apple TV can only play up to Main Profile H264. The transcoding process takes a long time, but at least you can do it with free tools.
I run the script by putting the file in the same directory as the script and executing it this way:
./appletv.sh file.mkv
Have fun! And remember to only use legal material, as copyright infringement is illegal!!
ZippyToo
Sep 28, 2008, 09:23 PM
http://tehparadox.com/forum/f28/how-mkv-apple-tv-itunes-surround-159987/
spencers
Sep 29, 2008, 10:17 AM
Visual hub works best for me.
Kilamite
Sep 29, 2008, 11:16 AM
+1 for VisualHub.
Works flawlessly for me.
The General
Sep 29, 2008, 12:12 PM
A lot of times the video stream in the MKV is actually compatible with the ATV, and you'll just need to transcode the audio. So I would open the MKV in Quicktime and check the movie inspector first. The ATV can play up to 1280x720 @ 24fps, 5mbps for h.264 and 3mbps simple profile mpeg4. Just check here and make sure the stream is compatible: http://www.apple.com/appletv/specs.html
If so, I would use VisualHub and set the video to passthrough. That way you lose no quality when transcoding, only in audio. Plus it goes wayyyy faster. I did this for a 720P Battlestar Galactica episode and it took 3 minutes and it was done and played fine on the ATV.
eddyg
Sep 30, 2008, 09:58 PM
Hi,
Have you tried HandBrake snapshot 3? That now converts "anything", not just DVDs, to MP4/AVI/MKV (and it's free).
HandBrake Snapshot 3 (http://handbrake.fr/?article=snapshot)
Note that this is a development release and not a full release, i.e. is not fully tested.
Cheers, Ed.
dynaflash
Oct 1, 2008, 02:25 PM
wow. http://www.macworld.com/article/135834/2008/10/handbrake_update.html ;)
ScootPatoot
Oct 1, 2008, 07:54 PM
wow. http://www.macworld.com/article/135834/2008/10/handbrake_update.html ;)
Congrats on the plug Dyna...also on a great product
northy124
Oct 3, 2008, 02:23 PM
wow. http://www.macworld.com/article/135834/2008/10/handbrake_update.html ;)
Holy cow, it really does work I have just encoded a couple of (Legal;)) MKV's I have:D, bravo Dyna and the rest of the team.
Cave Man
Oct 3, 2008, 02:36 PM
Eddy and Dyna - any chance of handling DTS, DTS-HD and True HD transcoding to AC3? How about VC-1? It seems with those then you'd have all the Blu-Ray formats covered as well (other than encryption and de-HDCP'ing).
dynaflash
Oct 3, 2008, 02:42 PM
Eddy and Dyna - any chance of handling DTS, DTS-HD and True HD transcoding to AC3? How about VC-1? It seems with those then you'd have all the Blu-Ray formats covered as well (other than encryption and de-HDCP'ing).
Of course theres a chance :)
But, as you already know ... rome wasn't built in a day ( apologizes for the stupid analogy ).
There is so much on the HB plate now. Some pretty neat stuff. But, like all things open source, it depends on how much time volunteers have to commit to the project. van already has a handle on vc-1 but it hasn't been tested. It's both the good and bad of open source software.
Cave Man
Oct 3, 2008, 02:45 PM
Very cool. I saw a posting somewhere that listed all the codecs used in Blu-Ray movies and it seemed like more than half were in DTS, and few were in AC3. Any chance the XBMC (or Plex) code, which does audio transcoding on the fly, could be incorporated?
dynaflash
Oct 3, 2008, 02:52 PM
Any chance the XBMC (or Plex) code, which does audio transcoding on the fly, could be incorporated?
Probably not. I mean if its open source it possible, but doubtful. Trust me on this, van (and others) have a pretty comprehensive understanding of video, its just a matter of time.
Kilamite
Oct 3, 2008, 03:05 PM
Since we're on the topic of HandBrake rather than MKV files, I thought I'd throw this question out there.
I have EyeTV recordings, and the QuickTime conversion gives me pitful results. Now, onto my question:
1. When I do this in HandBrake, I crop the video (8x8x8x8, for overscan) and set an output resolution of 688x384 at 1100 kbps bitrate, Apple TV preset with deinterlace set to slower. The source, is an MPEG-2 file. My outputs aren't the best quality - sometimes a bit blocky looking, and the audio is out of sync by a fraction, but noticable.
Is this a known issue, or am I doing something wrong? I know I won't be able to get great quality, but I have ripped DVD's with those same settings and the result is great, just seems to be the MPEG-2 files I have issues with.
dynaflash
Oct 3, 2008, 03:22 PM
Since we're on the topic of HandBrake rather than MKV files, I thought I'd throw this question out there.
I have EyeTV recordings, and the QuickTime conversion gives me pitful results. Now, onto my question:
1. When I do this in HandBrake, I crop the video (8x8x8x8, for overscan) and set an output resolution of 688x384 at 1100 kbps bitrate, Apple TV preset with deinterlace set to slower. The source, is an MPEG-2 file. My outputs aren't the best quality - sometimes a bit blocky looking, and the audio is out of sync by a fraction, but noticable.
Is this a known issue, or am I doing something wrong? I know I won't be able to get great quality, but I have ripped DVD's with those same settings and the result is great, just seems to be the MPEG-2 files I have issues with.
Well, as far as the audio out of sync, it *could* be fixed here http://trac.handbrake.fr/changeset/1802.
As far as the blocky output, it could be because you have deinterlace set to slower and its not an interlaced source (or more accurately is partially interlaced). Try Snapshot 3 and decomb. eyetv is a funny thing because usually if your capturing an OTA broadcast the eyetv just passes whatever the local broadcaster sends untouched. Which means it has all of its faults, etc.
Here in the central U.S. I use my eyetv quite a bit for OTA HD broadcasts and convert with HB to my atv and get fantastic results using decomb. But, that will vary depending on your ota hd broadcast.
* apologizes to the OP for derailing the thread *
Kilamite
Oct 6, 2008, 09:07 AM
Dyna, the source is interlaced (I think all TV broadcasts in the UK possibly are), so I have to set deinterlace on. I'm using Snapshot 3 (svn1797). What does decomb do? I should mention that these are just SD recordings.
I still get slightly blocky video - compared to other TV show recordings that have the same bitrate and resolution that are available by other methods.
These are the settings I'm using (basically the iPhone preset), although I have no clue when it comes down to all the advanced stuff. I just want the best quality I can get that will play on my Apple TV and any laptop (Mac or Windows).
http://idisk.me.com/ross_t/Public/hb_1.png
http://idisk.me.com/ross_t/Public/hb_2.png
http://idisk.me.com/ross_t/Public/hb_3.png
Is there something in the advanced settings I can turn up to give me more clarity (close to the original)?
Cheers.
dynaflash
Oct 6, 2008, 01:15 PM
Dyna, the source is interlaced (I think all TV broadcasts in the UK possibly are), so I have to set deinterlace on. I'm using Snapshot 3 (svn1797). What does decomb do? I should mention that these are just SD recordings.
I couldn't say if the ota sources in the uk are interlaced or not. I would be surprised (wouldn't be the first time) though since it was generally introduced in the us for video to film conversion. At any rate your activity log should tell you where you scan the source if HB thinks its interlaced or not from the ten evenly spaced preview samples.
Having said that. Decomb is the ticket since it analyzes every frame for deinterlacing and then applies the yadif deinterlacer to to just that frame if it requires it, but if not leaves it alone. Personally I only use Decomb. Why isn't it just default in HB then if its so cool? Well, it probably will be in the future but its still being tested ... and with stunning results.
I still get slightly blocky video - compared to other TV show recordings that have the same bitrate and resolution that are available by other methods.
These are the settings I'm using (basically the iPhone preset), although I have no clue when it comes down to all the advanced stuff. I just want the best quality I can get that will play on my Apple TV and any laptop (Mac or Windows).
For one, I have to ask if you want
the best quality I can get that will play on my Apple TV and any laptop (Mac or Windows)
then why would you say
I'm using (basically the iPhone preset)
?
The iPhone preset takes into account the iPhones known lack of storage space and also takes speed into account.
Using HB snapshot 3 in your case I would do exactly what I do:
http://forum.handbrake.fr/viewtopic.php?f=7&t=5129&start=175#p40876
But maybe toss in Decomb to address your interlaced/non-interlaced issue.
Note on Decomb: for those that used decomb in 0.9.2, jbrjake (decomb's author) added multi-threading for decomb in snapshot 3. Its much faster than before and frankly is a bit of genius.
Note on your settings: since your using a variation of the iPhone preset I can only assume your have an iPhone compatibilty need (if not, you chose the wrong preset to use) which you did not mention.
In that case, NightStorm is probably the authority on the best atv playback quality while maintaining iPhone compatibility. I will let him speak to the best setting for that. I can say that the iPhone will not playback cabac *or* bframes (which the atv can).
NightStorm
Oct 6, 2008, 01:24 PM
If I remember correctly, decomb wasn't included in .9.2; it was introduced after that release. As for its awesomeness, I can say that I have yet to not use it. I fully expect it to be defaulted on in the near future for all Handbrake encodes.
As for maintaining compatibility with both AppleTV and iPhone, I would suggest starting with the iPod Hi-Res preset and going from there. Both devices support anamorphic encoding (I use loose), the iPhone ignores the AC3 soundtrack if present, and I can get pretty good results using CRF instead of ABR for video encoding. The iPhone preset is really only useful if the iPhone is your only playback device (imo).
I have seen my preset posted around here (and on the Handbrake forums). While it was pretty good for .9.2 and earlier SVNs, the latest developer snapshot uses a new version of x264 that allow much lower RF values (CRF%). I'm currently playing with 55-60 and getting similar quality as before with smaller sizes.
Kilamite
Oct 6, 2008, 01:27 PM
Reason I was using the iPhone preset was to get the best quality available that would work on all devices. But really, come to think of it, I'll probably rarely watch something on the iPhone, and if I do, I can just re-encode it.
So when I use Decomb, do I enable deinterlace? I'm using slowest. Also, how do I know whether to choose 'Custom' or 'Default' decombing?
This isn't really aimed at HandBrake, but just in general when encoding - why is it the encoded result isn't as smooth as the original TV recording from EyeTV? It is the same FPS. Only thing I can think of is because it is an interlaced source, so when it deinterlaces it, it is making it progressive and loosing frames? I don't know, I'm just guessing.
Thanks for answering.
dynaflash
Oct 6, 2008, 01:42 PM
So when I use Decomb, do I enable deinterlace? I'm using slowest. Also, how do I know whether to choose 'Custom' or 'Default' decombing?
No, nothing but Decomb (default). Do not apply any deinterlacing when using decomb. The "Custom" decomb setting is for a soon to be removed optional decomb string in the prefs to override HB's default decomb string and just for testing, there have been no settings to date for decomb that are any better than what jbrjake settled on for the default options to date. Use Decomb default. As NightStorm so correctly put it, there is no reason not to.
This isn't really aimed at HandBrake, but just in general when encoding - why is it the encoded result isn't as smooth as the original TV recording from EyeTV? It is the same FPS.
Depends, what framerate/bitrate you mac is capable of with the raw eyetv file is different than what the atv is capable of.
Also, try this with Snapshot 3. Enable detelecine while keeping the fps "Same as source" , this enables vfr (another jbrjake enhancement) which should tell detelecine to drop any additional frames to keep the source frame rate. Now , ymmv. but it *may* smooth out the smoothness of the atv playback.
First though, I would try the settings I mentioned and see what you get. It may be the deinterlacing frames that were not interlaced was giving you the jerkiness you describe.
NightStorm: I stand corrected on 0.9.2 ... there was no decomb yet.
Too many rev's and snapshots since then for me to keep track of ;)
NightStorm
Oct 6, 2008, 01:51 PM
While you're using Decomb, I'd also recommend enabling VFR. I use both on virtually every recent encode I've done with great results.
NightStorm: I stand corrected on 0.9.2 ... there was no decomb yet.
Too many rev's and snapshots since then for me to keep track of
You don't have to tell me that one... I find it almost impossible anymore to help .9.2 people here and on the HB forums simply because I can't remember what is and isn't in that version. :D
Kilamite
Oct 6, 2008, 01:55 PM
Ahh right, I've turned off deinterlacing and got decomb on default now. I exported, and it isn't as fluent as the original EyeTV file. I'm playing the file back on my Mac, not my Apple TV, so I can compare directly next to the EyeTV recording.
The quality with the export is better - I've played around with a few settings in the advanced tab (I read the popup box to see what recommendations were).
"bframes=3:ref=1:me=umh:no-fast-pskip=1:cabac=0:analyse=all:direct=auto:subq=7:merange=32:bime=1"
Will all that affect the smoothness of the output file?
dynaflash
Oct 6, 2008, 01:56 PM
You don't have to tell me that one... I find it almost impossible anymore to help .9.2 people here and on the HB forums simply because I can't remember what is and isn't in that version. :D
Agreed. unofficially (of course) I would recommend to anyone that they go get HB dev snapshot 3, for the most part its worlds away from 0.9.2.
omni
Oct 6, 2008, 03:20 PM
While you're using Decomb, I'd also recommend enabling VFR. I use both on virtually every recent encode I've done with great results.
I don't have it in front of me but pretty sure in Snapshot 3 - the VFR option was rolled into Detelecine? It's not longer a standalone option and it doesn't say VFR anywhere now (at least on snapshot 3 mac gui)
dynaflash
Oct 6, 2008, 03:23 PM
I don't have it in front of me but pretty sure in Snapshot 3 - the VFR option was rolled into Detelecine? It's not longer a standalone option and it doesn't say VFR anywhere now (at least on snapshot 3 mac gui)
Very true, in HB Snapshot 3 if the fps in the main window is "Same as source" and detelecine is on, you get the same behavior as the old "VFR" in the macgui picture window. It was really redundant to have a separate checkbox that just said "VFR" and did the same (enabled detelecine and set the fps to "Same as source").
http://trac.handbrake.fr/changeset/1752
Kilamite
Oct 6, 2008, 03:57 PM
You recommend using VFR - but I thought detelecine was only for NTSC?
It wouldn't affect PAL broadcasts?
NightStorm
Oct 6, 2008, 04:14 PM
I know there were some issues with VFR and PAL content, but to be honest I didn't pay attention when the devs were talking about it one day in the IRC channel since I have no PAL content.
jbrjake
Oct 12, 2008, 06:09 PM
I know there were some issues with VFR and PAL content, but to be honest I didn't pay attention when the devs were talking about it one day in the IRC channel since I have no PAL content.
I changed the sensitivity level of detelecine to "loose" breaks a couple months ago, which was reported to make it work better with PAL stuff. And technically, the pullup algorithm's author, Richard Felker, has said in the past it should work on PAL.
See: http://forum.handbrake.fr/viewtopic.php?f=6&t=4833
wnbasac
Feb 13, 2010, 05:47 PM
A lot of times the video stream in the MKV is actually compatible with the ATV, and you'll just need to transcode the audio. So I would open the MKV in Quicktime and check the movie inspector first. The ATV can play up to 1280x720 @ 24fps, 5mbps for h.264 and 3mbps simple profile mpeg4. Just check here and make sure the stream is compatible: http://www.apple.com/appletv/specs.html
If so, I would use VisualHub and set the video to passthrough. That way you lose no quality when transcoding, only in audio. Plus it goes wayyyy faster. I did this for a 720P Battlestar Galactica episode and it took 3 minutes and it was done and played fine on the ATV.
i understand about QT and checking the video strem but how do u check visualhub for a video passthrough?????????
>
i tried using QT and exporting to M$V using the passthrough option but it just doesn't want 2 play in the ATV????
>
i also used ever other programs out there but OMG 4 hrs and counting????
>
i'm about ready to give up and get a WD system
getbigg21
Feb 13, 2010, 08:44 PM
ok cool ill try those. But how do people rip HD dvd's? as ive been downloading some 720p torrents but takes ages.
Yeah I would find a better way than torrents..... ie: newsgroups=)
ccaste
Jul 19, 2010, 09:56 PM
When I found out about MKVtools I thought that it was a godsend. However, when I attempt to convert a file from MKV to MP4 for an Apple TV the process completes and then I get an empty m4V file. Nothing there - file size is 0 K.
What's going on? Any help would be great.
eddyg
Jul 19, 2010, 10:24 PM
When I found out about MKVtools I thought that it was a godsend. However, when I attempt to convert a file from MKV to MP4 for an Apple TV the process completes and then I get an empty m4V file. Nothing there - file size is 0 K.
What's going on? Any help would be great.
I'd also love to know what is going on, but since you have given no information about the title, whether or not it played prior to conversion, what you used for conversion, what settings you used, or any errors output, and since I probably wouldn't know what they meant I can't.
However someone else, or even you, could answer the question with some troubleshooting.
Firstly at which point did the movie stop working? Are you sure the MKV was in good working order? Did you test it with VLC or some other player?
Then without knowing the encoder no-one can really help, however I'll assume that you used HandBrake since it is the most popular. What you need to do is look at the Activity Log and it will have a load of logging in there, you can look for obvious errors, or if none present themselves go to the handbrake forums and submit the *entire* activity log as an attachment to the support forum and maybe someone there can help.
Cheers, Ed.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.