VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hello,

    I have an MKV file with DVB subtitles that VLC does not display, and when I tried to use Handbrake to rip a new version with the subtitles burnt in, they still didn't display on the new file.

    Fortunately SubtitleEdit does recognise the subtitles, and generated an SRT file using OCR.

    However, while the SRT seems to keep the original start time for all the subtitles, the length of the individual DVB subtitles is being lost - instead, the SRT file just applies a default 3.000 sec length for every subtitle.

    Does anyone have any ideas how I could get it to keep the original length of the subtitles?

    Thank you for any help.
    Quote Quote  
  2. If you have DVB-Subs inside the mkv there must have been a TS-Stream. Try to import TS-Streams into Subtitle Edit. If you just have the mkv try to convert it to TS with ffmpeg.
    Quote Quote  
  3. Originally Posted by ChristianundCo View Post
    If you have DVB-Subs inside the mkv there must have been a TS-Stream. Try to import TS-Streams into Subtitle Edit. If you just have the mkv try to convert it to TS with ffmpeg.
    Mention was made in another thread about TSDoctor (I think it is in the videohelp subtitles) which I think is supposed to extract subs from TS files. Worth a look.
    Quote Quote  
  4. Originally Posted by ChristianundCo View Post
    If you have DVB-Subs inside the mkv there must have been a TS-Stream. Try to import TS-Streams into Subtitle Edit. If you just have the mkv try to convert it to TS with ffmpeg.
    Thank you ChristianundCo for the suggestion - this worked for me.
    (And thank you also to loninappleton for your contribution.)

    I indeed only had the MKV, so had to get the TS-Stream. I tend to avoid command line programs like FFMPEG because they scare me, so for anyone who reads this in the future needing a solution, this is exactly what I did:

    Using ffmpeg -i C:\Folder\InputFile.mkv, I got the following information about the file:
    Input #0, matroska,webm, from 'C:\Folder\InputFile.mkv':
    Metadata:
    encoder : libebml v1.4.4 + libmatroska v1.7.1
    creation_time : 2023-03-25T07:48:51.000000Z
    Duration: 04:30:28.04, start: 0.000000, bitrate: 5317 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 1k tbn (default)
    Metadata:
    BPS : 4713912
    DURATION : 04:30:28.016000000
    NUMBER_OF_FRAMES: 811275
    NUMBER_OF_BYTES : 9562180367
    _STATISTICS_WRITING_APP: mkvmerge v74.0.0 ('You Oughta Know') 64-bit
    _STATISTICS_WRITING_DATE_UTC: 2023-03-25 07:48:51
    _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
    title : AAC - 2 channel
    BPS : 129714
    DURATION : 04:30:28.016000000
    NUMBER_OF_FRAMES: 760566
    NUMBER_OF_BYTES : 263125175
    _STATISTICS_WRITING_APP: mkvmerge v74.0.0 ('You Oughta Know') 64-bit
    _STATISTICS_WRITING_DATE_UTC: 2023-03-25 07:48:51
    _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Metadata:
    title : AC-3 - 6 channel
    BPS : 447999
    DURATION : 04:30:28.016000000
    NUMBER_OF_FRAMES: 507125
    NUMBER_OF_BYTES : 908768000
    _STATISTICS_WRITING_APP: mkvmerge v74.0.0 ('You Oughta Know') 64-bit
    _STATISTICS_WRITING_DATE_UTC: 2023-03-25 07:48:51
    _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3(eng): Subtitle: dvb_subtitle
    Metadata:
    BPS : 5040
    DURATION : 04:21:45.251000000
    NUMBER_OF_FRAMES: 2119
    NUMBER_OF_BYTES : 9894741
    _STATISTICS_WRITING_APP: mkvmerge v74.0.0 ('You Oughta Know') 64-bit
    _STATISTICS_WRITING_DATE_UTC: 2023-03-25 07:48:51
    _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    I then used ffmpeg -y -i C:\Folder\InputFile.mkv -vcodec copy -acodec copy -c copy -vbsf h264_mp4toannexb C:\Folder\OutputFile.ts to generate a TS file. No idea what any of that means, but after a couple of minutes it gave me a TS file.

    (For reference, if -c is generating an emoji, that text should be - c : s without the spacing.)

    (I originally tried hevc_mp4toannexb, since that was used in the instructions I found, but that gave me a message "Codec 'h264' (27) is not supported by the bitstream filter 'hevc_mp4toannexb'. Supported codecs are: hevc (173)". That at least gave me enough information to guess that changing hevc_mp4toannexb to h264_mp4toannexb would work in my case.)

    I then loaded the TS file in Subtitle Edit, which imported the subtitles with their original lengths, giving me the ability to use OCR to generate a correct SRT file.
    Last edited by Vertigo1958; 13th May 2023 at 02:27. Reason: Post auto-generated an emoji from some text, so clarifying what the emoji text was
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!