[FFmpeg-trac] #6390(undetermined:new): ASS subtitle parser truncates lines at 4095 characters

FFmpeg trac at avcodec.org
Mon May 15 08:42:05 EEST 2017


#6390: ASS subtitle parser truncates lines at 4095 characters
-------------------------------------+-------------------------------------
             Reporter:               |                     Type:  defect
  TellowKrinkle                      |                 Priority:  normal
               Status:  new          |                  Version:
            Component:               |  unspecified
  undetermined                       |               Blocked By:
             Keywords:               |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug: Any line in an ASS subtitle file that is longer than
 4095 characters gets truncated to 4095 characters
 How to reproduce: Run ffmpeg with an .ass file with a line > 4095
 characters as an input with -c copy to an ass output.  The line will have
 been truncated.
 {{{
 % ffmpeg -report -i subtitleLongerThan4095.ass -c copy
 subtitleTrimmedTo4095.ass
 ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers
   built with Apple LLVM version 8.1.0 (clang-802.0.42)
   configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3 --enable-shared
 --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables
 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-
 libass --enable-libmp3lame --enable-libopus --enable-libssh --enable-
 libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-
 libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-lzma
 --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-
 cflags=-I/usr/local/Cellar/openjpeg/2.1.2_1/include/openjpeg-2.1 --enable-
 vda
   libavutil      55. 58.100 / 55. 58.100
   libavcodec     57. 89.100 / 57. 89.100
   libavformat    57. 71.100 / 57. 71.100
   libavdevice    57.  6.100 / 57.  6.100
   libavfilter     6. 82.100 /  6. 82.100
   libavresample   3.  5.  0 /  3.  5.  0
   libswscale      4.  6.100 /  4.  6.100
   libswresample   2.  7.100 /  2.  7.100
   libpostproc    54.  5.100 / 54.  5.100
 Splitting the commandline.
 Reading option '-report' ... matched as option 'report' (generate a
 report) with argument '1'.
 Reading option '-i' ... matched as input url with argument
 'subtitleLongerThan4095.ass'.
 Reading option '-c' ... matched as option 'c' (codec name) with argument
 'copy'.
 Reading option 'subtitleTrimmedTo4095.ass' ... matched as output url.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option report (generate a report) with argument 1.
 Successfully parsed a group of options.
 Parsing a group of options: input url subtitleLongerThan4095.ass.
 Successfully parsed a group of options.
 Opening an input file: subtitleLongerThan4095.ass.
 [file @ 0x7fa300e003c0] Setting default whitelist 'file,crypto'
 [ass @ 0x7fa302003c00] Format ass probed with size=2048 and score=100
 [ass @ 0x7fa302003c00] Before avformat_find_stream_info() pos: 45831 bytes
 read:45831 seeks:0 nb_streams:1
 [ass @ 0x7fa302003c00] All info found
 [ass @ 0x7fa302003c00] After avformat_find_stream_info() pos: 45831 bytes
 read:45831 seeks:0 frames:0
 Input #0, ass, from 'subtitleLongerThan4095.ass':
   Duration: N/A, bitrate: N/A
     Stream #0:0, 0, 1/100: Subtitle: ass
 Successfully opened the file.
 Parsing a group of options: output url subtitleTrimmedTo4095.ass.
 Applying option c (codec name) with argument copy.
 Successfully parsed a group of options.
 Opening an output file: subtitleTrimmedTo4095.ass.
 [file @ 0x7fa300f015c0] Setting default whitelist 'file,crypto'
 Successfully opened the file.
 Output #0, ass, to 'subtitleTrimmedTo4095.ass':
   Metadata:
     encoder         : Lavf57.71.100
     Stream #0:0, 0, 1/100: Subtitle: ass
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 No more output streams to write to, finishing.
 size=       5kB time=00:15:07.05 bitrate=   0.0kbits/s speed=8.25e+06x
 video:0kB audio:0kB subtitle:43kB other streams:0kB global headers:1kB
 muxing overhead: unknown
 Input file #0 (subtitleLongerThan4095.ass):
   Input stream #0:0 (subtitle): 1 packets read (44288 bytes);
   Total: 1 packets (44288 bytes) demuxed
 Output file #0 (subtitleTrimmedTo4095.ass):
   Output stream #0:0 (subtitle): 1 packets muxed (44288 bytes);
   Total: 1 packets (44288 bytes) muxed
 0 frames successfully decoded, 0 decoding errors
 [AVIOContext @ 0x7fa300f016a0] Statistics: 0 seeks, 2 writeouts
 [AVIOContext @ 0x7fa300e004c0] Statistics: 45831 bytes read, 0 seeks
 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6390>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list