[FFmpeg-trac] #5791(ffmpeg:new): -itsoffset shifts using a different value on some subtitles
FFmpeg
trac at avcodec.org
Tue Aug 23 10:49:45 EEST 2016
#5791: -itsoffset shifts using a different value on some subtitles
--------------------------------+----------------------------------
Reporter: gillux | Type: defect
Status: new | Priority: minor
Component: ffmpeg | Version: 3.0.2
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------+----------------------------------
I tried to resync subtitles with the -itsoffset option. The resulting
subtitles had timestamps offset to a different value from what I provided
on the command line.
I figured out that the problem has to do with the first subtitle that
would have a negative timestamp once the offset is applied. I attached a
simple subtitle file (to_resync.srt) to demonstrate the problem. The
following command:
{{{
$ ffmpeg -itsoffset -15 -i to_resync.srt synched.srt
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --enable-avisynth --enable-avresample --enable-fontconfig
--enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-
libbluray --enable-libdcadec --enable-libfreetype --enable-libfribidi
--enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-
libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-
libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid
--enable-netcdf --enable-shared --enable-version3 --enable-x11grab
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, srt, from 'to_resync.srt':
Duration: N/A, bitrate: N/A
Stream #0:0: Subtitle: subrip
Output #0, srt, to 'synched.srt':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Subtitle: subrip (srt)
Metadata:
encoder : Lavc57.24.102 srt
Stream mapping:
Stream #0:0 -> #0:0 (subrip (srt) -> subrip (srt))
Press [q] to stop, [?] for help
size= 0kB time=00:00:10.00 bitrate= 0.1kbits/s speed=6.9e+04x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 144.680847%
}}}
produces synched.srt with timestamps shifted to -1 second whereas I asked
for -15 seconds.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5791>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list