1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-11-25 19:52:53 +08:00

Change a number of subtitle sequence to begin with one (instead of zero) for ffmpeg,avcodec, and Matroska compatibility

This commit is contained in:
Witchakorn Kamolpornwijit 2012-06-26 19:24:30 +07:00
parent 7df97fb59f
commit 5404179338

View File

@ -182,7 +182,7 @@ class YoutubeIE(InfoExtractor):
end = "%02i:%02i:%02i,%03i" %(end/(60*60), end/60%60, end%60, end%1*1000) end = "%02i:%02i:%02i,%03i" %(end/(60*60), end/60%60, end%60, end%1*1000)
caption = unescapeHTML(caption) caption = unescapeHTML(caption)
caption = unescapeHTML(caption) # double cycle, intentional caption = unescapeHTML(caption) # double cycle, intentional
srt += str(n) + '\n' srt += str(n+1) + '\n'
srt += start + ' --> ' + end + '\n' srt += start + ' --> ' + end + '\n'
srt += caption + '\n\n' srt += caption + '\n\n'
return srt return srt