<p>I am trying to create a DASH manifest using ffmpeg and I encounter some difficulties with the subtitles. I get the error</p>

<pre><code>[webm_dash_manifest @ 0x55e19db48180] EBML header parsing failed
[webm_dash_manifest @ 0x55e19db48180] Failed to read file headers
subtitles.vtt: Operation not permitted
</code></pre>

<p>The subtitles are encoded in the plain text webvtt format. I first assume that the EBML header are missing because the subtitles were not contained in a webm container. I then tried to create a webm file containing only the subtitles. It appears impossible.</p>

<p>I think the problem comes from the webm_dash_manifest demuxer. It seeks metadata in a file with no metadata. However neither Google nor Stack Overflow give me an answer.</p>

<p>The command I used :</p>

<pre><code>ffmpeg \
-f webm_dash_manifest -i video.webm \
-f webm_dash_manifest -i audio.webm \
-f webm_dash_manifest -i subtitles.vtt \
-map 0 -map 1 -map 2 \
-c copy \
-f webm_dash_manifest \
-adaptation_sets "id=0,streams=0 id=1,streams=1 id=2,stream=2" \
minimal.mpd
</code></pre>

<p>and the ffmpeg output:</p>

<pre><code>ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[webm_dash_manifest @ 0x55e19db17160] Could not find codec parameters for stream 0 (Video: vp9, none, 1280x534): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, webm_dash_manifest, from 'video.webm':
  Metadata:
    title           : Cloud Atlas
    ENCODER         : Lavf58.35.104
  Duration: 00:05:00.01, bitrate: 998 kb/s
    Chapter #0:0: start 0.000000, end 300.000000
    Metadata:
      title           : Chapter 01
    Stream #0:0(eng): Video: vp9, none, 1280x534, SAR 1:1 DAR 640:267, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default) (forced)
    Metadata:
      title           : Video @ 6.9 Mbps [frame B:188517 Avg QP:20.66]
      ENCODER         : Lavc58.66.100 libvpx-vp9
      DURATION        : 00:05:00.008000000
      webm_dash_manifest_duration: 300008
      webm_dash_manifest_initialization_range: 900
      webm_dash_manifest_file_name: video.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 37455991
      webm_dash_manifest_cues_end: 37457486
      webm_dash_manifest_bandwidth: 1420427
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 298715
Input #1, webm_dash_manifest, from 'audio.webm':
  Metadata:
    title           : Cloud Atlas
    ENCODER         : Lavf58.35.104
  Duration: 00:05:00.01, bitrate: 126 kb/s
    Chapter #1:0: start 0.000000, end 300.000000
    Metadata:
      title           : Chapter 01
    Stream #1:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Audio Eng DTS 5.1 channels 24 bits @ 1509 Kbps cbr
      ENCODER         : Lavc58.66.100 libopus
      DURATION        : 00:05:00.007000000
      webm_dash_manifest_duration: 300007
      webm_dash_manifest_initialization_range: 838
      webm_dash_manifest_file_name: audio.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 4744091
      webm_dash_manifest_cues_end: 4745279
      webm_dash_manifest_bandwidth: 137531
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 295000
[webm_dash_manifest @ 0x55e19db48180] EBML header parsing failed
[webm_dash_manifest @ 0x55e19db48180] Failed to read file headers
subtitles.vtt: Operation not permitted
</code></pre>

<p>I noticed that <code>ffmpeg -f webm_dash_manifest -i subtitles.vtt</code> suffices to reproduce the error.</p>

<p>I have also tried without the <code>-f webm_dash_manifest</code> flag, with no success : </p>

<pre><code>ffmpeg \
-f webm_dash_manifest -i video.webm \
-f webm_dash_manifest -i audio.webm \
-i subtitles.vtt \
-map 0 -map 1 -map 2 \
-c copy \
-f webm_dash_manifest \
-adaptation_sets "id=0,streams=0 id=1,streams=1 id=2,stream=2" minimal.mpd
</code></pre>

<p>Output : </p>

