Opened 2 years ago

#6013 new defect

XSUBs end time ignored when overlaying as Hard Subs

Reported by: edumj Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When I convert XSUB to Hard Subs, they stay all the time on the screen, and only disappear when a new subtitle appears.
It seems that "end time" for subtitles are ignored, so each subtitle is visible until next subtitle comes up (except with the last subtitle).

It happens with XSUBs made with ffmpeg and also with DivxMux?.

You can reproduce it with this .divx sample:
https://samples.ffmpeg.org/sub/small.divx
and also converting this VOBs (with DVDSubs) to AVI (with XSUBs), and then overlay those XSUBs:
https://samples.ffmpeg.org/MPEG-VOB/ClosedCaptions/Starship_Troopers.vob
https://samples.ffmpeg.org/sub/starwarssub2.vob

ffmpeg to make XSUBs (still off the screen with PAL VOBs...):

"%~dps0\ffmpeg" -palette "000000,444444,ffffff,000000,000000,000000,000000,000000,000000,000000,000000,000000,000000,000000,000000,000000" -i "%~1" -map 0:v -map 0:a:0 -map 0:s:0 -scodec xsub -f avi -c:v libxvid -b:v 1500k -vtag XVID -c:a libmp3lame -b:a 128k "%~dps0\%~n1 XSUB.avi"

Full Output:

