Opened 3 years ago

Last modified 3 years ago

#5641 open defect

Support WebVTT according to MKV specs

Reported by: RiCON Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: webvtt mkv
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

FFmpeg supports the D_WEBVTT/SUBTITLES flavor following WebM specs (http://www.webmproject.org/docs/container/), but not the recent S_TEXT/WEBVTT flavor added to Matroska spec (https://matroska.org/technical/specs/codecid/index.html), likely close to it being added to mkvtoolnix in https://github.com/mbunkus/mkvtoolnix/commit/c0c8ea01 .

It should probably also be changed to mux WebVTT tracks as S_TEXT/WEBVTT, at least to Matroska so mkvtoolnix recognizes the track as valid subtitles.

ffmpeg -i cut-vtt.mkv
ffmpeg version N-80317-gff53b66-g9da27fb+1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (Rev1, Built by MSYS2 project)
  configuration:  --enable-libx264 --enable-libvpx --enable-libopus --disable-postproc --disable-doc --disable-demuxer=asf --disable-ffplay --enable-gpl --disable-debug
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 46.100 / 57. 46.100
  libavformat    57. 38.100 / 57. 38.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 46.101 /  6. 46.101
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
[matroska,webm @ 000000038f2d1c60] Unknown/unsupported AVCodecID S_TEXT/WEBVTT.
[matroska,webm @ 000000038f2d1c60] Could not find codec parameters for stream 3 (Subtitle: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, matroska,webm, from 'cut-vtt.mkv':
  Metadata:
    encoder         : libebml v1.3.3 + libmatroska v1.4.4
    creation_time   : 2016-06-14 12:56:53
  Duration: 00:00:11.28, start: 0.000000, bitrate: 352 kb/s
    Stream #0:0: Video: vp9 (Profile 2), yuv420p10le(tv), 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      BPS             : 291322
      BPS-eng         : 291322
      DURATION        : 00:00:09.760000000
      DURATION-eng    : 00:00:09.760000000
      NUMBER_OF_FRAMES: 234
      NUMBER_OF_FRAMES-eng: 234
      NUMBER_OF_BYTES : 355414
      NUMBER_OF_BYTES-eng: 355414
      _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-06-14 12:56:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-06-14 12:56:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp (default) (forced)
    Metadata:
      BPS             : 107013
      BPS-eng         : 107013
      DURATION        : 00:00:09.758000000
      DURATION-eng    : 00:00:09.758000000
      NUMBER_OF_FRAMES: 488
      NUMBER_OF_FRAMES-eng: 488
      NUMBER_OF_BYTES : 130530
      NUMBER_OF_BYTES-eng: 130530
      _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-06-14 12:56:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-06-14 12:56:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Subtitle: webvtt
    Metadata:
      title           : FFmpeg
      BPS             : 163
      BPS-eng         : 163
      DURATION        : 00:00:10.300000000
      DURATION-eng    : 00:00:10.300000000
      NUMBER_OF_FRAMES: 5
      NUMBER_OF_FRAMES-eng: 5
      NUMBER_OF_BYTES : 211
      NUMBER_OF_BYTES-eng: 211
      _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-06-14 12:56:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-06-14 12:56:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3: Subtitle: none (default)
    Metadata:
      title           : mkvmerge
      BPS             : 0
      BPS-eng         : 0
      DURATION        : 00:00:00.000000000
      DURATION-eng    : 00:00:00.000000000
      NUMBER_OF_FRAMES: 0
      NUMBER_OF_FRAMES-eng: 0
      NUMBER_OF_BYTES : 0
      NUMBER_OF_BYTES-eng: 0
      _STATISTICS_WRITING_APP: mkvmerge v9.2.0 ('Photograph') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v9.2.0 ('Photograph') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-06-14 12:56:53
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-06-14 12:56:53
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
At least one output file must be specified

Attachments (1)

cut-vtt.mkv (484.9 KB) - added by RiCON 3 years ago.
Matroska file with both WebVTT flavors. FFmpeg only recognizes one of them.

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by RiCON

Matroska file with both WebVTT flavors. FFmpeg only recognizes one of them.

comment:1 Changed 3 years ago by cehoyos

  • Keywords mkv added; matroska removed
  • Reproduced by developer set
  • Status changed from new to open
Note: See TracTickets for help on using tickets.