#9064(avformat:new): WebVTT decoder truncates files with STYLE blocks
#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
#9064: WebVTT decoder truncates files with STYLE blocks ------------------------------------+------------------------------------ Reporter: rschupp | Owner: Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Changes (by rschupp): * Attachment "sample_in.vtt" added. (input) sample WebVTT file with STYLE blocks -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9064: WebVTT decoder truncates files with STYLE blocks ------------------------------------+------------------------------------ Reporter: rschupp | Owner: Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Changes (by rschupp): * Attachment "sample_out.vtt" added. (output) result of "ffmpeg -i sample_in.vtt -c copy sample_out.txt" -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9064: WebVTT decoder truncates files with STYLE blocks -------------------------------------+------------------------------------- Reporter: Roderich | Owner: (none) Schupp | Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by anonymous_coward): I proposed a patch to fix this (and also write STYLE blocks out), but it has had no traction. Feel free to pile in on the thread. https://patchwork.ffmpeg.org/project/ffmpeg/patch/CA+_k4RJ1CNriPbhxxzLf1O6V1... -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9064: WebVTT decoder truncates files with STYLE blocks -------------------------------------+------------------------------------- Reporter: Roderich | Owner: (none) Schupp | Type: enhancement | Status: new Priority: wish | Component: avformat Version: git-master | Resolution: Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Carl Eugen Hoyos): * priority: normal => wish * type: defect => enhancement Comment: See also #9609 -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9064: WebVTT decoder truncates files with STYLE blocks -------------------------------------+------------------------------------- Reporter: Roderich | Owner: (none) Schupp | Type: enhancement | Status: new Priority: wish | Component: avformat Version: git-master | Resolution: Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by anonymous_coward): Is this really simply an enhancement? Even if styles aren't supported, total loss of captions seems like a defect to me. Either processing or just ignoring STYLE blocks would solve this issue. The patch above (and at least one other submitted some time ago) addresses this issue directly - would it be possible for it to be reviewed please? -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9064: WebVTT decoder truncates files with STYLE blocks -------------------------------------+------------------------------------- Reporter: Roderich | Owner: (none) Schupp | Type: enhancement | Status: new Priority: wish | Component: avformat Version: git-master | Resolution: Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by August Wikerfors): * cc: August Wikerfors (added) -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
Is this really simply an enhancement? Even if styles aren't supported, total loss of captions seems like a defect to me. Either processing or just ignoring STYLE blocks would solve this issue.
The patch above (and at least one other submitted some time ago) addresses this issue directly - would it be possible for it to be reviewed
#9064: WebVTT decoder truncates files with STYLE blocks -------------------------------------+------------------------------------- Reporter: Roderich | Owner: (none) Schupp | Type: enhancement | Status: new Priority: wish | Component: avformat Version: git-master | Resolution: Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by Cqoicebordel): Replying to [comment:3 anonymous_coward]: please? Agreed. It's flabbergasting to have a 0k file or a file just with an header when converting from vtt to anything else, with only this error messageĀ : {{{ Output file is empty, nothing was encoded(check -ss / -t / -frames parameters if used) }}} At least having a good error message would be helpful. Converting to a file without style would be welcome though. (And converting with style, even the basics (bg/fg colors + align) would be ideal, but that's another FR) -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9064: WebVTT decoder truncates files with STYLE blocks -------------------------------------+------------------------------------- Reporter: Roderich | Owner: (none) Schupp | Type: enhancement | Status: new Priority: wish | Component: avformat Version: git-master | Resolution: Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by nathanielcwm): * cc: nathanielcwm (added) -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9064: WebVTT decoder truncates files with STYLE blocks -------------------------------------+------------------------------------- Reporter: Roderich | Owner: (none) Schupp | Type: enhancement | Status: new Priority: wish | Component: avformat Version: git-master | Resolution: Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by anonymous_coward): This is likely fixed via 51d303e20cbb0874172f50b5172c515a973587d4 but I haven't tested. -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#9064: WebVTT decoder truncates files with STYLE blocks -------------------------------------+------------------------------------- Reporter: Roderich | Owner: (none) Schupp | Type: defect | Status: closed Priority: normal | Component: avformat Version: git-master | Resolution: fixed Keywords: webvtt | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by MasterQuestionable): * cc: MasterQuestionable (added) * priority: wish => normal * status: new => closed * resolution: => fixed * type: enhancement => defect -- Ticket URL: <https://trac.ffmpeg.org/ticket/9064#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg