[FFmpeg-user] webm_dash_manifest: unspecified pixel format when using libvpx-vp9

Aergistal aergistall at gmail.com
Mon Sep 21 14:50:28 CEST 2015


Hello,

I am following the example on
http://wiki.webmproject.org/adaptive-streaming/instructions-to-playback-adaptive-webm-using-dash
.

When attempting to create the DASH manfiest ffmpeg complains about an
unspecified pixel format but manages to create the manifest anyway. This
only happens when the webm files are encoded with libvpx-vp9, it works
without errors for libvpx (vp8).

In libavformat/utils.c, function avformat_find_stream_info() it tries to
get the pixel format from the codec context:

 // Try to just open decoders, in case this is enough to get parameters.
        if (!has_codec_parameters(st, NULL) && st->request_probe <= 0) {
            if (codec && !st->codec->codec)
                if (avcodec_open2(st->codec, codec, options ? &options[i] :
&thread_opt) < 0)
                    av_log(ic, AV_LOG_WARNING,
                           "Failed to open codec in av_find_stream_info\n");
  }


st->codec->pix_fmt is 0 when encoding with vp8 and -1 (not found) when
using vp9.

Is this a libvpx issue?

Full console output below (for a single file):


# Encoding


$ ffmpeg -i input.mp4 -c:v libvpx-vp9 -s 320x180 -b:v 500k -keyint_min 150
-g 150 -tile-columns 4 -frame-parallel 1 -an -f webm -dash 1
video_320x180_500k.webm
ffmpeg version N-75454-g44f660e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --prefix=/home/user/src/ffmpeg_build
--extra-cflags='-I/home/user/src/ffmpeg_build/include -fPIC'
--extra-ldflags=-L/home/user/src/ffmpeg_build/lib --extra-libs=-ldl
--bindir=/home/user/bin --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libfreetype --enable-libmp3lame --enable-libopus
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libx265 --enable-x11grab --enable-nonfree
  libavutil      55.  2.100 / 55.  2.100
  libavcodec     57.  3.100 / 57.  3.100
  libavformat    57.  2.100 / 57.  2.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6.  5.100 /  6.  5.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2013-04-12 15:59:59
  Duration: 00:01:25.34, start: 0.046440, bitrate: 2482 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 2321 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
47.95 tbc (default)
    Metadata:
      creation_time   : 2013-04-12 15:59:59
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz,
stereo, fltp, 157 kb/s (default)
    Metadata:
      creation_time   : 2013-04-12 15:59:59
      handler_name    : L-SMASH Audio Handler
[libvpx-vp9 @ 0x2fb4220] v1.4.0
Output #0, webm, to 'video_320x180_500k.webm':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    encoder         : Lavf57.2.100
    Stream #0:0(und): Video: vp9 (libvpx-vp9), yuv420p, 320x180 [SAR 1:1
DAR 16:9], q=-1--1, 500 kb/s, 23.98 fps, 1k tbn, 23.98 tbc (default)
    Metadata:
      creation_time   : 2013-04-12 15:59:59
      handler_name    : L-SMASH Video Handler
      encoder         : Lavc57.3.100 libvpx-vp9
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> vp9 (libvpx-vp9))
Press [q] to stop, [?] for help
frame= 2046 fps= 21 q=0.0 Lsize=    3912kB time=00:01:25.37 bitrate=
375.3kbits/s
video:3897kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.369273%


# DASH manifest


$ ffmpeg -f webm_dash_manifest -i video_320x180_500k.webm -c copy -map 0 -f
webm_dash_manifest -adaptation_sets "id=0,streams=0" manifest.mpd -v debug
ffmpeg version N-75454-g44f660e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --prefix=/home/user/src/ffmpeg_build
--extra-cflags='-I/home/user/src/ffmpeg_build/include -fPIC'
--extra-ldflags=-L/home/user/src/ffmpeg_build/lib --extra-libs=-ldl
--bindir=/home/user/bin --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libfreetype --enable-libmp3lame --enable-libopus
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
--enable-libx265 --enable-x11grab --enable-nonfree
  libavutil      55.  2.100 / 55.  2.100
  libavcodec     57.  3.100 / 57.  3.100
  libavformat    57.  2.100 / 57.  2.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6.  5.100 /  6.  5.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-f' ... matched as option 'f' (force format) with argument
