VideoHelp Forum


Try StreamFab All-in-One and rip streaming video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. This is related to a separate issue that I'm having but I wanted to ask a new question so as not to conflate things.

    I have an MP4 file "input.mp4" which has a tx3g subtitle stream that I would like to extract, ideally as an SRT. Here is a mediainfo excerpt:

    Code:
    General
    Complete name                            : D:\input.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (mp42/isom/iso2/iso5/dash/avc1/dby1/mp41)
    File size                                : 5.79 GiB
    Duration                                 : 2 h 39 min
    Overall bit rate                         : 5 188 kb/s
    
    [...]
    
    Text
    ID                                       : 4
    Format                                   : Timed Text
    Muxing mode                              : sbtl
    Codec ID                                 : tx3g
    Duration                                 : 2 h 39 min
    Bit rate                                 : 131 b/s
    Stream size                              : 153 KiB (0%)
    Language                                 : German
    Default                                  : Yes
    Forced                                   : No
    Alternate group                          : 2
    Here is my experience extracting the subtitles with various software:
    • MKVToolNix GUI does not recognize the subtitle stream.
    • My MP4Box GUI recognizes the subtitle stream (file information: "Text - Timed text"), but fails at extracting it.
    • LosslessCut similarly recognizes the stream (tag "t3xg", codec "mov_te") and also fails to extract it.
    • ffmpeg: "ffmpeg -i input.mp4 subs.srt" and XMedia Recode output almost the exact same file:
      Code:
      1
      00:00:02,440 --> 00:00:02,440
      <font face="Serif" size="18">* ER SCHLUCHZT *</font>
      
      2
      00:00:03,200 --> 00:00:03,200
      <font face="Serif" size="18">* ER SCHLUCHZT *</font>
      
      3
      00:00:04,800 --> 00:00:04,800
      <font face="Serif" size="18">* ER SCHLUCHZT *</font>
      
      4
      00:00:05,920 --> 00:00:05,920
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      5
      00:00:06,400 --> 00:00:06,400
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      6
      00:00:08,000 --> 00:00:08,000
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      7
      00:00:09,600 --> 00:00:09,600
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      [...]
      
      4818
      02:39:38,960 --> 02:39:38,960
      <font face="Serif" size="18">Also, wie bist du zur Waise geworden?</font>
      
      4819
      02:39:39,200 --> 02:39:39,200
      <font face="Serif" size="18">Also, wie bist du zur Waise geworden?</font>
      
      4820
      02:39:40,800 --> 02:39:40,800
      <font face="Serif" size="18">Also, wie bist du zur Waise geworden?</font>
      
      4821
      02:39:42,000 --> 02:39:42,000
      <font face="Serif" size="18">Oh, verstehe.
      Ist kompliziert, richtig?</font>
      
      4822
      02:39:42,400 --> 02:39:42,400
      <font face="Serif" size="18">Oh, verstehe.
      Ist kompliziert, richtig?</font>
      The only difference is that the final entry (4822) is not included in XMedia's output file. Note that all of the subtitle durations are 0, which makes them unusable. The timestamps are correct, though.
    • MP4Box: "mp4box input.mp4 -srt 4" outputs the following:
      Code:
      1
      00:00:02,440 --> 00:00:03,200
      * ER SCHLUCHZT *
      
      2
      00:00:03,200 --> 00:00:04,800
      * ER SCHLUCHZT *
      
      3
      00:00:04,800 --> 00:00:05,520
      * ER SCHLUCHZT *
      
      4
      00:00:05,920 --> 00:00:06,400
      So ist das nicht richtig.
      
      5
      00:00:06,400 --> 00:00:08,000
      So ist das nicht richtig.
      
      6
      00:00:08,000 --> 00:00:09,600
      So ist das nicht richtig.
      
      7
      00:00:09,600 --> 00:00:10,640
      So ist das nicht richtig.
      
      [...]
      
      3637
      01:55:19,280 --> 01:55:20,000
      * Alarm geht los *
      
      3638
      01:55:20,000 --> 01:55:21,600
      * Alarm geht los *
      
      3639
      01:55:21,600 --> 01:55:22,320
      * Alarm geht los *
      
      3640
      01:55:24,440 --> 01:55:24,800
      Legen Sie bitte alle
      Metallgegenstände ab:
      
      3641
      01:55:24,800 --> 01:55:26,400
      Legen Sie bitte alle
      Metallgegenstände ab:
      
      3642
      01:55:26,400 --> 01:55:26,640
      
      
      3643
      01:55:26,640 --> 01:55:28,000
      
      
      3644
      01:55:28,000 --> 01:55:29,600
      Compared to ffmpeg's output, the subtitle durations are now correct, BUT the subtitle file abrupty ends more than 40 minutes before the end of the movie. Also, the font information is gone, but I don't really care about that. When running the above MP4Box command, I get the error messages
      Code:
      [iso file] Unknown box type 6F660000(73/100)
      [iso file] Unknown box type 14000000
      [iso file] Unknown box type 72756E01
      Conversion failed (BitStream Not Compliant)

    To summarize, ffmpeg gives me unusable subtitles with display durations of 0, while MP4Box gives me usable subtitles which however end too early.

    How do I fix either of those issues so I can get a usable SRT file?

    Thank you in advance!
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Did you try the conversion to .ass format via this command
    Code:
    ffmpeg -i input.mp4 out.ass
    https://mplayer-users.mplayerhq.narkive.com/o7IVaf7i/how-to-extract-tx3g-subtitle-from-mp4-file
    Quote Quote  
  3. Originally Posted by davexnet View Post
    Did you try the conversion to .ass format via this command
    Code:
    ffmpeg -i input.mp4 out.ass
    Hello again Indeed I have, and as far as I can tell, the issue with the zero duration subtitles persists:
    Code:
    [Script Info]
    ; Script generated by FFmpeg/Lavc58.54.100
    ScriptType: v4.00+
    PlayResX: 384
    PlayResY: 288
    
    [V4+ Styles]
    Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
    Style: Default,Serif,18,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
    
    [Events]
    Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
    Dialogue: 0,0:00:02.44,0:00:02.44,Default,,0,0,0,,* ER SCHLUCHZT *
    Dialogue: 0,0:00:03.20,0:00:03.20,Default,,0,0,0,,* ER SCHLUCHZT *
    Dialogue: 0,0:00:04.80,0:00:04.80,Default,,0,0,0,,* ER SCHLUCHZT *
    Dialogue: 0,0:00:05.92,0:00:05.92,Default,,0,0,0,,So ist das nicht richtig.
    Dialogue: 0,0:00:06.40,0:00:06.40,Default,,0,0,0,,So ist das nicht richtig.
    Dialogue: 0,0:00:08.00,0:00:08.00,Default,,0,0,0,,So ist das nicht richtig.
    Dialogue: 0,0:00:09.60,0:00:09.60,Default,,0,0,0,,So ist das nicht richtig.
    
    [...]
    And as expected, VLC shows no subtitles when selecting this .ass file as the subtitle track.

    It's really weird that MP4Box is the only software which seems to recognize the correct subtitle duration. (And unfortunate that it's also the only software with this premature subtitle cut-off issue.)
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I know we touched on it, but are you running the most recent MP4Box
    and the most recent FFmpeg ?

    Do you have a media file (you can share) with these subs so I can play with it?

    In this thread they talk about opening the mp4 directly in Subtitle Edit

    https://forum.doom9.org/showthread.php?t=174661
    Last edited by davexnet; 18th Jul 2021 at 21:08.
    Quote Quote  
  5. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by Fleand View Post
    This is related to a separate issue that I'm having but I wanted to ask a new question so as not to conflate things.

    I have an MP4 file "input.mp4" which has a tx3g subtitle stream that I would like to extract, ideally as an SRT. Here is a mediainfo excerpt:

    Code:
    General
    Complete name                            : D:\input.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (mp42/isom/iso2/iso5/dash/avc1/dby1/mp41)
    File size                                : 5.79 GiB
    Duration                                 : 2 h 39 min
    Overall bit rate                         : 5 188 kb/s
    
    [...]
    
    Text
    ID                                       : 4
    Format                                   : Timed Text
    Muxing mode                              : sbtl
    Codec ID                                 : tx3g
    Duration                                 : 2 h 39 min
    Bit rate                                 : 131 b/s
    Stream size                              : 153 KiB (0%)
    Language                                 : German
    Default                                  : Yes
    Forced                                   : No
    Alternate group                          : 2
    Here is my experience extracting the subtitles with various software:
    • MKVToolNix GUI does not recognize the subtitle stream.
    • My MP4Box GUI recognizes the subtitle stream (file information: "Text - Timed text"), but fails at extracting it.
    • LosslessCut similarly recognizes the stream (tag "t3xg", codec "mov_te") and also fails to extract it.
    • ffmpeg: "ffmpeg -i input.mp4 subs.srt" and XMedia Recode output almost the exact same file:
      Code:
      1
      00:00:02,440 --> 00:00:02,440
      <font face="Serif" size="18">* ER SCHLUCHZT *</font>
      
      2
      00:00:03,200 --> 00:00:03,200
      <font face="Serif" size="18">* ER SCHLUCHZT *</font>
      
      3
      00:00:04,800 --> 00:00:04,800
      <font face="Serif" size="18">* ER SCHLUCHZT *</font>
      
      4
      00:00:05,920 --> 00:00:05,920
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      5
      00:00:06,400 --> 00:00:06,400
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      6
      00:00:08,000 --> 00:00:08,000
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      7
      00:00:09,600 --> 00:00:09,600
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      [...]
      
      4818
      02:39:38,960 --> 02:39:38,960
      <font face="Serif" size="18">Also, wie bist du zur Waise geworden?</font>
      
      4819
      02:39:39,200 --> 02:39:39,200
      <font face="Serif" size="18">Also, wie bist du zur Waise geworden?</font>
      
      4820
      02:39:40,800 --> 02:39:40,800
      <font face="Serif" size="18">Also, wie bist du zur Waise geworden?</font>
      
      4821
      02:39:42,000 --> 02:39:42,000
      <font face="Serif" size="18">Oh, verstehe.
      Ist kompliziert, richtig?</font>
      
      4822
      02:39:42,400 --> 02:39:42,400
      <font face="Serif" size="18">Oh, verstehe.
      Ist kompliziert, richtig?</font>
      The only difference is that the final entry (4822) is not included in XMedia's output file. Note that all of the subtitle durations are 0, which makes them unusable. The timestamps are correct, though.
    • MP4Box: "mp4box input.mp4 -srt 4" outputs the following:
      Code:
      1
      00:00:02,440 --> 00:00:03,200
      * ER SCHLUCHZT *
      
      2
      00:00:03,200 --> 00:00:04,800
      * ER SCHLUCHZT *
      
      3
      00:00:04,800 --> 00:00:05,520
      * ER SCHLUCHZT *
      
      4
      00:00:05,920 --> 00:00:06,400
      So ist das nicht richtig.
      
      5
      00:00:06,400 --> 00:00:08,000
      So ist das nicht richtig.
      
      6
      00:00:08,000 --> 00:00:09,600
      So ist das nicht richtig.
      
      7
      00:00:09,600 --> 00:00:10,640
      So ist das nicht richtig.
      
      [...]
      
      3637
      01:55:19,280 --> 01:55:20,000
      * Alarm geht los *
      
      3638
      01:55:20,000 --> 01:55:21,600
      * Alarm geht los *
      
      3639
      01:55:21,600 --> 01:55:22,320
      * Alarm geht los *
      
      3640
      01:55:24,440 --> 01:55:24,800
      Legen Sie bitte alle
      Metallgegenstände ab:
      
      3641
      01:55:24,800 --> 01:55:26,400
      Legen Sie bitte alle
      Metallgegenstände ab:
      
      3642
      01:55:26,400 --> 01:55:26,640
      
      
      3643
      01:55:26,640 --> 01:55:28,000
      
      
      3644
      01:55:28,000 --> 01:55:29,600
      Compared to ffmpeg's output, the subtitle durations are now correct, BUT the subtitle file abrupty ends more than 40 minutes before the end of the movie. Also, the font information is gone, but I don't really care about that. When running the above MP4Box command, I get the error messages
      Code:
      [iso file] Unknown box type 6F660000(73/100)
      [iso file] Unknown box type 14000000
      [iso file] Unknown box type 72756E01
      Conversion failed (BitStream Not Compliant)

    To summarize, ffmpeg gives me unusable subtitles with display durations of 0, while MP4Box gives me usable subtitles which however end too early.

    How do I fix either of those issues so I can get a usable SRT file?

    Thank you in advance!
    try this in post #8 - https://forum.videohelp.com/threads/373857-Need-to-extract-convert-tx3g-subtitles
    Quote Quote  
  6. Originally Posted by october262 View Post
    Thank you for the link – I have actually tried My MP4Box GUI and just as described, there is a popup saying that the timed text subtitle stream has been recognized. But when I click on Demux, simply nothing happens. On the bottom it just says "Ready...", and no subtitles are extracted anywhere. I have tried My MP4Box GUI with other MP4 files (which have SRT subtitles), and the demuxing works just fine. But unfortunately not in this case.

    Maybe this is not too surprising because the tool is based on MP4Box, and MP4Box (the command-line tool) does actually say that the "conversion failed" when trying to extract the subtitles, so one might expect MP4Box GUI to fail as well. Only difference is that MP4Box still outputs a (somewhat broken) SRT file, while the GUI version produces nothing at all.
    Quote Quote  
  7. Originally Posted by davexnet View Post
    I know we touched on it, but are you running the most recent MP4Box
    and the most recent FFmpeg ?

    Do you have a media file (you can share) with these subs so I can play with it?

    In this thread they talk about opening the mp4 directly in Subtitle Edit

    https://forum.doom9.org/showthread.php?t=174661
    Yes, I am running ffmpeg 4.4 and I installed MP4Box just to deal with this file (so it's definitely the most current).

    Opening an MP4 directly in Subtitle Edit is something I hadn't yet considered, but unfortunately the subtitle table stays empty when I try.

    I have uploaded the file in question here. Apologies for the large file size (5.79GB); I would have just shared a small excerpt but keep in mind that cutting the video is exactly where all of the issues arise in my case. So I can only share the whole file. Hope you or somebody can see what's going on here.
    Quote Quote  
  8. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    I have been down exactly the same road without success. Finally in desperation I decided to make a dummy copy via Vidcoder selecting the fastest encode, lousy video resolution and sound down to stereo bit the subs are there. Started to process and finally after 4 hours had a new MKV file with subs. Extracted the subs and they were ok. Transferred the subs into my real MKV files. I would love a simpler viable solution, so there is the ability in Vidcoder and presumably Handbrake to handle timed text correctly.
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 7 Ultimate, QNAP NAS TS851
    Quote Quote  
  9. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    PS. the files emerged as .ass format.
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 7 Ultimate, QNAP NAS TS851
    Quote Quote  
  10. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Fleand View Post
    Originally Posted by davexnet View Post
    I know we touched on it, but are you running the most recent MP4Box
    and the most recent FFmpeg ?

    Do you have a media file (you can share) with these subs so I can play with it?

    In this thread they talk about opening the mp4 directly in Subtitle Edit

    https://forum.doom9.org/showthread.php?t=174661
    Yes, I am running ffmpeg 4.4 and I installed MP4Box just to deal with this file (so it's definitely the most current).

    Opening an MP4 directly in Subtitle Edit is something I hadn't yet considered, but unfortunately the subtitle table stays empty when I try.

    I have uploaded the file in question here. Apologies for the large file size (5.79GB); I would have just shared a small excerpt but keep in mind that cutting the video is exactly where all of the issues arise in my case. So I can only share the whole file. Hope you or somebody can see what's going on here.
    Not a problem. Thanks for the upload, however, I attempted the download, but after 4.99GB Mega.NZ summarily halted the proceedings and told me I had to
    pay for a "plan" to complete the download. What a scam. More for my own curiosity, that's all
    Perhaps netmask56's plan will work
    Quote Quote  
  11. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    Well my workaround works for me, so far I've done 5 files without issue but it's an unsatisfactory way of doing it. Surely there must a program to easily and successfully demux all elements in an MP4 file?
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 7 Ultimate, QNAP NAS TS851
    Quote Quote  
  12. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by Fleand View Post
    This is related to a separate issue that I'm having but I wanted to ask a new question so as not to conflate things.

    I have an MP4 file "input.mp4" which has a tx3g subtitle stream that I would like to extract, ideally as an SRT. Here is a mediainfo excerpt:

    Code:
    General
    Complete name                            : D:\input.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (mp42/isom/iso2/iso5/dash/avc1/dby1/mp41)
    File size                                : 5.79 GiB
    Duration                                 : 2 h 39 min
    Overall bit rate                         : 5 188 kb/s
    
    [...]
    
    Text
    ID                                       : 4
    Format                                   : Timed Text
    Muxing mode                              : sbtl
    Codec ID                                 : tx3g
    Duration                                 : 2 h 39 min
    Bit rate                                 : 131 b/s
    Stream size                              : 153 KiB (0%)
    Language                                 : German
    Default                                  : Yes
    Forced                                   : No
    Alternate group                          : 2
    Here is my experience extracting the subtitles with various software:
    • MKVToolNix GUI does not recognize the subtitle stream.
    • My MP4Box GUI recognizes the subtitle stream (file information: "Text - Timed text"), but fails at extracting it.
    • LosslessCut similarly recognizes the stream (tag "t3xg", codec "mov_te") and also fails to extract it.
    • ffmpeg: "ffmpeg -i input.mp4 subs.srt" and XMedia Recode output almost the exact same file:
      Code:
      1
      00:00:02,440 --> 00:00:02,440
      <font face="Serif" size="18">* ER SCHLUCHZT *</font>
      
      2
      00:00:03,200 --> 00:00:03,200
      <font face="Serif" size="18">* ER SCHLUCHZT *</font>
      
      3
      00:00:04,800 --> 00:00:04,800
      <font face="Serif" size="18">* ER SCHLUCHZT *</font>
      
      4
      00:00:05,920 --> 00:00:05,920
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      5
      00:00:06,400 --> 00:00:06,400
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      6
      00:00:08,000 --> 00:00:08,000
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      7
      00:00:09,600 --> 00:00:09,600
      <font face="Serif" size="18">So ist das nicht richtig.</font>
      
      [...]
      
      4818
      02:39:38,960 --> 02:39:38,960
      <font face="Serif" size="18">Also, wie bist du zur Waise geworden?</font>
      
      4819
      02:39:39,200 --> 02:39:39,200
      <font face="Serif" size="18">Also, wie bist du zur Waise geworden?</font>
      
      4820
      02:39:40,800 --> 02:39:40,800
      <font face="Serif" size="18">Also, wie bist du zur Waise geworden?</font>
      
      4821
      02:39:42,000 --> 02:39:42,000
      <font face="Serif" size="18">Oh, verstehe.
      Ist kompliziert, richtig?</font>
      
      4822
      02:39:42,400 --> 02:39:42,400
      <font face="Serif" size="18">Oh, verstehe.
      Ist kompliziert, richtig?</font>
      The only difference is that the final entry (4822) is not included in XMedia's output file. Note that all of the subtitle durations are 0, which makes them unusable. The timestamps are correct, though.
    • MP4Box: "mp4box input.mp4 -srt 4" outputs the following:
      Code:
      1
      00:00:02,440 --> 00:00:03,200
      * ER SCHLUCHZT *
      
      2
      00:00:03,200 --> 00:00:04,800
      * ER SCHLUCHZT *
      
      3
      00:00:04,800 --> 00:00:05,520
      * ER SCHLUCHZT *
      
      4
      00:00:05,920 --> 00:00:06,400
      So ist das nicht richtig.
      
      5
      00:00:06,400 --> 00:00:08,000
      So ist das nicht richtig.
      
      6
      00:00:08,000 --> 00:00:09,600
      So ist das nicht richtig.
      
      7
      00:00:09,600 --> 00:00:10,640
      So ist das nicht richtig.
      
      [...]
      
      3637
      01:55:19,280 --> 01:55:20,000
      * Alarm geht los *
      
      3638
      01:55:20,000 --> 01:55:21,600
      * Alarm geht los *
      
      3639
      01:55:21,600 --> 01:55:22,320
      * Alarm geht los *
      
      3640
      01:55:24,440 --> 01:55:24,800
      Legen Sie bitte alle
      Metallgegenstände ab:
      
      3641
      01:55:24,800 --> 01:55:26,400
      Legen Sie bitte alle
      Metallgegenstände ab:
      
      3642
      01:55:26,400 --> 01:55:26,640
      
      
      3643
      01:55:26,640 --> 01:55:28,000
      
      
      3644
      01:55:28,000 --> 01:55:29,600
      Compared to ffmpeg's output, the subtitle durations are now correct, BUT the subtitle file abrupty ends more than 40 minutes before the end of the movie. Also, the font information is gone, but I don't really care about that. When running the above MP4Box command, I get the error messages
      Code:
      [iso file] Unknown box type 6F660000(73/100)
      [iso file] Unknown box type 14000000
      [iso file] Unknown box type 72756E01
      Conversion failed (BitStream Not Compliant)

    To summarize, ffmpeg gives me unusable subtitles with display durations of 0, while MP4Box gives me usable subtitles which however end too early.

    How do I fix either of those issues so I can get a usable SRT file?

    Thank you in advance!
    this ffmpeg command is a bit different in extracting tx3g subtitles
    from an MP4 file - https://linux.overshoot.tv/wiki/extract_subtitles_mp4_file
    Quote Quote  
  13. Originally Posted by netmask56 View Post
    Finally in desperation I decided to make a dummy copy via Vidcoder selecting the fastest encode, lousy video resolution and sound down to stereo bit the subs are there. Started to process and finally after 4 hours had a new MKV file with subs. Extracted the subs and they were ok. Transferred the subs into my real MKV files. I would love a simpler viable solution, so there is the ability in Vidcoder and presumably Handbrake to handle timed text correctly.
    Okay, so that was actually an interesting idea. I tried Vidcoder and Handbrake, lowest resolution video as you suggested and I didn't even include the audio. The reencoding took about two hours each, and MKVCleaver does actually see a "Subtitle Track [ASS] (German)". Unfortunately, when you extract the subtitles, the .ass file is completely empty (i.e. it ends after the [Events] section).

    However, while the reencoding was happening, I stumbled upon a different tool called BOX4. Using this tool, I converted the MP4 into an MKV (without reencoding, so within minutes!) and the resulting file – at last – had a subtitle stream that could be exported by MKVCleaver into a working SRT. Of course it would be too easy if this SRT file was actually perfect Here's an excerpt from the MP4Box subtitles:
    Code:
    227
    00:08:52,800 --> 00:08:53,320
    (Polizist 2:) Hände hoch! Na los!
    Wirds bald!
    
    228
    00:09:12,920 --> 00:09:13,600
    Lieutenant.
    ... and the same timestamp in the subtitles produced by BOX4:
    Code:
    227
    00:08:52,821 --> 00:09:12,941
    <font face="Serif" size="18">(Polizist 2:) Hände hoch! Na los!
    Wirds bald!</font>
    
    228
    00:09:12,941 --> 00:09:13,621
    <font face="Serif" size="18">Lieutenant.</font>
    As you can see, the BOX4 subtitles have no gap, and there is always some subtitle displayed even when nobody is talking. I can only speculate, but I feel like all tools except MP4Box (i.e. ffmpeg, XMedia Recode, BOX4) can for some reason only see the start timestamps for the subtitles, and not the end timestamps. The first two tools then default to a subtitle duration of zero, while BOX4 decides to show each subtitle right until the beginning of the next one.

    At the end of the day, subtitles being shown for too long is the most minor issue I've had with my file so far, so I'd be willing to put up with it (subtitles are actually visible, and the SRT does not end prematurely). It's still a bit annoying though, and in any case, as you say, there has to be an easier (and hopefully less error-prone) way to do it.

    Originally Posted by davexnet View Post
    Thanks for the upload, however, I attempted the download, but after 4.99GB Mega.NZ summarily halted the proceedings and told me I had to
    pay for a "plan" to complete the download. What a scam. More for my own curiosity, that's all
    Perhaps netmask56's plan will work
    Really sorry about that, I did not expect Mega to pull that kind of stunt. As described, netmask56's plan sort of worked (with a different tool), but just in case you're still interested and maybe find a better way to do it, I've uploaded the file to Google Drive as well. This should hopefully be free to download.

    Originally Posted by october262 View Post
    this ffmpeg command is a bit different in extracting tx3g subtitles
    from an MP4 file - https://linux.overshoot.tv/wiki/extract_subtitles_mp4_file
    Thank you, however the result is sadly the exact same one as obtained with "ffmpeg -i input.mp4 subs.srt".
    Last edited by Fleand; 19th Jul 2021 at 13:26.
    Quote Quote  
  14. Try clever FFmpeg-GUI. It can extract mov_text (Timed text) as SRT, or convert mov_text (Timed text) to SRT, ASS, SSA.
    Last edited by ProWo; 22nd Jul 2021 at 07:42.
    Quote Quote  
  15. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I downloaded the file (thank you). My first thought is that there is something wrong with the file itself,
    it doesn't open properly in either Mpc-HC or Mpc-BE and I have to use the task manager to halt the task

    I used the command
    ffmpeg -i matrix.mp4 -ss 00:00:00 -t 00:03:00 -c:v copy -c:a copy -c copy matrix_out2.mp4

    to copy the streams for 3 minutes to a new clip. This works; in MPC-HC, the subtitles flash onto the screen but for
    just a fraction of a second. I'll see what else I can find out
    Last edited by davexnet; 20th Jul 2021 at 01:45.
    Quote Quote  
  16. Originally Posted by davexnet View Post
    I downloaded the file (thank you). My first thought is that there is something wrong with the file itself,
    it doesn't open properly in either Mpc-HC or Mpc-BE and I have to use the task manager to halt the task
    MPC-HC seems to be working fine on my end with the original file (with flashing subs though), while MPC-BE indeed freezes when opening the file. And I think the flashing is just a symptom of MPC-HC not knowing how long to show the subtitles for. But can you confirm that at least VLC plays everything correctly, with visible subtitles that also disappear when nobody is talking (e.g. between 08:52 and 09:12)?

    I really wonder what information VLC and MP4Box can see in the subtitle stream (I mean the end timestamps) that no other software seems to be able to pick up ...
    Quote Quote  
  17. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Is there any reason you don't just download
    subs from subscene.com instead?
    Must be able to pick up a good SRT there

    I'll give VLC a try and report back
    Quote Quote  
  18. Originally Posted by davexnet View Post
    Is there any reason you don't just download
    subs from subscene.com instead?
    Must be able to pick up a good SRT there
    Definitely, that would probably work in many cases. But since these are TV recordings, they may contain ad breaks, and that would make aligning subs and video somewhat difficult. Not to mention that TV versions of movies may be cut differently than the DVD versions for which one can find subtitles online. And I'd just prefer a foolproof method that always works...

    But yes, it's ultimately a minor issue so don't dwell on it for too long if you don't want to
    Quote Quote  
  19. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by Fleand View Post
    Originally Posted by davexnet View Post
    Is there any reason you don't just download
    subs from subscene.com instead?
    Must be able to pick up a good SRT there
    Definitely, that would probably work in many cases. But since these are TV recordings, they may contain ad breaks, and that would make aligning subs and video somewhat difficult. Not to mention that TV versions of movies may be cut differently than the DVD versions for which one can find subtitles online. And I'd just prefer a foolproof method that always works...

    But yes, it's ultimately a minor issue so don't dwell on it for too long if you don't want to
    Yes - I just found some commercial breaks. I'm of of idea's. I did get the subs to work in VLC.
    We haven't got anywhere with this. None of the methods we've seen documented, have yielded anything useful
    If I find anything further, I'll let you know
    Quote Quote  
  20. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    If subtitles are present that’s where TSDoctor comes into its own but I don’t think it will edit anything other than broadcast TS files. I use it to edit local TV recorded programs on my Beyonwiz PVR. But my version is very old and I know it won’t handle anything but TS. After editing it can demux all elements present in the file.
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 7 Ultimate, QNAP NAS TS851
    Quote Quote  
  21. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by Fleand View Post
    Originally Posted by davexnet View Post
    Is there any reason you don't just download
    subs from subscene.com instead?
    Must be able to pick up a good SRT there
    Definitely, that would probably work in many cases. But since these are TV recordings, they may contain ad breaks, and that would make aligning subs and video somewhat difficult. Not to mention that TV versions of movies may be cut differently than the DVD versions for which one can find subtitles online. And I'd just prefer a foolproof method that always works...

    But yes, it's ultimately a minor issue so don't dwell on it for too long if you don't want to
    is there just the one set of subtitles ?? then try ffmpeg -i m.m4v -map 0:0 sub.srt - https://stackoverflow.com/questions/17388253/extracting-subtitles-from-mp4
    Quote Quote  
  22. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Doesn't really help you unfortunately, except more evidence there is something off about that source file, but I created an mp4 with similar subs
    https://forum.videohelp.com/threads/401871-encode-subtitles-into-Mp4-so-they-can-be-tu...ff#post2619989

    then used this to extract the subs to .ass
    https://forum.videohelp.com/threads/402515-Problem-with-extracting-tx3g-subtitles#post2625731

    The resulting subs look good
    Code:
    [Script Info]
    ; Script generated by FFmpeg/Lavc59.3.102
    ScriptType: v4.00+
    PlayResX: 384
    PlayResY: 288
    ScaledBorderAndShadow: yes
    
    [V4+ Styles]
    Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
    Style: Default,Arial,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
    
    [Events]
    Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
    Dialogue: 0,0:01:15.46,0:01:18.59,Default,,0,0,0,,Why's your mother marrying\Non a Friday? I have work to do.
    Dialogue: 0,0:01:18.83,0:01:21.21,Default,,0,0,0,,Once we've eaten,\NI'm off to the office.
    Dialogue: 0,0:01:21.38,0:01:23.17,Default,,0,0,0,,Do as you like, darling.
    Dialogue: 0,0:01:23.46,0:01:26.59,Default,,0,0,0,,- Have I put on too much powder?\N- You always do.
    Dialogue: 0,0:01:30.13,0:01:32.51,Default,,0,0,0,,And remember, children,\Nyou need to behave.
    Dialogue: 0,0:01:32.67,0:01:35.17,Default,,0,0,0,,Not like your cousins\Nat the last wedding.
    Dialogue: 0,0:01:35.33,0:01:37.62,Default,,0,0,0,,They ate too much ice-cream\Nand were ill.
    Dialogue: 0,0:01:37.88,0:01:40.38,Default,,0,0,0,,And Sylvie, don't interrupt\Nthe grown-ups!
    Dialogue: 0,0:01:40.67,0:01:44.09,Default,,0,0,0,,Olivier, no elbows on the table.\NThink about your spine.
    Code:
    General
    Complete name                            : I:\bin\cc_output.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media
    Codec ID                                 : isom (isom/iso2/avc1/mp41)
    File size                                : 374 MiB
    Duration                                 : 1 h 35 min
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 546 kb/s
    Writing application                      : Lavf59.4.101
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4
    Format settings                          : 4 Ref Frames
    Format settings, CABAC                   : No
    Format settings, Reference frames        : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 1 h 35 min
    Source duration                          : 1 h 35 min
    Bit rate                                 : 424 kb/s
    Width                                    : 480 pixels
    Height                                   : 360 pixels
    Display aspect ratio                     : 4:3
    Frame rate mode                          : Variable
    Frame rate                               : 24.000 FPS
    Minimum frame rate                       : 23.634 FPS
    Maximum frame rate                       : 24.390 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.102
    Stream size                              : 290 MiB (78%)
    Source stream size                       : 290 MiB (78%)
    Writing library                          : x264 core 148
    Encoding settings                        : cabac=0 / ref=2 / deblock=0:0:0 / analyse=0x3:0x113 / me=hex / subme=4 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=11 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=0 / open_gop=0 / weightp=0 / keyint=250 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=20 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=1400 / vbv_bufsize=4000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
    mdhd_Duration                            : 5745087
    Codec configuration box                  : avcC
    
    Audio
    ID                                       : 2
    Format                                   : AAC LC
    Format/Info                              : Advanced Audio Codec Low Complexity
    Codec ID                                 : mp4a-40-2
    Duration                                 : 1 h 35 min
    Bit rate mode                            : Constant
    Bit rate                                 : 114 kb/s
    Channel(s)                               : 2 channels
    Channel layout                           : L R
    Sampling rate                            : 44.1 kHz
    Frame rate                               : 43.066 FPS (1024 SPF)
    Compression mode                         : Lossy
    Stream size                              : 77.9 MiB (21%)
    Language                                 : French
    Default                                  : Yes
    Alternate group                          : 1
    
    Text
    ID                                       : 3
    Format                                   : Timed Text
    Muxing mode                              : sbtl
    Codec ID                                 : tx3g
    Duration                                 : 1 h 34 min
    Bit rate mode                            : Variable
    Bit rate                                 : 47 b/s
    Stream size                              : 32.7 KiB (0%)
    Default                                  : Yes
    Forced                                   : No
    Alternate group                          : 3
    Quote Quote  



Similar Threads