Changes between Version 11 and Version 12 of HowToConvertYouTubeSBVtoSRT


Ignore:
Timestamp:
Jun 9, 2019, 11:28:26 PM (13 months ago)
Author:
omniplex
Comment:

solved overlapping timestamp issue

Legend:

Unmodified
Added
Removed
Modified
  • HowToConvertYouTubeSBVtoSRT

    v11 v12  
     1= How to convert !YouTube SBV to SRT =
     2
    13Simply like this:
    24{{{
     
    3234!YouTube is smart enough to detect and report simple errors, but you should make sure that timestamps do not overlap, i.e., the earliest ''from'' in the next caption can be the same as the ''to'' end of the last caption. Obviously the duration should be not too short, and it cannot be "negative" with a ''from'' later than its corresponding ''to''.
    3335
    34 The auto-generated SBV example shown above (downloaded from a !YouTube movie trailer) actually uses overlapping timestamps, and ''FFmpeg'' kept them as is in its SRT conversion. ''If you know more about this feature (?) please add some info here.''
     36The auto-generated SBV example shown above (downloaded from a !YouTube movie trailer) actually uses overlapping timestamps, and ''FFmpeg'' kept them as is in its SRT conversion. For the theory see the ''WebM Project'' [https://www.webmproject.org/docs/container/#general-webvtt-notes General WebVTT Notes], in practice input option [https://ffmpeg.org/ffmpeg.html#Advanced-Subtitle-options -fix_sub_duration] can get rid of this:
     37
     38{{{
     39ffmpeg -fix_sub_duration -i captions.sbv captions.srt
     40}}}
     41
     42Fixed SRT output sample:
     43
     44{{{
     451
     4600:00:05,000 --> 00:00:10,100
     47you know where's the girl who hasn't
     48
     492
     5000:00:10,100 --> 00:00:13,700
     51gotten to college or even maybe finished
     52
     53}}}
    3554
    3655''SMplayer'' using ''MPlayer'' is unsuited as a syntax check, e.g., it doesn't insist on file extension '''`.srt`''', anything including '''`.txt`''' goes, it accepts missing counters, and simply ignores timestamps greater than the duration of the clip. As of early 2019 !YouTube could not handle the latter, the upload failed without reporting an error.