Opened 5 years ago
Closed 5 years ago
#8575 closed defect (fixed)
SubViewer with higher precision do not work
Reported by: | Ilario Gelmetti | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | subviewer |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
The conversion of SBV subtitles (downloaded from Youtube) to SRT seems broken to me. According to this page https://trac.ffmpeg.org/wiki/HowToConvertYouTubeSBVtoSRT it should be supported.
Tested with:
ffmpeg version N-96995-g9a2d950f96
built with gcc 9.3.0 (Arch Linux 9.3.0-1)
How to reproduce:
create file a.sbv with content:
0:00:17.880,0:00:22.320 Mira esos delfines lo bien que viven debajo 0:00:22.320,0:00:36.199 Bajo el mar Bajo el mar
convert it to SRT with
$ ffmpeg -i a.sbv a.srt
the result is wrong in various ways: the first and second phrases are switched, the times are unrelated to the original ones and the second phrase ends after 1193 hours.
$ cat a.srt 1 00:00:25,200 --> 00:00:37,990 Bajo el mar Bajo el mar 2 00:00:25,800 --> 1193:03:12,496 Mira esos delfines lo bien que viven debajo
using the -fix_sub_duration option, the result does not improve (times are still unrelated to the original ones and there is only one phrase):
$ ffmpeg -fix_sub_duration -i a.sbv a2.srt $ cat a2.srt 1 00:00:25,200 --> 00:00:25,800 Bajo el mar Bajo el mar
Thanks!
Change History (7)
comment:1 by , 5 years ago
Keywords: | subviewer added; SBV subtitles removed |
---|---|
Summary: | Converting SBV subtitles to SRT is broken → SubViewer with higher precision do not work |
follow-up: 3 comment:2 by , 5 years ago
Component: | undetermined → avformat |
---|---|
Reproduced by developer: | set |
Status: | new → open |
https://support.google.com/youtube/answer/2734698?hl=en
I wonder if Google maybe misunderstood the format...
follow-up: 4 comment:3 by , 5 years ago
Where can I download such a subtitle?
Seems that Youtube allows just the video owner to download the subtitles file. The example I posted is a simplified version of the subtitles from this video:
https://www.youtube.com/watch?v=dVSm1OWy_LA
Which other software reads it?
According to Wikipedia, there are various:
https://en.wikipedia.org/wiki/Comparison_of_subtitle_editors
like SubtitleComposer and fiveLoadSub.
There is a bash script here
https://github.com/kf106/sbv2srt
which explicitly mentions in its readme the face that ffmpeg fails with these files and which produces this output:
1 00:00:17,880 --> 00:00:22,320 Mira esos delfines lo bien que viven debajo 2 00:00:22,320 --> 00:00:36,199 Bajo el mar Bajo el mar
which looks correct.
> https://support.google.com/youtube/answer/2734698?hl=en
I wonder if Google maybe misunderstood the format...
In the example included in the link you posted, there are three decimal digits for the milliseconds. In other examples I found on the internet there are only two decimal digits.
Seems that ffmpeg supports only the case in which SubViewer files have only two decimal digits.
I could try to make a patch, in case I manage to do that, where should I post it?
follow-up: 5 comment:4 by , 5 years ago
Replying to ilario:
Which other software reads it?
According to Wikipedia, there are various:
https://en.wikipedia.org/wiki/Comparison_of_subtitle_editors
I doubt it but feel free to prove me wrong.
https://ffmpeg.org/pipermail/ffmpeg-devel/2020-March/258621.html
comment:5 by , 5 years ago
Replying to cehoyos:
https://ffmpeg.org/pipermail/ffmpeg-devel/2020-March/258621.html
Tested the patch, it fixes this issue! Thanks!
comment:7 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Should be fixed in 559ce9c8454fda5fe7fc0debf94cbcfbba33c66a, thank you for the report!
Where can I download such a subtitle?
Which other software reads it?