Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

LinMac

macrumors 65816
Original poster
Oct 28, 2007
1,270
43
First of all I would like to start by saying that this thread is mostly about subtitle support. There is another thread here that deals with conversion of the video, audio, and pass through of both.

I've tried two different methods of putting subtitles into m4v video:

Burned in or permanent subtitles:

1) Used mkvextract to extract the ssa subtitle track.
2) Converted ssa subtitle track to srt subtitle track with Subtitle Workshop
3) Cleaned subtitle track with Subcleaner
4) Converted video into valid AppleTV mp4 with VisualHub.
5) Opened video in Submerge, selected appropriate srt file, rendered subtitles, saved as self contained mov, imported into iTunes, and synced to AppleTV.

Where I failed:

Submerge is an excellent program that rendered the subtitles correctly, but there are two fatal limitations that I don't know how to work around.

It only supports 2 lines of subtitles.
It won't automatically wrap subtitle lines that are too long.

I had Subcleaner limit the lines to 50 characters which will wrap some lines into 3 or even 4 different lines. 65 characters can help work around this, but some dialog is still into 3 lines which Submerge still cuts off. One line that I just looked at was 145 characters long and that isn't the longest one.

Soft subtitles compatible with AppleTV/iPhone with Muxo:

1) Used mkvextract to extract the ssa subtitle track.
2) Converted ssa subtitle track to srt subtitle track with Subtitle Workshop
3) Cleaned subtitle track with Subcleaner
4) (Tried with and without this step with same results) Converted the srt document to utf8 with iconv (iconv -i ascii -t utf8 fileASCII.srt > fileUTF8.srt
4) Converted video into valid AppleTV mp4 with VisualHub.
5) Opened video in Muxo, clicked + to add subtitle track, selected the track, clicked Add Track, closed the program.

Where I failed:

I opened all_done_subtitles_added.mp4 in Quicktime Pro without a problem, but after changing the file type to m4v so it will pick up subtitles QuickTime Pro gives the error: "The movie contains an incorrect duration." The file will open in VLC 0.9.4, but the seek bar is unusable as it tries to seek through what it thinks are thousands of minutes of content moving far too quickly.

The real question:

How does one actually add actual subtitle tracks from an mkv on a Mac? I have many tools that help get part of the process done, but competing the process seems impossible to do in a way that is actually readable on the screen.

Please don't bother to suggest that I use QuickTime Pro + Perian to export the video directly from the MKV with subtitles read by Perian. This works at 5fps on a Late 2008 Macbook Pro and is unusable in my opinion.

Final notes:

I am using or have available OS X Leopard 10.5.5, QuickTime Pro, Handbrake 0.9.3 Snapshot 3 (r1797), VisualHub 1.34, Perian 1.1.2, Subtitle Workshop, Subcleaner, mkvextract, VLC 0.9.4, and other assorted tools. I am using Crossover from Codeweavers (Wine) for the Windows software so I do not have a full Windows installation available.
 
Subtitles

If I understand what you want to do? Burn in Subtitles during mkv=>mp4 conversion?

Short anwser: Perian and Visualhub:Advanced:Video:Force:Quicktime Decoding

Is this what you want to do?

FROM Visualhub forum: (not my post)

"It's been mentioned before, but now that Perian 1 is officially out, I thought I'd make a new post on keeping subtitles in a VisualHub conversion. This is for (DivX or XViD) .avi files or .mkv files with external .srt or .ssa subtitles or for .mkv files with embedded srt or ssa subtitles......"

Check out this post:

http://www.isquint.org/cgi-bin/ikonboard.cgi?act=ST;f=14;t=3733

Post back here to let us know if it works for you.
 
If I understand what you want to do? Burn in Subtitles during mkv=>mp4 conversion?

Short anwser: Perian and Visualhub:Advanced:Video:Force:Quicktime Decoding

Is this what you want to do?

FROM Visualhub forum: (not my post)

"It's been mentioned before, but now that Perian 1 is officially out, I thought I'd make a new post on keeping subtitles in a VisualHub conversion. This is for (DivX or XViD) .avi files or .mkv files with external .srt or .ssa subtitles or for .mkv files with embedded srt or ssa subtitles......"

Check out this post:

http://www.isquint.org/cgi-bin/ikonboard.cgi?act=ST;f=14;t=3733

Post back here to let us know if it works for you.

That can't/won't work.

Quicktime decoding processes at below 5fps which means each 30 minute block of video takes 5 hours to process on the uni-Macbook Pro 2.8GHz with 128GB SSD. Quicktime just isn't usable for video encoding at those speeds.
 
So would the soft subtitle one work with the extension mp4 not m4v? if it does I'll try and do this later
 
So would the soft subtitle one work with the extension mp4 not m4v? if it does I'll try and do this later

