Opened 4 years ago

Last modified 21 months ago

#7042 new defect

Wrong subtitle cut using -ss input option

Reported by: MonoS Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: subrip seek
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
When applying an -ss offset on a srt subtitle file the resulting output file is cut at the wrong line and has the wrong offset.
Using the attached eng.srt file and an -ss of 0:46:38.045 i expect the cut to happen on the 641th line with a timestamp of about 7 seconds, instead it happen on the 640th line messing up with the timecodes
How to reproduce:

ffmpeg -ss 0:46:38.045 -i eng.srt 3.srt
ffmpeg version N-90168-gc0919c4985

Attachments (2)

eng.srt (62.1 KB ) - added by MonoS 4 years ago.
Input subtitle file
log.txt (4.1 KB ) - added by MonoS 4 years ago.
log

Download all attachments as: .zip

Change History (6)

by MonoS, 4 years ago

Attachment: eng.srt added

Input subtitle file

by MonoS, 4 years ago

Attachment: log.txt added

log

comment:1 by Gyan, 4 years ago

Use post-demuxer seek

ffmpeg -i eng.srt -ss 0:46:38.045 -c copy 3.srt

in reply to:  1 comment:2 by MonoS, 4 years ago

Replying to Gyan:

Use post-demuxer seek

ffmpeg -i eng.srt -ss 0:46:38.045 -c copy 3.srt

Why the output should be different between using -ss as an input or output filter in this case?

Last edited 4 years ago by MonoS (previous) (diff)

comment:3 by Carl Eugen Hoyos, 3 years ago

Component: ffmpegundetermined
Keywords: subrip seek added; subtitle ss cut removed

comment:4 by forresthopkinsa, 21 months ago

Post-demuxer seek doesn't work correctly either.

If you have two subtitles:

00:05 --> 00:15
one

00:15 --> 00:20
two

And you seek the output to start at 00:10, the output will look like this:

00:05 --> 00:10
two

It should include five seconds of the first subtitle line, but it instead discards it.

Note: See TracTickets for help on using tickets.