Opened 8 years ago

Last modified 6 years ago

#5760 new defect

Error while generating VOD webm DASH manifest

Reported by: pszemus Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: maciej.pilichowski@sybillatechnologies.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I've followed http://wiki.webmproject.org/adaptive-streaming/instructions-to-do-webm-live-streaming-via-dash tutorial, but altered a little to create chunked VOD webm DASH streaming:

  1. Preparing 2 sec video and audio chunks:
    $ ffmpeg -i http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_10mb.mp4 -map 0:0 -c:v libvpx-vp9 -s 640x360 -keyint_min 50 -g 50 -tile-columns 4 -frame-parallel 1 -b:v 3000k -f webm_chunk -header webm_video_360.hdr -chunk_start_index 1 webm_video_360_%d.chk -map 0:1 -c:a libvorbis -b:a 128k -ar 44100 -f webm_chunk -audio_chunk_duration 2000 -header webm_audio_128.hdr -chunk_start_index 1 webm_audio_128_%d.chk  
    ffmpeg version N-81306-g26695ae Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 6.1.1 (GCC) 20160621 (Red Hat 6.1.1-3)
      configuration: --prefix=/home/pszemus/ffmpeg/build --enable-pic --enable-pthreads --enable-libmp3lame --enable-version3 --enable-libfdk-aac --enable-gpl --enable-nonfree --enable-libvpx --enable-libvorbis --enable-libopus --enable-libx264 --enable-libx265 --enable-libwebp --enable-protocol=https --enable-openssl --extra-cflags=-I/opt/WP/common.libs/include --extra-ldflags='-L/opt/WP/common.libs/lib -ldl'
      libavutil      55. 28.100 / 55. 28.100
      libavcodec     57. 51.100 / 57. 51.100
      libavformat    57. 46.100 / 57. 46.100
      libavdevice    57.  0.102 / 57.  0.102
      libavfilter     6. 50.100 /  6. 50.100
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  1.100 /  2.  1.100
      libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_10mb.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        creation_time   : 1970-01-01 00:00:00
        encoder         : Lavf53.24.2
      Duration: 00:01:02.32, start: 0.000000, bitrate: 1347 kb/s
        Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 959 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
        Metadata:
          creation_time   : 1970-01-01 00:00:00
          handler_name    : VideoHandler
        Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
        Metadata:
          creation_time   : 1970-01-01 00:00:00
          handler_name    : SoundHandler
    [libvpx-vp9 @ 0x2f80080] v1.5.0-1018-g181988d
    [webm_chunk @ 0x2fbb300] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    [webm_chunk @ 0x2f81760] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.                                                                                                               
    Output #0, webm_chunk, to 'webm_video_360_%d.chk':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf57.46.100
        Stream #0:0(und): Video: vp9 (libvpx-vp9), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 3000 kb/s, 25 fps, 25 tbn, 25 tbc (default)
        Metadata:
          creation_time   : 1970-01-01 00:00:00
          handler_name    : VideoHandler
          encoder         : Lavc57.51.100 libvpx-vp9
        Side data:
          cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Output #1, webm_chunk, to 'webm_audio_128_%d.chk':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf57.46.100
        Stream #1:0(und): Audio: vorbis (libvorbis), 44100 Hz, 5.1, fltp, 128 kb/s (default)
        Metadata:
          creation_time   : 1970-01-01 00:00:00
          handler_name    : SoundHandler
          encoder         : Lavc57.51.100 libvorbis
    Stream mapping:
      Stream #0:0 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))
      Stream #0:1 -> #1:0 (aac (native) -> vorbis (libvorbis))
    Press [q] to stop, [?] for help
    frame= 1557 fps= 13 q=0.0 Lsize=N/A time=00:01:02.31 bitrate=N/A speed=0.524x    
    video:51432kB audio:830kB subtitle:0kB other streams:0kB global headers:6kB muxing overhead: unknown
    
  1. Creating webm VOD DASH manifest - error:
    $ ffmpeg -f webm_dash_manifest -i webm_video_360.hdr -f webm_dash_manifest -i webm_audio_128.hdr -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 2000 manifest.mpd
    ffmpeg version N-81306-g26695ae Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 6.1.1 (GCC) 20160621 (Red Hat 6.1.1-3)
      configuration: --prefix=/home/pszemus/ffmpeg/build --enable-pic --enable-pthreads --enable-libmp3lame --enable-version3 --enable-libfdk-aac --enable-gpl --enable-nonfree --enable-libvpx --enable-libvorbis --enable-libopus --enable-libx264 --enable-libx265 --enable-libwebp --enable-protocol=https --enable-openssl --extra-cflags=-I/opt/WP/common.libs/include --extra-ldflags='-L/opt/WP/common.libs/lib -ldl'
      libavutil      55. 28.100 / 55. 28.100
      libavcodec     57. 51.100 / 57. 51.100
      libavformat    57. 46.100 / 57. 46.100
      libavdevice    57.  0.102 / 57.  0.102
      libavfilter     6. 50.100 /  6. 50.100
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  1.100 /  2.  1.100
      libpostproc    54.  0.100 / 54.  0.100
    [webm_dash_manifest @ 0x3d7a3a0] Duplicate element
        Last message repeated 1 times
    [webm_dash_manifest @ 0x3d7a3a0] Failed to read file headers
    webm_video_360.hdr: Operation not permitted
    

Change History (12)

comment:1 by pszemus, 8 years ago