I'm thinking that the mp4 container doesn't contain support for soft subtitles because Quicktime won't pick up that data if the file is named mp4. It will if the file is named m4v because of the different container format.
 
It will if the file is named m4v because of the different container format.
.m4v and .mp4 are *exactly* the same container with a different file extension only, which for apple signals their devices to look for certain characteristics for some reason.

eg. in HandBrake if you use AC3 in an mp4 and chapter markers, the atv will not see them. Simply rename the same file to mymovie.m4v and voila, the atv sees them. Same is true for just chapter markers on an iPod.
Trust me, the muxer creates the exact same container. Go figure.
 
.m4v and .mp4 are *exactly* the same container with a different file extension only, which for apple signals their devices to look for certain characteristics for some reason.

eg. in HandBrake if you use AC3 in an mp4 and chapter markers, the atv will not see them. Simply rename the same file to mymovie.m4v and voila, the atv sees them. Same is true for just chapter markers on an iPod.
Trust me, the muxer creates the exact same container. Go figure.

Not a worry. I just assumed they were different containers because of the different Quicktime behavior, but it is good to know. :D
 
Worked?

LinMac I know it´s been a year but im trying to do the same thing and was wondering.. did you make it worked?

How did you do it?

I would really apreciate the help becasue i've been googling for some time now but can´t find a straight answer
 
If I understand what you want to do? Burn in Subtitles during mkv=>mp4 conversion?

Short anwser: Perian and Visualhub:Advanced:Video:Force:Quicktime Decoding

Is this what you want to do?

FROM Visualhub forum: (not my post)

"It's been mentioned before, but now that Perian 1 is officially out, I thought I'd make a new post on keeping subtitles in a VisualHub conversion. This is for (DivX or XViD) .avi files or .mkv files with external .srt or .ssa subtitles or for .mkv files with embedded srt or ssa subtitles......"

Check out this post:

http://www.isquint.org/cgi-bin/ikonboard.cgi?act=ST;f=14;t=3733

Post back here to let us know if it works for you.

That can't/won't work.

Quicktime decoding processes at below 5fps which means each 30 minute block of video takes 5 hours to process on the uni-Macbook Pro 2.8GHz with 128GB SSD. Quicktime just isn't usable for video encoding at those speeds.

LinMac I know it´s been a year but im trying to do the same thing and was wondering.. did you make it worked?

How did you do it?

I would really apreciate the help becasue i've been googling for some time now but can´t find a straight answer


Wow. After all this time it came down to 2 more clicks.
I don't know about for you, but for me... Keeping the subtitles in my MKVs is worth a 200 minute conversion for a 30 minute file. I'll just run it overnight.

I use a 2.53 GHz Unibody MacBook Pro and that's how long the files are taking me. and YES it WORKS!

To help out the previous poster, for the past 6 months or so I've been using a wonderful program called MKVTools to convert and keep the subtitles. This was working but unfortunately it causes a little bit of a degrade in the quality, and the subtitles can occasionally look really ugly/jumbled. A few days ago I decided to try out Quicktime X's encoding (with Perian) and the subtitles looked BEAUTIFUL (just like the original was intended to look) I rejoiced until yesterday when I found out that some of the files DROPPED AUDIO after being converted!!

Using the method in this thread (which I only found because of frustrations with Handbrake... it really was a miracle) is working SEAMLESSLY so far! Again, that was

Perian with Quicktime
Visualhub:Advanced:Force:Quicktime Decoding

AMAZING! I literally freaked out running around because of excitement for about 5 minutes after it worked! I've been working on this constantly for the last 3 years, and the last 8 or so hours were completely dedicated to it! I finally gave up, went to bed, decided to run one last search for "handbrake srt" and this came up as a related topic!!

THANK YOU THANK YOU THANK YOU!!!
Hope pour souls in the future can find this thread as well. SPREAD THE WORD!
 
Wow. After all this time it came down to 2 more clicks.
I don't know about for you, but for me... Keeping the subtitles in my MKVs is worth a 200 minute conversion for a 30 minute file. I'll just run it overnight.

I use a 2.53 GHz Unibody MacBook Pro and that's how long the files are taking me. and YES it WORKS!

To help out the previous poster, for the past 6 months or so I've been using a wonderful program called MKVTools to convert and keep the subtitles. This was working but unfortunately it causes a little bit of a degrade in the quality, and the subtitles can occasionally look really ugly/jumbled. A few days ago I decided to try out Quicktime X's encoding (with Perian) and the subtitles looked BEAUTIFUL (just like the original was intended to look) I rejoiced until yesterday when I found out that some of the files DROPPED AUDIO after being converted!!

Using the method in this thread (which I only found because of frustrations with Handbrake... it really was a miracle) is working SEAMLESSLY so far! Again, that was

Perian with Quicktime
Visualhub:Advanced:Force:Quicktime Decoding