'webm_dash_manifest'.
Reading option '-i' ... matched as input file with argument
'video_320x180_500k.webm'.
Reading option '-c' ... matched as option 'c' (codec name) with argument
'copy'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'webm_dash_manifest'.
Reading option '-adaptation_sets' ... matched as AVOption 'adaptation_sets'
with argument 'id=0,streams=0'.
Reading option 'manifest.mpd' ... matched as output file.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file video_320x180_500k.webm.
Applying option f (force format) with argument webm_dash_manifest.
Successfully parsed a group of options.
Opening an input file: video_320x180_500k.webm.
st:0 removing common factor 1000000 from timebase
[webm_dash_manifest @ 0x3dc25c0] Before avformat_find_stream_info() pos:
442 bytes read:452000 seeks:18
[webm_dash_manifest @ 0x3dc25c0] Could not find codec parameters for stream
0 (Video: vp9, 1 reference frame, none, 320x180, 1/1000): unspecified pixel
format
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
[webm_dash_manifest @ 0x3dc25c0] After avformat_find_stream_info() pos: 442
bytes read:452000 seeks:18 frames:0
video_320x180_500k.webm: could not find codec parameters
Input #0, webm_dash_manifest, from 'video_320x180_500k.webm':
  Metadata:
    encoder         : Lavf57.2.100
  Duration: 00:01:25.38, bitrate: 375 kb/s
    Stream #0:0, 0, 1/1000: Video: vp9, 1 reference frame, none, 320x180,
1/1000, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      webm_dash_manifest_duration: 85377
      webm_dash_manifest_initialization_range: 437
      webm_dash_manifest_file_name: video_320x180_500k.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 4005267
      webm_dash_manifest_cues_end: 4005545
      webm_dash_manifest_bandwidth: 456687
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 81373
Successfully opened the file.
Parsing a group of options: output file manifest.mpd.
Applying option c (codec name) with argument copy.
Applying option map (set input stream mapping) with argument 0.
Applying option f (force format) with argument webm_dash_manifest.
Successfully parsed a group of options.
Opening an output file: manifest.mpd.
Successfully opened the file.
Output #0, webm_dash_manifest, to 'manifest.mpd':
  Metadata:
    encoder         : Lavf57.2.100
    Stream #0:0, 0, 1/1000: Video: vp9, 1 reference frame, none, 320x180
(0x0) [SAR 1:1 DAR 16:9], 1/1000, q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 1k
tbc (default)
    Metadata:
      webm_dash_manifest_duration: 85377
      webm_dash_manifest_initialization_range: 437
      webm_dash_manifest_file_name: video_320x180_500k.webm
      webm_dash_manifest_track_number: 1
      webm_dash_manifest_cues_start: 4005267
      webm_dash_manifest_cues_end: 4005545
      webm_dash_manifest_bandwidth: 456687
      webm_dash_manifest_cluster_keyframe: 1
      webm_dash_manifest_cue_timestamps: 81373
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
No more output streams to write to, finishing.
frame=    0 fps=0.0 q=-1.0 Lsize=       1kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
Input file #0 (video_320x180_500k.webm):
  Input stream #0:0 (video): 0 packets read (0 bytes);
  Total: 0 packets (0 bytes) demuxed
Output file #0 (manifest.mpd):
  Output stream #0:0 (video): 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 @ 0x3de8180] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x3dcb0a0] Statistics: 452000 bytes read, 18 seeks


Thank you.


More information about the ffmpeg-user mailing list