View Full Version : mp4box adds compliant mpeg-4 text subtitles to .mp4!
celtic_druid
19th April 2005, 13:33
Well that was an still is built from the latest cvs. Anonymous cvs anyway, which I believe is a little behind.
Sharktooth
19th April 2005, 13:36
mirrored.
celtic_druid
19th April 2005, 13:50
So maybe when Elias tried it hadn't been mirrored yet? Because I checked before I posted and it had been but I guess that was like 2 hours later.
bond
19th April 2005, 14:41
that problem is fixed indeed with cd's latest compile :)
Elias
19th April 2005, 15:15
Originally posted by bond
that problem is fixed indeed with cd's latest compile :) Yes, just tried it out. Now, finally we can get this issue off our balls :)
Sharktooth
19th April 2005, 15:15
Originally posted by celtic_druid
So maybe when Elias tried it hadn't been mirrored yet? Because I checked before I posted and it had been but I guess that was like 2 hours later.
I mirrored the 2005.04.19 build when as soon as i could since i have to do it manually.
So maybe elias didnt get the latest version.
Elias
19th April 2005, 17:00
Originally posted by Sharktooth
I mirrored the 2005.04.19 build when as soon as i could since i have to do it manually.
So maybe elias didnt get the latest version.
Originally posted by Elias
Yes, just tried it out. Now, finally we can get this issue off our balls :) That means I just tried it out and it worked. The bug is indeed gone now. I most likely got the outdated cvs build cd mentioned before that. Let's waste time on finding other bugs :)
Doom9
23rd April 2005, 18:06
I'm wondering.. does anybody know the ratio of srt file and how much the corresponding timed text stream is going to take in the final mp4?
Stacey Melissa
23rd April 2005, 22:29
You can check to see exactly what the sub track takes by running mp4box -info on the subs track after it's imported. Which of course doesn't do you much good if you want to know that before it's imported. But I suppose you could add the subs track to its own new .mp4 and then run -info on it.
I haven't checked a lot of movies, but the few I've done have had .srt files around 150KB. After importing, mp4box -info shows them to be around 50KB. I don't know whether that includes any track overhead, though.
Edit: Almost forgot to mention that all my .srt files keep positioning information, which increases their size by about one third over .srt files without positioning.
Doom9
24th April 2005, 20:20
hmm.. all I get for info is a number of samples for each track. How does that translate into a size? The only track that could work is audio (assuming it's CBR).. but for the rest, how large is a sample? For instance for the video track I have #samples = number of frames.. but since each frame can have a different size...
bond
24th April 2005, 20:26
i think one sample is one text line (including empty lines), which of course can vary in their size
than you have a header which tells how the text should be displayed and which should have the same size for every ttxt stream mp4box creates from a .srt input
planet1
25th April 2005, 00:13
It might be a bit basic but this would be my approach:
mp4box -ttxt latin.srt
-> this will create latin.ttxt which should be of the same size as the sub-track in the mp4.
In order to verify that I would compare the filesizes of:
roman1.mp4
roman2.mp4 (=roman1.mp4+sub)
btw mp4box doesnt support Unicode .SRT's (although ttxt is UTF-8), but I doubt there are alot of tools which produce them anyway :rolleyes: .
ave :cool:
Stacey Melissa
25th April 2005, 01:21
@Doom9 - Here's an example mp4box command and the output, for what I'm talking about:
mp4box -info 3 "The Matrix - Revolutions.mp4"
Track # 3 Info - TrackID 3 - TimeScale 1000 - Duration 02:09:08.452
Media Type "text" - Media Sub Type "tx3g" - 2115 samples
3GPP/MPEG-4 Timed Text - Size 720 x 352 - Translation X=0 Y=0 - Layer 0
Computed info from media:
Total size 41054 bytes - Total samples duration 7748452 ms
Average rate 42 bps - Max Rate 736 bps
You have to specify the track number of the subs track in order to get the detailed readout.
@planet1 - The size of the .ttxt file is quite a bit larger than what the subs end up as in the .mp4. mp4box uses the .ttxt format simply as an intermediary format that is easy to work with in a text editor.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.