SubtitleEdit / subtitleedit

the subtitle editor :)
http://www.nikse.dk/SubtitleEdit/Help
GNU General Public License v3.0
8.29k stars 888 forks source link

Impossible to edit or convert .ismt subtitles which are contained in .mp4 files #5337

Closed DarkHorse-APP2 closed 4 months ago

DarkHorse-APP2 commented 3 years ago

Few days ago I was trying to find a solution to convert .ismt files to one readable as .SRT or even .TTML without success. As far as I know .ismt files are soft subtitles which are contained in .mp4 files using Microsoft Silverlight (subtitles are no encrypted by the way). Here's the MediaInfo i got using MP4Box.exe with the fowolling command: mp4box.exe -info sample.mp4

Format : MPEG-4 Format profile : ISML Codec ID : isml (isom/iso2/piff) Codec ID/Hint : IIS Smooth Streaming file format File size : 2.28 MiB Duration : 1 h 28 min Overall bit rate : 3 602 b/s Encoded date : UTC 2020-05-01 20:35:25 Tagged date : UTC 2020-05-01 20:35:25

Text ID : 1 Format : TTML Format/Info : Timed Text Markup Language Codec ID : dfxp Duration : 1 h 28 min Compression mode : Lossless Language : Spanish Forced : No Encoded date : UTC 2020-05-01 20:35:25 Tagged date : UTC 2020-05-01 20:35:25

As you can see the subtitle format inside the .mp4 (or .ismt) container is TTML (coded ID dfxp) and when I try to extract raws (lines of xml) with MP4Box using this command mp4box.exe -raws 1 sample.mp4, the software gives me 2124 samples insted of 2184 samples (how do I know that due the id subtitle wich is id="s2184"). After this I have used TTML.Tool-1.1.exe to merge all the samples I got, resulting in two files: .SRT and .TTML file but these subtitles have too many errors with timing and repeating lines (conversation fragments) as well. Another thing to have in mind is the TimeScale in this case 10000000 that "specifies timescale for the entire presentation as a number of unites that pass in one second" (I just copied this from: https://docs.microsoft.com/en-us/iis/extensions/smooth-streaming-manifest-structure/iis-smooth-streaming-client-manifest-smoothstreamingmedia-element). What I think is that this information helps to rebuild the entire subtitle with the properly timing but unfortunately I don't know how to manage.

I drop all the files here (in a .rar file) I got according what I said lines above: https://mega.nz/file/aBt2QawS#oVnZb0rOTEhLMDw2NIZCcXduVLe29UPJ5JEg8HQScd8

I'd really appreciate your help with this, regards.

niksedk commented 3 years ago

Thx for the files :)

Latest beta of SE should be able to load the ismt file: https://github.com/SubtitleEdit/subtitleedit/releases/download/3.6.2/SubtitleEditBeta.zip (it's a 64-bit mp4 file - I've not seen those with ismt before I think)

DarkHorse-APP2 commented 3 years ago

Thx for the files :)

Latest beta of SE should be able to load the ismt file: https://github.com/SubtitleEdit/subtitleedit/releases/download/3.6.2/SubtitleEditBeta.zip (it's a 64-bit mp4 file - I've not seen those with ismt before I think)

With the update (the beta version) I am able to open the .ismt subtitle but still it is missing too many lines of the conversation and of course timing it is completely wrong. Thank you much for reading me.

niksedk commented 3 years ago

What lines are missing?

DarkHorse-APP2 commented 3 years ago

I have checked a considerable amount of lines but it turns out that they are completed, the only thing is the timing, after I opened the the .ismt file with the new beta version it shows all the lines but then when I export them in .SRT the timing does not match with the final subtitle whether I aply positive or negative delay.

niksedk commented 3 years ago

Could you possibly email me a link to the video, so I can check the sync?

DarkHorse-APP2 commented 3 years ago

Could you possibly email me a link to the video, so I can check the sync?

Of course I'm sending you a link containing all the files such as video/audio tracks, subtitle, etc., and the output subtitle using the beta version: https://1fichier.com/?gbbnr6u016f6sczy8brc

DarkHorse-APP2 commented 3 years ago

Could you possibly email me a link to the video, so I can check the sync?

Did you find any solution to that issue?

djnice commented 2 years ago

Same problem with stpp, the timing does not match with the final subtitle.

Track # 1 Info - TrackID 1 - TimeScale 10000000 Media Duration 00:00:00.000 - Indicated Duration 01:33:35.700 Media Info: Language "Hungarian (hun)" - Type "subt:stpp" - 0 samples Fragmented track: 2807 samples - Media Duration 01:33:35.700 Fragment sample defaults: duration 0 size 0 stsd 1 sync 1 padding 0 degradation_priority 0 XML Subtitle Stream - namespace http://www.w3.org/ns/ttml Size 0 x 0 - Translation X=0 Y=0 - Layer 0 RFC6381 Codec Parameters: stpp All samples are sync Max sample duration: 0 / 10000000