<pre><code>ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[webm_dash_manifest @ 0x557f55dd1160] Could not find codec parameters for stream 0 (Video: vp9, none, 1280x534): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, webm_dash_manifest, from 'video.webm':
  Metadata:
    title           : Cloud Atlas
    ENCODER         : Lavf58.35.104
  Duration: 00:05:00.01, bitrate: 998 kb/s
    Chapter #0:0: start 0.000000, end 300.000000
    Metadata:
      title           : Chapter 01
    Stream #0:0(eng): Video: vp9, none, 1280x534, SAR 1:1 DAR 640:267, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default) (forced)
    Metadata:
      title           : Video @ 6.9 Mbps [frame B:188517 Avg QP:20.66]
      ENCODER         : Lavc58.66.100 libvpx-vp9
      DURATION        : 00:05:00.008000000
      webm_dash_manifest_duration: 300008
      webm_dash_manifest_initialization_range: 900
      webm_dash_manifest_file_name: video.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 37455991
      webm_dash_manifest_cues_end: 37457486
      webm_dash_manifest_bandwidth: 1420427
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 298715
Input #1, webm_dash_manifest, from 'audio.webm':
  Metadata:
    title           : Cloud Atlas
    ENCODER         : Lavf58.35.104
  Duration: 00:05:00.01, bitrate: 126 kb/s
    Chapter #1:0: start 0.000000, end 300.000000
    Metadata:
      title           : Chapter 01
    Stream #1:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Audio Eng DTS 5.1 channels 24 bits @ 1509 Kbps cbr
      ENCODER         : Lavc58.66.100 libopus
      DURATION        : 00:05:00.007000000
      webm_dash_manifest_duration: 300007
      webm_dash_manifest_initialization_range: 838
      webm_dash_manifest_file_name: audio.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 4744091
      webm_dash_manifest_cues_end: 4745279
      webm_dash_manifest_bandwidth: 137531
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 295000
Input #2, webvtt, from 'subtitles.vtt':
  Duration: N/A, bitrate: N/A
    Stream #2:0: Subtitle: webvtt
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permittedStream mapping:
  Stream #0:0 -&gt; #0:0 (copy)
  Stream #1:0 -&gt; #0:1 (copy)
  Stream #2:0 -&gt; #0:2 (copy)
    Last message repeated 1 times
</code></pre>

<p>Note : <code>[webm_dash_manifest @ 0x557f55dd1160] Could not find codec parameters for stream 0 (Video: vp9, none, 1280x534): unspecified pixel format</code> is harmless according to <a href="https://stackoverflow.com/questions/32650818/ffmpeg-dash-manifest-cannot-be-created-due-to-unspecified-pixel-format">this post</a>.</p>

<p>The subtitles have been extracted with ffmpeg :</p>

<p><code>ffmpeg -i "Cloud Atlas.mkv" -map 0:6 -t 00:05:00 -c:s webvtt -dash 1 subtitles.vtt</code></p>

CC BY-SA 4.0
2020-09-04T17:01:52.833Z
Any update on this?
Clement Bisaillon
CC BY-SA 4.0
2020-10-23T17:35:38.683Z
@ClémentBisaillon I haven't find any solution with ffmpeg. I use instead the [shaka-packager](https://github.com/google/shaka-packager).
Hyldrean
<ffmpeg><webvideos><mpeg-dash>
The ffmpeg webm_dash_manifest demuxer fails with webvtt subtitles
Hyldrean
# The ffmpeg webm_dash_manifest demuxer fails with webvtt subtitles

(Asked by: username_0 on 2020-01-27)

I am trying to create a DASH manifest using ffmpeg and I encounter some difficulties with the subtitles. I get the error
[webm_dash_manifest @ 0x55e19db48180] EBML header parsing failed
[webm_dash_manifest @ 0x55e19db48180] Failed to read file headers
subtitles.vtt: Operation not permitted

The subtitles are encoded in the plain text webvtt format. I first assume that the EBML header are missing because the subtitles were not contained in a webm container. I then tried to create a webm file containing only the subtitles. It appears impossible.
I think the problem comes from the webm_dash_manifest demuxer. It seeks metadata in a file with no metadata. However neither Google nor Stack Overflow give me an answer.
The command I used :
ffmpeg \
-f webm_dash_manifest -i video.webm \
-f webm_dash_manifest -i audio.webm \
-f webm_dash_manifest -i subtitles.vtt \
-map 0 -map 1 -map 2 \
-c copy \
-f webm_dash_manifest \
-adaptation_sets "id=0,streams=0 id=1,streams=1 id=2,stream=2" \
minimal.mpd

