How To: Convert MKV to MP4 for IPad (with Subtitles)

Discussion in 'iPad' started by Vidarious, Nov 27, 2010.

  1. macrumors newbie

    Nov 27, 2010
    Hello All,

    I've done a ton of research for a simple process to convert my Anime to a IPad friendly format. The results of my research says that converting video to IPad (MP4) format is incredibly easy as there are tons and tons of applications to do it for you. Unfortunately the same cannot be said for video's with subtitles. Generally when you convert you video (ie. MKV) which have subtitles embedded in them the videos get converted but the subtitles are lost.

    For those of us who enjoy the fruits of Japanese anime this can be frustrating. So I searched for a method of converting my anime such as Bleach, Naruto and Fairy Tail which are 720p/MKV format videos with embedded subtitles to IPad friendly MP4's. In this my first post at MacRumors I hope to spread the knowledge.

    The idea here is convert your videos from whatever format they are in to a IPad friendly MP4 format and *burn* in the subtitles. What this will do is permanently embed the subtitle's into the video frames. This means you can't turn them on/off if you wanted to -- they will always be present.

    Mac Method:
    1. Download and Install the FREE software MKVtools here: Link
    2. Open MKVTools
    3. Click "Open" and select the file you wish to convert. This must be a MKV or OGM format.
    4. In the main information window you will see the Video/Audio/Subtitle tracks. Place a check mark beside each one.
    5. Below the main information window select "MP4" as the format you want to convert to.
    6. Now you will be presented with a few options. I will go over them in detail
    6a. You will notice a "Device" option at the right, here you can select "IPad" and the software will automatically set default settings that the IPad will accept.
    6b. For the "Video" option you MUST select either H264 (1-pass) or H264 (2-pass). I recommend H264 (1-pass) as it is faster. If you select "Pass Thru" the subtitle burn will not work.
    6c. For the "Bit Rate (kbps)" option I recommend 1000 if your video is a 720p. This will most likely be lower then the original but still acceptable. Higher values will increase file size and too high of values will impact performance (stuttering). I've gone up to 1500 and had no problems but lean towards 1000 to keep the file size low. If the application puts in something lower then 1000 then stick with it - it means your original was lower then 1000.
    6d. For the "fps" option I recommend selecting whatever FPS the original video runs at. You may need to obtain this information from looking at the properties of the original video in iTunes or some other video software you have. In my case all my Anime is recorded at 23.976. In any case the default value already here will be OK.
    6e. For the "Resolution (pixel width)" option I recommend selecting the original pixel width of your video to a max of 1280. Also, never select a pixel width which is LARGER then your original video. This will deform your video and give you black bars.
    6f. For the "Audio" option you can select "Pass Thru" if you don't mind keeping the same quality audio as the original video file. However if you want to lower the size i suggest "AAC (2 Ch.)". If you listen to your videos via IPad speakers it will sound no different using this selection and save you a bit on the file size.
    6g. For the "Subtitles" option select "Burn" this is the option that will embed the subtitles into your video.
    7. Click "Convert"
    8. Go make a sandwich.
    9. When it is complete go to the folder of the original video and look for the new file created which will have the same name but end in ".MP4". IE. the file name Bleach-297.mkv will be called Bleach-297.mkv.mp4.
    10. Add this file to your iTunes and 'Get Info' on it to change the details (ie. TV Show -- Name -- Episode -- etc.)
    11. Sync and enjoy!

    Windows Method
    I am still working on this method. I've got it working with converting and burning the subtitles but the audio isn't syncing up to the video in all my attempts. The program I am using is Avidemux and MVKtoolnix (to extract the subtitles). I need to tweak some settings to figure it out before I post a method.

    I hope someone finds this useful. And please! If you know of other methods please share.
  2. macrumors 65816


    Dec 10, 2002
    If you use the "mux" subtitle setting, you can use the video passthrough option. Although, I frequently get soft subs that are way too large font using this option.
  3. thread starter macrumors newbie

    Nov 27, 2010
    The mux option doesn't burn the subtitles into the video. This can sometimes present a problem where the subtitles will not show when watching them through the iPad. Using the mux option also does not obtain the original settings of subtitles and can result in subtitles that look abnormal like you were saying.
  4. macrumors 65816


    Dec 10, 2002
    I think the mkvtool soft sub implementation is bugged anyways. I don't like hard subs.

    To produce a reliably compatible file for iPad/Mac/PC/HDTV any file with Audio channels > 5.1 AC3, use mkvtool to convert file to mp4 with video passthrough, audio convert to 5.1 AC3. Then I process the file as follows:

    I run the mkv/mp4 through handbrake using the high profile option. Set audio to include only ONE audio track (HDTV wont play video files with multiple audio tracks). Add as many subtitle tracks as you like (including external .srt files... Don't forget to choose the right language). In advanced, I usually set NO fast p-skip, NO DCT decimate, and uneven hexagon motion estimation. I let that transcode the file. When it is done, I pass it through MetaX and then metadatahootnanny to add chapters (alas, most mkv files lack chapters). I find this gives me a file that preserves quality fairly well and is playable on most anything.
  5. thread starter macrumors newbie

    Nov 27, 2010
    I tried this method when I was doing my testing but I came to a road block when I seen that handbrake doesn't support .ass subtitle files. Maybe my version is out of date?
  6. macrumors 65816

    Jan 13, 2008
    Download the Handbrake nightly builds here. The latest "official" version 0.9.4 doesn't support ssa/ass subs, but the nightly builds got support for them a couple months ago.

    I enjoyed Eden of the East on my iPod Touch on my fight today, converted last night. Each episode only took about 10 minutes and the subs came out perfectly. What's great is the Handbrake nightlies support both hard and soft subs. (I've been going with hard subs to keep the formatting.)
  7. macrumors 65816


    Sep 21, 2010
    one compound word.


    One of the reason apple product RULEZ
  8. macrumors 68030

    Amazing Iceman

    Nov 8, 2008
    Florida, U.S.A.
    Don't convert them. Just use Air Video (if you have a Mac) or similar program. With Air Video, you can select subtitles and alternate audio tracks on the fly.

    And if there's a show you must take with you, use either VLC or one of the other programs that are now available.
    But if you must convert certain episodes, Air Video would also convert. It even allows you to add files to the conversion queue in case you need to take them with you. Of course, if there's a need you could also stream your videos over the internet with great quality.

    It's worth trying it first, before getting into the tedious job of converting your anime library and wasting tons of hours and frying your processor.

    The phrase: "iPad Friendly Format" is not what it used to be in the past. Now more video formats are iPad Friendly.
  9. macrumors 65816


    Dec 10, 2002
    My solution is definitely time demanding but it has worked reliably well so far.

    Not to go far off topic, but does iPad VLC work well for you? I get about 12 minutes of playback before it crashes. Watching movies in 12 minutes chunks is no fun at all.
  10. macrumors member

    Jun 22, 2010
    Just a quick note that I've posted a few of my tips on going from DVD/BR-to-iPad-compatible-mp4 tips here:

    Although my method focuses more on things like preserving chapter markers, metadata info and increasing audio volume (not on subtitles), perhaps those reading this thread may find a few additional tips there.

    BTW, I can speak to one area where AirVideo may not be the ideal choice: When you're trying to stream from something other than a Mac or Win box (e.g. Linux or *BSD, etc) since the AirVideo server app only officially runs on those two platforms and uses a proprietary streaming format. In that case I'd recommend something such as a UPNP/DLNA server (e.g. MediaTomb) and an appropriate UPNP player app for the iPad.

    [fwiw, I'm not trying to slam AirVideo (which I own). I agree it's an awesome app/server combo if you're planning to use a Mac/Win system to serve your movies ]
  11. macrumors 6502

    Dec 22, 2007
    I am also an anime fan and interested in this as I may purchase an iPad soon. :)
  12. macrumors newbie

    Nov 11, 2010
    I'm surprised no one has mentioned this already, there is an app for this:

    Sub Video Player

    Anime conversions usually take less than 30s with their desktop software since all it is doing is remuxing the file. No conversion means no re-compression means perfect video and audio quality. Subtitles, fonts and chapters are all copied over. The actual iPhone/iPad player app supports the ASS sub format (found in almost all anime mkv) so you get all that fancy fonts, styling and even karakoke. Subs are not burned into the video so you can turn them off directly in the player if you want to go raw.

    If you just want basic text, then Air Video and VLC works. But expect it to be a bit messed up when it comes to karaoke and don't expect any fancy subtitle positioning. Air video also recompresses the video so there will be a little quality loss (though you probably won't notice it).

    Based on my experiences, VLC isn't quite up to the task of playing 720p mkv's yet. This isn't the fault of VLC, basically the iPhone/iPad just isn't powerful enough at the moment. I imagine in a few generations, VLC will work great with 720p videos.

    The only reason Sub Video Player can play videos in 720p is because it is using the iPhone/iPad video hardware acceleration.
  13. macrumors 6502

    Dec 22, 2007
    Thank you. I will look into this. :) A lot of times the karaoke is done as hard subs anyway. But I won't have that issue often as I own my anime and can probably just rip what I want to watch on an iPad.

    Is Movist available for the iPad? I find that it works much better than VLC in most instances.
  14. macrumors newbie

    Nov 11, 2010
    Movist is only available for Mac OS X as far as I know, not for iOS.

    I'm surprised you find it works better since pretty much everything on mac (Perian, VLC, Movist) all use the same open source playback engine so it mostly comes down to UI differences and minor subs difference since each has their own subtitle engine.
  15. macrumors 6502

    Dec 22, 2007
    VLC has issues with playback for a bunch of my MKV files that Movist does not. Like playing the first 2 minutes of a file and then starting over. VLC also hangs when loading MKV files. Movist does not. :p

    That said, Movist isn't perfect either. I have one series of MKV files that won't play at all in Movist but seem to play fine in VLC.
  16. macrumors newbie

    Nov 11, 2010
    Haha, you must be talking about that hang when playing subbed mkv files in VLC. That hang drives me nuts some times.

    Its some sort of bug with the way it handles fonts and VLC takes forever to time out and then continue loading the mkv. Its well documented on their forum, but it is still unfixed after so many releases. I wish I knew how to code so I could just go in and fix it.
  17. macrumors 6502

    Jan 26, 2010
    This is excellent. Thanksfor this. I don't need subs for mine.
  18. macrumors regular

    Feb 23, 2009
    Unfortunately, this, and most of other converters mentioned here does not take .sub and .idx subtitle files. I have quite a few opera AVI files with .sub subtitle files. I am still trying with mkv muxing route, meaning first combine .avi .sub .idx files with first muxing pass to get one mkv file, then try to convert mp4 with subtitle burning in. Not sure if this will work......

    BTW, is that true that iDevice and QuickTime Player will not show subtitle with .mp4 file name, have to change to .m4v?

  19. macrumors newbie

    Nov 11, 2010
    There is no real need for mkv muxing. With sub/idx files you basically have no choice but to burn them in and thus perform a full conversion. You should be able to just use handbrake to turn the avi+sub+idx into an mp4 video.

    I suppose you could use something like SubEdit to convert the sub+idx into SRT if you really wanted to and then use that file along with your video in Sub Video Player, VLC, etc.
  20. macrumors regular

    Feb 23, 2009
    You are right. VOB based surtitles like idx/sub just don't work for soft title. Has to be hard burned.

    What is the best way to make a soft title from a DVD copy (not avi)? transfer to MKV? I tried Handbrake to get a m4v, but still need to mux it later with Subler.

    Also, sometiems the video does not play smooth if I turn on the subtitle muxed by Subler? Anyone knows why?


  21. macrumors newbie

    Nov 11, 2010
    Well first you need to convert the DVD picture subs to SRT text subs.
    On Mac I think your only option is D-Subtitler:
    On Windows I would use SubtitleEdit

    Once you have the SRT Handbrake should pick up the SRT and embed it as proper MP4 subtitles that the iPad video app will pick up.
  22. macrumors 68030


    Jul 11, 2008
    Sorry to necro a thread, but..

    When I follow the OP's steps in MKVtools, no mp4 is produced. It produces an aac file and a log file, and says it's complete.. but it's not. If I select Pass-Thru, Burn subtitles, it gives me an MP4 but no subtitles. If I select Pass-Thru, mux subtitles, it produces a ton of temp files but no mp4. Suggestions welcome.
  23. macrumors member

    Oct 11, 2011
    Just came across this and tried to do it for some of my husband's anime that has yet to be licensed in the US. I ended up with five different files (logs etc). I am using version 2.4.7, does anyone know what myself and forty2j are doing wrong?
  24. macrumors member

    Jul 7, 2008
    Among the temporary files are ".log" files that are created by the various processes used to create the MP4 file. If there is no MP4 file created, then some error occurred in one of the steps of the process. Typically it's in the final "muxing" step. Muxing of subtitles is a common problem. ASS/SSA subs might not be converted properly for muxing into an MP4, and vobsubs won't work at all. So if you take a look in the muxing log file, that might be a good place to start the hunt for the problem.

    By the way, this version of MKVtools (version 2) is no longer being developed. It has been replaced by MP4tools, AVItools, and eventually a re-branded version of MKVtools. So you might want to take a look at MP4tools, which is the update to MKVtools 2 for the creation of MP4 videos. At the vary least, make sure that you have the latest version of MKVtools, as some download sites don't keep up with the latest updates.
  25. macrumors regular

    Mar 23, 2011
    My laptop is 6 years old, and cannot reliably run air video conversions on the fly while I watch. I tried using handbrake, which worked just fine, for videos which I wish to keep converted versions of.

    Otherwise, I just watch .mkv using AVPlayer HD, works like a charm, and now with wifi sync I can load videos over my home network, and do other things while the files transfer.

Share This Page