Summary: Error while generating webm DASH manifestError while generating VOD webm DASH manifest

comment:2 by Carl Eugen Hoyos, 8 years ago

Which software plays the file(s) you created with the first command?

comment:3 by pszemus, 8 years ago

I don't know any software that can play chunked content without any manifest file (the first command doesn't generate one) although FFmpeg can handle that after adding "-live 1" to input parameters, but I don't want to do that because it's not a live stream.

comment:4 by pszemus, 8 years ago

And then it cannot detect the duration, maybe that's because of the "-live 1" parameter.

comment:5 by Carl Eugen Hoyos, 8 years ago

Sorry if I misunderstand: Didn't you report that by modifying some available instruction you can generate a file with FFmpeg that FFmpeg isn't able to read? And now you explain that nothing can play the resulting file?

comment:6 by pszemus, 8 years ago

Let me rephrase my problem: video and audio chunks that I created using the 1st command are valid webm chunks. To support my thesis I can play them concatenated using ffplay:

ffplay -i "concat:webm_video_360.hdr|webm_video_360_1.chk|webm_video_360_2.chk|webm_video_360_3.chk|webm_video_360_4.chk"
Input #0, matroska,webm, from 'concat:webm_video_360.hdr|webm_video_360_1.chk|webm_video_360_2.chk|webm_video_360_3.chk|webm_video_360_4.chk':
  Metadata:
    encoder         : Lavf57.48.101
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv), 640x360, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)

ffplay -i "concat:webm_audio_128.hdr|webm_audio_128_1.chk|webm_audio_128_2.chk|webm_audio_128_3.chk|webm_audio_128_4.chk"
Input #0, matroska,webm, from 'concat:webm_audio_128.hdr|webm_audio_128_1.chk|webm_audio_128_2.chk|webm_audio_128_3.chk|webm_audio_128_4.chk':
  Metadata:
    encoder         : Lavf57.48.101
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Audio: vorbis, 44100 Hz, 5.1, fltp (default)

But then I cannot generate DASH manifest for them neither using only header/init video and audio chunks:

ffmpeg -f webm_dash_manifest -i webm_video_360.hdr -f webm_dash_manifest -i webm_audio_128.hdr -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 2000 manifest.mpd
ffmpeg version N-81489-ga37e6dd Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 54.101 / 57. 54.101
  libavformat    57. 48.101 / 57. 48.101
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 57.100 /  6. 57.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[webm_dash_manifest @ 00000000003d8700] Duplicate element
    Last message repeated 1 times
[webm_dash_manifest @ 00000000003d8700] Failed to read file headers
webm_video_360.hdr: Operation not permitted

nor after concatenating them:

C:\Users\pszemus\WP>ffmpeg -i "concat:webm_video_360.hdr|webm_video_360_1.chk|webm_video_360_2.chk|webm_video_360_3.chk|webm_video_360_4.chk" -i "concat:webm_audio_128.hdr|webm_audio_128_1.chk|webm_audio_128_2.chk|webm_audio_128_3.chk|webm_audio_128_4.chk" -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 2000 manifest.mpd
ffmpeg version N-81489-ga37e6dd Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 54.101 / 57. 54.101
  libavformat    57. 48.101 / 57. 48.101
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 57.100 /  6. 57.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, matroska,webm, from 'concat:webm_video_360.hdr|webm_video_360_1.chk|webm_video_360_2.chk|webm_video_360_3.chk|webm_video_360_4.chk':
  Metadata:
    encoder         : Lavf57.48.101
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv), 640x360, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
Input #1, matroska,webm, from 'concat:webm_audio_128.hdr|webm_audio_128_1.chk|webm_audio_128_2.chk|webm_audio_128_3.chk|webm_audio_128_4.chk':
  Metadata:
    encoder         : Lavf57.48.101
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #1:0: Audio: vorbis, 44100 Hz, 5.1, fltp (default)
[webm_dash_manifest @ 00000000004729a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, webm_dash_manifest, to 'manifest.mpd':
  Metadata:
    encoder         : Lavf57.48.101
    Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1: Audio: vorbis, 44100 Hz, 5.1 (default)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input

comment:7 by pszemus, 8 years ago

Do you at least agree that it should be corrected?

in reply to:  6 comment:8 by Carl Eugen Hoyos, 8 years ago

Replying to pszemus:

Let me rephrase my problem: video and audio chunks that I created using the 1st command are valid webm chunks. To support my thesis I can play them concatenated using ffplay:

I don't think FFplay can be used to show that a particular file is "valid".

But then I cannot generate DASH manifest for them neither using only header/init video and audio chunks:

What can create such manifests for these files?

comment:9 by pszemus, 8 years ago

Let me rephrase my problem: video and audio chunks that I created using the 1st command are valid webm chunks. To support my thesis I can play them concatenated using ffplay:

I don't think FFplay can be used to show that a particular file is "valid".

I don't know how to convince you they are valid. I can play any chunk(s) after concatenating with hdr file using ffplay, mpv, vlc...
e.g.

cat webm_video_360.hdr webm_video_360_3.chk | {ffplay -i,mpv,vlc} -

But I cannot generate DASH manifest for them. If it's not a bug then maybe at least a feature request?

comment:10 by pszemus, 7 years ago

ping?

comment:11 by pszemus, 7 years ago

Any comment on that? It's been a month now.

comment:12 by astrowalker, 6 years ago

Cc: maciej.pilichowski@sybillatechnologies.com added
Note: See TracTickets for help on using tickets.