AMAZING! I literally freaked out running around because of excitement for about 5 minutes after it worked! I've been working on this constantly for the last 3 years, and the last 8 or so hours were completely dedicated to it! I finally gave up, went to bed, decided to run one last search for "handbrake srt" and this came up as a related topic!!

THANK YOU THANK YOU THANK YOU!!!
Hope pour souls in the future can find this thread as well. SPREAD THE WORD!

But how do you configure VisualHub, because I can't find a way to choose the language (my MKV contains two subtitles). Or did you just add a seperate .srt in the folder?
 
I demux the video, audio, subtitles and chapters with iMKVExtract. I encode video to 720p in Handbrake, if needed. Then mux the mp4, ac3, srts and chapters together in Subler.

I use Jubler to rewrite .ass subtitles as .srts. I currently use command line tools (mkvdts2ac3) to re-encode DTS to AC3 although I'm thinking of trying out this GUI app next time around.
 
There are lots of options for .mkv files with subs. Lately, I installed Perian and I have Quicktime Pro. I open the .mkv in quicktime, along with the .srt or whatever form of subtitle you have and then SAVE (not export) it as a .mov file, then I use Toast, Popcorn or Handbrake to convert the .mov to .m4v. Works for what I use it for. I'm so anal about it, I even edit the .srt files in text editor if they're not JUST how I like them!:D
 
Sorry to dig up an old thread, but its what I could find on the subject...

I've tried a couple of these methods, for getting a couple movies to mp4 with subtitles for viewing on the XBox 360, but it appears these subs aren't actually burned in, rather just contained in the container?

(The 360 doesn't support traditional subs)

Any suggestions?
 
Sorry to dig up an old thread, but its what I could find on the subject...

I've tried a couple of these methods, for getting a couple movies to mp4 with subtitles for viewing on the XBox 360, but it appears these subs aren't actually burned in, rather just contained in the container?

(The 360 doesn't support traditional subs)

Any suggestions?

I use Handbrake for this. If the subtitle is part of the original file (assuming mkv?), I don't think you have a choice but to burn the subtitles into the video. Subtitles have to be an external .srt file if you want to make the subtitle optional in Handbrake.
 
I use Handbrake for this. If the subtitle is part of the original file (assuming mkv?), I don't think you have a choice but to burn the subtitles into the video. Subtitles have to be an external .srt file if you want to make the subtitle optional in Handbrake.

Handbrake can also convert closed caption tracks on DVDs as a soft subtitle track.
 
Can someone post an idiot's guide for this. Thanks.

- An Idiot
No guide needed, if soft subs are in the mkv they will show up in the source subtitle list in HB. Either compile the current svn head or wait til the next nightly is generated ( 4 a.m. in France iirc) and download the binary. Done deal.

http://forum.handbrake.fr/viewtopic.php?f=6&t=15901

You will know if that commit is in the nightly by clicking on "recent changes" after choosing your platform.
 
To clarify...

X-Box 360 will not read subtitle tracks/files. The subtitles have to be *burned into* the movie.

I'll check out the nightlies of Handbrake, but last I heard they aren't doing burned subtitles from srt files...
 
Guess I'll look for something that can convert srt to vobsub (or whatever file type is necessary for Handbrake to burn in subs).

Any ideas?
 
I just opened the .mkv file (created with MakeMKV from DVD and Blu-Ray rip) in QuicktimePro7+Perian. Waited until it was read into memory, and then Exported the movie for AppleTV. It seems to run right around 1:1 conversion-time:running-time at 110%CPU on an iMac 3GHz Core2Duo.

There is some terrible sound and problems when playing the mkv in QT7pro. It plays fine in VLC. The video exhibits bad blocky "compression type" errors, and the audio is mostly loud clicking. Maybe the QT glitch is due to a monophonic AC3 file?

Anyway, the subtitles appear to be included, so if the audio and video problem could be resolved, this appears to be the easiest way to get movies with subtitles into the stupid DRM crippled viewing system that includes AppleTV.


<edit>
As someone mentioned above, The NIGHTLY BUILD of Handbrake ( http://build.handbrake.fr/job/Mac32/lastBuild/ ) converts these things fine! Whew. Problem solved. :)

I am curious why Handbrake still releases a "64 bit" OSX app, when it's dependent upon VLC and VLC has stopped development of a 64bit OSX release.
 
I am curious why Handbrake still releases a "64 bit" OSX app, when it's dependent upon VLC and VLC has stopped development of a 64bit OSX release.
Simple, using vlc's dylib only allows hb to read a protected dvd. Period. Many (most?) users prerip their dvd content to make queueing up several encodes at a time much easier and/or use hb to transcode movie files. In either case there is no need for vlc and the 64 bit version of hb is around 15% faster than the 32 bit version.

Also, you *can* find builds of the last relatively stable 64 bit vlc if you need to use hb on physical dvd's.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.