#9064: WebVTT decoder truncates files with STYLE blocks ----------------------------------+-------------------------------------- Reporter: rschupp | Type: defect Status: new | Priority: normal Component: avformat | Version: git-master Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+-------------------------------------- If a webvtt file contains STYLE blocks, the webvtt decoder truncates the file at the first such block. Since these blocks typically occur at the top of the webvtt file, this results in an empty file (except for the WEBVTT header line).
Note: This may be related to #8684, though the sample webvtt attached there is invalid. How to reproduce: $ ffmpeg -y -v 9 -loglevel 99 -i sample_in.vtt -c copy sample_out.vtt ffmpeg version 4.3.1-5 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 10 (Debian 10.2.0-15) configuration: --prefix=/usr --extra-version=5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable- libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable- libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable- librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --disable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable- omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared WARNING: library configuration mismatch avcodec configuration: --prefix=/usr --extra-version=5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable- libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable- libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable- libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable- libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --disable- libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable- libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-liblensfun --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Splitting the commandline. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'. Reading option '-i' ... matched as input url with argument 'sample_in.vtt'. Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'. Reading option 'sample_out.vtt' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option y (overwrite output files) with argument 1. Applying option v (set logging level) with argument 9. Successfully parsed a group of options. Parsing a group of options: input url sample_in.vtt. Successfully parsed a group of options. Opening an input file: sample_in.vtt. [NULL @ 0x5569603be0c0] Opening 'sample_in.vtt' for reading [file @ 0x5569603beb80] Setting default whitelist 'file,crypto,data' Probing webvtt score:100 size:362 [webvtt @ 0x5569603be0c0] Format webvtt probed with size=2048 and score=100 [webvtt @ 0x5569603be0c0] Before avformat_find_stream_info() pos: 55 bytes read:362 seeks:0 nb_streams:1 [webvtt @ 0x5569603be0c0] All info found [webvtt @ 0x5569603be0c0] stream 0: start_time: NOPTS duration: NOPTS [webvtt @ 0x5569603be0c0] format: start_time: NOPTS duration: NOPTS (estimate from bit rate) bitrate=0 kb/s [webvtt @ 0x5569603be0c0] After avformat_find_stream_info() pos: 55 bytes read:362 seeks:0 frames:0 Input #0, webvtt, from 'sample_in.vtt': Duration: N/A, bitrate: N/A Stream #0:0, 0, 1/1000: Subtitle: webvtt Successfully opened the file. Parsing a group of options: output url sample_out.vtt. Applying option c (codec name) with argument copy. Successfully parsed a group of options. Opening an output file: sample_out.vtt. [file @ 0x5569603c4140] Setting default whitelist 'file,crypto,data' Successfully opened the file. Output #0, webvtt, to 'sample_out.vtt': Metadata: encoder : Lavf58.45.100 Stream #0:0, 0, 1/1000: Subtitle: webvtt Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) No more output streams to write to, finishing. size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Input file #0 (sample_in.vtt): Input stream #0:0 (subtitle): 0 packets read (0 bytes); Total: 0 packets (0 bytes) demuxed Output file #0 (sample_out.vtt): Output stream #0:0 (subtitle): 0 packets muxed (0 bytes); Total: 0 packets (0 bytes) muxed Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) 0 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x5569603c43c0] Statistics: 0 seeks, 1 writeouts [AVIOContext @ 0x5569603c6fc0] Statistics: 362 bytes read, 0 seeks -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org https://ffmpeg.org/mailman/listinfo/ffmpeg-trac To unsubscribe, visit link above, or email ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".