ffmpeg version N-81696-gd38dff8e Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 57.100 / 57. 57.100
  libavformat    57. 49.100 / 57. 49.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mpeg, from 'C:\Users\Edumj\Videos\Pa Probar\VOB (NTSC) con Closed Captions\Starship_Troopers.vob':
  Duration: 00:00:51.30, start: 1986.626100, bitrate: 4618 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 32:27 DAR 16:9], Closed Captions, 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x83]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2[0x82]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:3[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:4[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:5[0x20]: Subtitle: dvd_subtitle
    Stream #0:6[0x22]: Subtitle: dvd_subtitle
[avi @ 03037500] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 2 times
[null @ 02fa2380] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, avi, to 'C:\_CONVE~1\FFMPEG~2\XSUBAH~1\\Starship_Troopers XSUB.avi':
  Metadata:
    ISFT            : Lavf57.49.100
    Stream #0:0: Video: mpeg4 (libxvid) (XVID / 0x44495658), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=2-31, 1500 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc57.57.100 libxvid
    Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc57.57.100 libmp3lame
    Stream #0:2: Subtitle: xsub (DXSB / 0x42535844)
    Metadata:
      encoder         : Lavc57.57.100 xsub
Output #1, null, to 'nul':
  Metadata:
    encoder         : Lavf57.49.100
    Stream #1:0: Video: wrapped_avframe, yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc57.57.100 wrapped_avframe
    Stream #1:1: Audio: pcm_s16le, 48000 Hz, 5.1(side), s16, 4608 kb/s
    Metadata:
      encoder         : Lavc57.57.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg4 (libxvid))
  Stream #0:1 -> #0:1 (ac3 (native) -> mp3 (libmp3lame))
  Stream #0:5 -> #0:2 (dvd_subtitle (dvdsub) -> xsub (native))
  Stream #0:0 -> #1:0 (mpeg2video (native) -> wrapped_avframe (native))
  Stream #0:4 -> #1:1 (ac3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[ac3 @ 05731760] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[ac3 @ 0549a4e0] frame sync error
Error while decoding stream #0:4: Invalid data found when processing input
[libmp3lame @ 0549c720] Queue input is backward in time
[null @ 02fa2380] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 1891 >= 1891
frame=  105 fps=0.0 q=4.0 q=-0.0 size=      14kB time=00:00:04.33 bitrate=  26.3kbits/s speed=8.62x    
frame=  207 fps=206 q=7.0 q=-0.0 size=      14kB time=00:00:08.60 bitrate=  13.2kbits/s speed=8.58x    
[mpeg @ 02f88a00] New subtitle stream 0:7 at pos:8497166 and DTS:1999.51s
frame=  313 fps=208 q=4.0 q=-0.0 size=    2300kB time=00:00:13.06 bitrate=1442.4kbits/s speed=8.68x    
frame=  439 fps=219 q=5.0 q=-0.0 size=    2729kB time=00:00:18.28 bitrate=1222.4kbits/s speed=9.12x    
frame=  546 fps=218 q=7.0 q=-0.0 size=    2729kB time=00:00:22.75 bitrate= 982.4kbits/s speed=9.07x    
frame=  662 fps=220 q=10.0 q=-0.0 size=    4187kB time=00:00:27.59 bitrate=1243.1kbits/s speed=9.17x    
frame=  779 fps=222 q=4.0 q=-0.0 size=    4187kB time=00:00:32.48 bitrate=1055.8kbits/s speed=9.26x    
frame=  904 fps=225 q=5.0 q=-0.0 size=    6164kB time=00:00:37.67 bitrate=1340.4kbits/s speed=9.39x    
frame= 1023 fps=227 q=5.0 q=-0.0 size=    6735kB time=00:00:42.64 bitrate=1293.9kbits/s speed=9.45x    
frame= 1147 fps=229 q=5.0 q=-0.0 size=    7628kB time=00:00:47.81 bitrate=1306.9kbits/s speed=9.54x    
[mpeg2video @ 057311c0] ac-tex damaged at 3 27
[mpeg2video @ 057311c0] Warning MVs not available
[mpeg2video @ 057311c0] concealing 135 DC, 135 AC, 135 MV errors in I frame
[ac3 @ 05731760] incomplete frame
[ac3 @ 0549a4e0] incomplete frame
frame= 1229 fps=229 q=6.0 Lq=-0.0 size=    8740kB time=00:00:51.31 bitrate=1395.1kbits/s speed=9.57x    
video:8279kB audio:29601kB subtitle:20kB other streams:0kB global headers:0kB muxing overhead: unknown

ffmpeg to overlay XSUBs:

"%~dps0\ffmpeg" -i "%~dps0\%~n1 XSUB.avi" -filter_complex "[0:v][0:s:0]overlay[out]" -map "[out]"	-map 0:a:0 -f avi -c:v libxvid -b:v 1500k -vtag XVID -c:a libmp3lame -b:a 128k "%~dps0\%~n1 XSUB to Hard Subs.avi"

Full Output:

ffmpeg version N-81696-gd38dff8e Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 57.100 / 57. 57.100
  libavformat    57. 49.100 / 57. 49.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[avi @ 049f81a0] scale/rate is 0/0 which is invalid. (This file has been generated by broken software.)
[avi @ 049f81a0] non-interleaved AVI
Input #0, avi, from 'C:\_CONVE~1\FFMPEG~2\XSUBAH~1\\Starship_Troopers XSUB.avi':
  Metadata:
    encoder         : Lavf57.49.100
  Duration: 00:00:51.32, start: 0.000000, bitrate: 1395 kb/s
    Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 720x480 [SAR 32:27 DAR 16:9], 1248 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
    Stream #0:2: Subtitle: xsub (DXSB / 0x42535844), 539 kb/s
[avi @ 049f81a0] sub2video: using 720x480 canvas
[avi @ 04abfa40] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
[null @ 04a36020] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, avi, to 'C:\_CONVE~1\FFMPEG~2\XSUBAH~1\\Starship_Troopers XSUB to Hard Subs.avi':
  Metadata:
    ISFT            : Lavf57.49.100
    Stream #0:0: Video: mpeg4 (libxvid) (XVID / 0x44495658), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=2-31, 1500 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
    Metadata:
      encoder         : Lavc57.57.100 libxvid
    Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 128 kb/s
    Metadata:
      encoder         : Lavc57.57.100 libmp3lame
Output #1, null, to 'nul':
  Metadata:
    encoder         : Lavf57.49.100
    Stream #1:0: Video: wrapped_avframe, yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc57.57.100 wrapped_avframe
    Stream #1:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    Metadata:
      encoder         : Lavc57.57.100 pcm_s16le
Stream mapping:
  Stream #0:0 (mpeg4) -> overlay:main (graph 0)
  Stream #0:2 (xsub) -> overlay:overlay (graph 0)
  overlay (graph 0) -> Stream #0:0 (libxvid)
  Stream #0:1 -> #0:1 (mp3 (native) -> mp3 (libmp3lame))
  Stream #0:0 -> #1:0 (mpeg4 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #1:1 (mp3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
frame=   87 fps=0.0 q=5.0 q=-0.0 size=     625kB time=00:00:03.93 bitrate=1299.9kbits/s speed=7.81x    
frame=  173 fps=172 q=5.0 q=-0.0 size=    1231kB time=00:00:07.51 bitrate=1342.2kbits/s speed=7.46x    
frame=  265 fps=176 q=7.0 q=-0.0 size=    1955kB time=00:00:11.35 bitrate=1410.5kbits/s speed=7.53x    
frame=  369 fps=184 q=4.0 q=-0.0 size=    2710kB time=00:00:15.69 bitrate=1414.4kbits/s speed=7.82x    
frame=  470 fps=187 q=11.0 q=-0.0 size=    3551kB time=00:00:19.89 bitrate=1462.2kbits/s speed=7.93x    
frame=  567 fps=188 q=11.0 q=-0.0 size=    4280kB time=00:00:23.95 bitrate=1463.7kbits/s speed=7.96x    
frame=  666 fps=190 q=12.0 q=-0.0 size=    5001kB time=00:00:28.05 bitrate=1460.2kbits/s speed=7.99x    
frame=  764 fps=190 q=6.0 q=-0.0 size=    5574kB time=00:00:32.13 bitrate=1420.9kbits/s speed=8.01x    
frame=  869 fps=193 q=5.0 q=-0.0 size=    6222kB time=00:00:36.52 bitrate=1395.4kbits/s speed=8.09x    
frame=  973 fps=194 q=5.0 q=-0.0 size=    6914kB time=00:00:40.87 bitrate=1385.8kbits/s speed=8.15x    
frame= 1076 fps=195 q=5.0 q=-0.0 size=    7637kB time=00:00:45.19 bitrate=1384.4kbits/s speed=8.19x    
frame= 1181 fps=196 q=6.0 q=-0.0 size=    8360kB time=00:00:49.56 bitrate=1381.9kbits/s speed=8.23x    
frame= 1230 fps=196 q=8.0 Lq=-0.0 size=    8790kB time=00:00:55.35 bitrate=1300.9kbits/s speed=8.82x    
video:8351kB audio:10413kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Change History (0)

Note: See TracTickets for help on using tickets.