and the ffmpeg output:
ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[webm_dash_manifest @ 0x55e19db17160] Could not find codec parameters for stream 0 (Video: vp9, none, 1280x534): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, webm_dash_manifest, from 'video.webm':
  Metadata:
    title           : Cloud Atlas
    ENCODER         : Lavf58.35.104
  Duration: 00:05:00.01, bitrate: 998 kb/s
    Chapter #0:0: start 0.000000, end 300.000000
    Metadata:
      title           : Chapter 01
    Stream #0:0(eng): Video: vp9, none, 1280x534, SAR 1:1 DAR 640:267, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default) (forced)
    Metadata:
      title           : Video @ 6.9 Mbps [frame B:188517 Avg QP:20.66]
      ENCODER         : Lavc58.66.100 libvpx-vp9
      DURATION        : 00:05:00.008000000
      webm_dash_manifest_duration: 300008
      webm_dash_manifest_initialization_range: 900
      webm_dash_manifest_file_name: video.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 37455991
      webm_dash_manifest_cues_end: 37457486
      webm_dash_manifest_bandwidth: 1420427
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 298715
Input #1, webm_dash_manifest, from 'audio.webm':
  Metadata:
    title           : Cloud Atlas
    ENCODER         : Lavf58.35.104
  Duration: 00:05:00.01, bitrate: 126 kb/s
    Chapter #1:0: start 0.000000, end 300.000000
    Metadata:
      title           : Chapter 01
    Stream #1:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Audio Eng DTS 5.1 channels 24 bits @ 1509 Kbps cbr
      ENCODER         : Lavc58.66.100 libopus
      DURATION        : 00:05:00.007000000
      webm_dash_manifest_duration: 300007
      webm_dash_manifest_initialization_range: 838
      webm_dash_manifest_file_name: audio.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 4744091
      webm_dash_manifest_cues_end: 4745279
      webm_dash_manifest_bandwidth: 137531
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 295000
[webm_dash_manifest @ 0x55e19db48180] EBML header parsing failed
[webm_dash_manifest @ 0x55e19db48180] Failed to read file headers
subtitles.vtt: Operation not permitted

I noticed that ffmpeg -f webm_dash_manifest -i subtitles.vtt suffices to reproduce the error.
I have also tried without the -f webm_dash_manifest flag, with no success : 
ffmpeg \
-f webm_dash_manifest -i video.webm \
-f webm_dash_manifest -i audio.webm \
-i subtitles.vtt \
-map 0 -map 1 -map 2 \
-c copy \
-f webm_dash_manifest \
-adaptation_sets "id=0,streams=0 id=1,streams=1 id=2,stream=2" minimal.mpd

Output : 
ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[webm_dash_manifest @ 0x557f55dd1160] Could not find codec parameters for stream 0 (Video: vp9, none, 1280x534): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, webm_dash_manifest, from 'video.webm':
  Metadata:
    title           : Cloud Atlas
    ENCODER         : Lavf58.35.104
  Duration: 00:05:00.01, bitrate: 998 kb/s
    Chapter #0:0: start 0.000000, end 300.000000
    Metadata:
      title           : Chapter 01
    Stream #0:0(eng): Video: vp9, none, 1280x534, SAR 1:1 DAR 640:267, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default) (forced)
    Metadata:
      title           : Video @ 6.9 Mbps [frame B:188517 Avg QP:20.66]
      ENCODER         : Lavc58.66.100 libvpx-vp9
      DURATION        : 00:05:00.008000000
      webm_dash_manifest_duration: 300008
      webm_dash_manifest_initialization_range: 900
      webm_dash_manifest_file_name: video.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 37455991
      webm_dash_manifest_cues_end: 37457486
      webm_dash_manifest_bandwidth: 1420427
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 298715
Input #1, webm_dash_manifest, from 'audio.webm':
  Metadata:
    title           : Cloud Atlas
    ENCODER         : Lavf58.35.104
  Duration: 00:05:00.01, bitrate: 126 kb/s
    Chapter #1:0: start 0.000000, end 300.000000
    Metadata:
      title           : Chapter 01
    Stream #1:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Audio Eng DTS 5.1 channels 24 bits @ 1509 Kbps cbr
      ENCODER         : Lavc58.66.100 libopus
      DURATION        : 00:05:00.007000000
      webm_dash_manifest_duration: 300007
      webm_dash_manifest_initialization_range: 838
      webm_dash_manifest_file_name: audio.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 4744091
      webm_dash_manifest_cues_end: 4745279
      webm_dash_manifest_bandwidth: 137531
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 295000
Input #2, webvtt, from 'subtitles.vtt':
  Duration: N/A, bitrate: N/A
    Stream #2:0: Subtitle: webvtt
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permittedStream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
  Stream #2:0 -> #0:2 (copy)
    Last message repeated 1 times

Note : [webm_dash_manifest @ 0x557f55dd1160] Could not find codec parameters for stream 0 (Video: vp9, none, 1280x534): unspecified pixel format is harmless according to this post.
The subtitles have been extracted with ffmpeg :
ffmpeg -i "Cloud Atlas.mkv" -map 0:6 -t 00:05:00 -c:s webvtt -dash 1 subtitles.vtt

**Tags:** ffmpeg, webvideos, mpeg-dash

> **Comments:**
> **username_1**: Any update on this?  
> **username_0**: @ClémentBisaillon I haven't find any solution with ffmpeg. I use instead the [shaka-packager](https://github.com/google/shaka-packager).  

---

## 0 answers

