View Full Version : [Tutorial] Soft subtitles for iPhone, iPod, iTunes, QuickTime.
b66pak
2nd June 2009, 18:07
Here is a link for a tutorial for adding soft subtitles to iPhone, iPod, iTunes, QuickTime:
http://ncam.wgbh.org/mm/m4vsubs.html
Kudos to National Center For Accessible Media (NCAM) for squeezing Apple to cough the info.
_
N.B. If your language is not supported by Apple you will get "unknown" when you try to select it in iTunes or QuickTime. For twisted reasons it wont show at all on iPhone. So choose english (eng)!!!
_
Kurtnoise
2nd June 2009, 19:27
almost outdated now...
Now convert the SRT files to the TTXT format.
* Open a command-prompt window and change to the directory that contains MP4Box.exe and the source video file.
* Convert the SRT files to TTXT files: type (no quotes) "mp4box -ttxt filename.srt".
* Repeat for each SRT file.
Next, integrate each TTXT file into the source M4V.
* Type (no quotes) "mp4box -add filename.ttxt:lang=threeDigitLanguageCode targetMovieName.m4v. Here is a list of three-digit language codes.
* Repeat for each TTXT file.
When you have integrated all TTXT files into the movie, you must open the M4V in Dumpster (Windows or Mac) by dragging the M4V onto the Dumpster icon. The instructions below refer to Dumpster for Windows.
* Open the M4V in Dumpster.
* Double-click 'moov'.
The subtitle tracks you added to the movie can be found at the end of the 'trak' list. For example, if you added four subtitle tracks they will be the last four 'trak' entries. With this in mind...
* Double-click the first 'trak' that corresponds to your first subtitle track.
* Double-click 'tkhd'.
* Change Flags to $000001.
* Press the Apply button at the bottom of the window (note: press Apply after you make each change described below or else your changes will not be saved).
* Change Alternate Group to $0002.
* Double-click 'tkhd' to close.
* Double-click 'mdia'.
* Double-click 'hdlr'.
* Change Component subtype to $7362746c (this will change the type to 'sbtl').
Latest dev MP4Box build is able to do that in one step.
I hope this can be built-in to HandBrake.
Ritsuka
8th June 2009, 08:56
If you are on mac you can use subler (http://code.google.com/p/subler/) to do it (and many other things)
The next version of HandBrake will automatically convert closed captions to tx3g for mp4 and srt for mkv. There have been no work for subtitles from non dvd sources at the moment.
doubleJ
7th January 2013, 23:04
Here is a link for a tutorial for adding soft subtitles to iPhone, iPod, iTunes, QuickTime:
http://ncam.wgbh.org/mm/m4vsubs.html
Kudos to National Center For Accessible Media (NCAM) for squeezing Apple to cough the info.
N.B. If your language is not supported by Apple you will get "unknown" when you try to select it in iTunes or QuickTime. For twisted reasons it wont show at all on iPhone. So choose english (eng)!!!
This link is now dead.
Hopefully, this information is still valid.
This was the first result for a Google search for "soft subs on iphone".
JJ
fvisagie
9th January 2013, 09:35
That (or similar) information still seems to be available elsewhere on that site. Using their search produces results like http://ncam.wgbh.org/invent_build/web_multimedia/mobile-devices/m4v-subtitles. I just don't have a copy of the original guide to compare to.
doubleJ
10th January 2013, 16:23
That (or similar) information still seems to be available elsewhere on that site. Using their search produces results like http://ncam.wgbh.org/invent_build/web_multimedia/mobile-devices/m4v-subtitles. I just don't have a copy of the original guide to compare to.
Thanks for the post...
There are a couple issues with regard to Dumpster, though.
1: Dumpster doesn't seem to be available on Apple's website, anymore.
This thread (http://forum.videohelp.com/threads/326290-Where-can-I-download-Dumpster-for-WINDOWS) gives a download from 1997.
2: The Apple Developers' site is difficult to work with, in Internet Explorer.
It functions much better using Safari.
Now that I have Dumpster, I'll do a test of these instructions.
I already have a .mp4 (in theory, it should be the same as a .m4v) and .srt, so I'll bypass some of the steps.
I'll post my results.
JJ
doubleJ
10th January 2013, 22:47
Well, the first problem is that the dumpster executable listed in that thread doesn't seem to work with 64-bit Windows 7.
I tried running it with XP SP3 compatibility and as Administrator.
I'll try it on a 32-bit system (I have access to Windows 7 and Windows XP).
JJ
doubleJ
11th January 2013, 22:42
Dumpster did work on my Windows XP machine.
It is a pain-in-the-butt process.
I haven't tested on an iPhone, yet.
Sent from my Verizon HTC 8X using Board Express
doubleJ
15th January 2013, 16:08
It worked!!!
Now, I didn't follow all the instructions (I already had .srt files and stuff).
I used these instructions...
Now convert the SRT files to the TTXT format.
•Open a command-prompt window and change to the directory that contains MP4Box.exe and the source video file.
•Convert the SRT files to TTXT files: type (no quotes) "mp4box -ttxt filename.srt".
•Repeat for each SRT file.
Next, integrate each TTXT file into the source M4V.
•Type (no quotes) "mp4box -add filename.ttxt:lang=threeDigitLanguageCode targetMovieName.m4v. Here is a list of three-digit language codes.
•Repeat for each TTXT file.
When you have integrated all TTXT files into the movie, you must open the M4V in Dumpster (Windows or Mac) by dragging the M4V onto the Dumpster icon. The instructions below refer to Dumpster for Windows.
•Open the M4V in Dumpster.
•Double-click 'moov'.
The subtitle tracks you added to the movie can be found at the end of the 'trak' list. For example, if you added four subtitle tracks they will be the last four 'trak' entries. With this in mind...
•Double-click the first 'trak' that corresponds to your first subtitle track.
•Double-click 'tkhd'.
•Change Flags to $000001.
•Press the Apply button at the bottom of the window (note: press Apply after you make each change described below or else your changes will not be saved).
•Change Alternate Group to $0002.
•Double-click 'tkhd' to close.
•Double-click 'mdia'.
•Double-click 'hdlr'.
•Change Component subtype to $7362746c (this will change the type to 'sbtl').
•Double-click 'hdlr' to close.
Repeat the above steps for each 'trak' that corresponds to a subtitle track, but leave all other 'tkhd'/Flags set to $000000. When you have finished altering all tracks, close Dumpster and check your movie in iTunes:
•Open the M4V in iTunes.
•Hover the pointer over the player so that the control bar appears.
•Click once on the bubble icon and you should see an alphabetical list of your subtitle tracks, as shown in the following image. If any subtitle tracks are missing from the menu, close iTunes, re-open the M4V in Dumpster and verify that you have set all the flags, groups and component subtypes as specified above.
I will say that it's quite a pain in the butt, but it does work.
Also, the file has to be on the device (it wouldn't show subtitles if playing from a website).
JJ
Kurtnoise
15th January 2013, 17:13
Latest dev MP4Box build is able to do that in one step.
MP4Box -add input.srt:name=English Subtitles Track:lang=en:hdlr=sbtl:layout=-1:group=2 output.m4v
blue part is mandatory for Apple devices although the layout value can be changed.
doubleJ
15th January 2013, 23:16
Oooh...
Thanks, I just noticed your post that said MP4box did it, but there was no instruction on how to do it.
I was just getting ready to ask what the steps were.
Hehehe...
I'll test it out and report.
Now, the original instructions say "lang=threeDigitLanguageCode" but your say "name=English Subtitles Track:lang=en".
Is that just a difference in MP4box versions or does it even matter?
JJ
doubleJ
16th January 2013, 00:06
Kurtnoise's steps worked (I did the 2 character language code)!!!
It is quite a bit less intensive than the Dumpster way.
iTunes doesn't sort the languages in order, though (not sure what's up with that).
It put Chinese as the second to last (well after English, but before Russian).
JJ
Kurtnoise
16th January 2013, 09:17
Now, the original instructions say "lang=threeDigitLanguageCode" but your say "name=English Subtitles Track:lang=en".
Is that just a difference in MP4box versions or does it even matter?
Yes, it does matter...3 ISO Codes are not supported by Apple devices, only 2 letters.
iTunes doesn't sort the languages in order, though (not sure what's up with that).
It put Chinese as the second to last (well after English, but before Russian).
In which order do you want your streams ?
doubleJ
16th January 2013, 15:37
Yes, it does matter...3 ISO Codes are not supported by Apple devices, only 2 letters.
Hmmm...
That's odd, because the first file that I did (which used the three letter codes) worked just fine.
In which order do you want your streams ?
In theory, in the order that I entered them or alphabetical (neither of which happened, as I entered them in alphabetical order).
JJ
Kurtnoise
16th January 2013, 19:44
That's odd, because the first file that I did (which used the three letter codes) worked just fine.
iirc, it works with iTunes but not on iPhone or iPad...
Using this command line :
MP4Box -ipod -brand M4VP:1 -add Video.h264:fps=23.976 -add Sub.en.srt:lang=en:name=English Track:hdlr=sbtl:layout=-1:group=2 -add Sub.Ch.srt:lang=zh:name=Chinese Track:hdlr=sbtl:layout=-1:group=2:disabled -add Sub.Rus.srt:lang=ru:name=Russian Track:hdlr=sbtl:layout=-1:group=2:disabled Output.m4v
I've got :
http://uppix.net/5/2/a/c951d3dda27ea9bf0fa7d345a4b41.png
doubleJ
16th January 2013, 20:01
Hmmm...
I didn't know you could add multiple subtitles with the same command.
I've been repeating the command for each subtitle.
I noticed some distinct differences between your code and my code.
I wonder if that's the reason why it's not working with iPhone/iPad.
I can say that both of my attempts (MP4Box/Dumpster and just MP4Box) worked on iTunes, iPhone 4, and iPad2.
JJ
doubleJ
16th January 2013, 20:25
My MP4Box GUI has two Apple options.
One uses -ipod and the other uses hdlr=sbtl and not -ipod.
I think your problem might be combining the two.
JJ
Kurtnoise
17th January 2013, 09:35
-ipod switch or m4v output extension does exactly the same thing...
doubleJ
17th January 2013, 15:59
Just for verification...
I use .mp4 instead of .m4v.
I assume it doesn't make any difference, but it could be worth noting.
BTW...
I found an MP4Box front-end called My MP4Box GUI (http://my-mp4box-gui.zymichost.com/) that includes the required header information.
I also tested this command-line...
GPAC-0.5.0\MP4Box.exe -add Qore3.Chinese.srt:name=Chinese:lang=zh:hdlr=sbtl:layout=-1:group=2 -add Qore3.English.srt:name=English:lang=en:hdlr=sbtl:layout=-1:group=2 -add Qore3.French.srt:name=French:lang=fr:hdlr=sbtl:layout=-1:group=2 -add Qore3.German.srt:name=German:lang=de:hdlr=sbtl:layout=-1:group=2 -add Qore3.Portuguese.srt:name=Portuguese:lang=pt:hdlr=sbtl:layout=-1:group=2 -add Qore3.Russian.srt:name=Russian:lang=ru:hdlr=sbtl:layout=-1:group=2 -add Qore3.Spanish.srt:name=Spanish:lang=es:hdlr=sbtl:layout=-1:group=2 Qore3-AfterMp4BoxMultiple.mp4
...and it works.
JJ
Edit...
How do you make a link?
JJ
Kurtnoise
17th January 2013, 19:19
m4v or m4a output files extension activates some tunings for Apple devices...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.