Opened 17 months ago

Last modified 5 months ago

#9999 new defect

Failure to create webm manifest for single key-frame video

Reported by: jlenart Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: webm
Cc: jlenart Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by jlenart)

Summary of the bug:

I have encountered a possible bug in ffmpeg 5.1.2 (also tested on 5.1). In the event an output video has only a single key-frame, attempting to generate the DASH manifest will fail, resulting in the error message:

Error parsing Cues
output.webm: Invalid data found when processing input

If multiple key-frames are present, (in the reproduction steps replace -to 5 with -to 6), the manifest is created without issue.

How to reproduce:

$ ffmpeg -y -f lavfi -i testsrc -c:v libvpx-vp9 -an -to 5 -f webm -dash 1 output.webm
$ ffmpeg -y -f webm_dash_manifest -i output.webm -c copy -map 0 -f webm_dash_manifest -adaptation_sets "id=0,streams=0" result.mpd

ffmpeg version: 5.1.2 (and 5.1)
libvpx version: 1.12

Change History (4)

comment:1 by jlenart, 17 months ago

Description: modified (diff)

comment:2 by Carl Eugen Hoyos, 17 months ago

Component: ffmpegundetermined

Please test current FFmpeg git head and provide the command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:3 by Tom Boshoven, 17 months ago

I built ffmpeg from master and ran the commands (with additional verbosity) in the ticket.
The issue can still be reproduced.

First command:

./ffmpeg/ffmpeg -y -v verbose -f lavfi -i testsrc -c:v libvpx-vp9 -an -to 5 -f webm -dash 1 output.webm
ffmpeg version N-108912-g2537fdc510 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (GCC)
  configuration: --enable-libvpx --disable-doc
  libavutil      57. 40.100 / 57. 40.100
  libavcodec     59. 51.101 / 59. 51.101
  libavformat    59. 34.101 / 59. 34.101
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 49.101 /  8. 49.101
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
[Parsed_testsrc_0 @ 0x55ba67e5fbc0] size:320x240 rate:25/1 duration:-1.000000 sar:1/1
Input #0, lavfi, from 'testsrc':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: wrapped_avframe, 1 reference frame, rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 25 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> vp9 (libvpx-vp9))
Press [q] to stop, [?] for help
[graph 0 input from stream 0:0 @ 0x55ba67e69600] w:320 h:240 pixfmt:rgb24 tb:1/25 fr:25/1 sar:1/1
[auto_scale_0 @ 0x55ba67e6d740] w:iw h:ih flags:'' interl:0
[format @ 0x55ba67e6a700] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scale_0 @ 0x55ba67e6d740] w:320 h:240 fmt:rgb24 sar:1/1 -> w:320 h:240 fmt:gbrp sar:1/1 flags:0x0
[libvpx-vp9 @ 0x55ba67e65200] v1.12.0
[libvpx-vp9 @ 0x55ba67e65200] --prefix=/usr --disable-install-docs --disable-install-srcs --enable-pic --enable-postproc --enable-runtime-cpu-detect --enable-shared --enable-vp8 --enable-vp9 --enable-vp9-highbitdepth --enable-vp9-temporal-denoising
[libvpx-vp9 @ 0x55ba67e65200] Neither bitrate nor constrained quality specified, using default CRF of 32
Output #0, webm, to 'output.webm':
  Metadata:
    encoder         : Lavf59.34.101
  Stream #0:0: Video: vp9, 1 reference frame, gbrp(pc, gbr/unknown/unknown, progressive), 320x240 (0x0) [SAR 1:1 DAR 4:3], q=2-31, 25 fps, 1k tbn
    Metadata:
      encoder         : Lavc59.51.101 libvpx-vp9
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Automatically inserted bitstream filter 'vp9_superframe'; args=''itrate=  -0.0kbits/s speed=N/A    
No more output streams to write to, finishing.e=00:00:03.32 bitrate=   1.2kbits/s speed=3.28x    
All streams finished for output file #0
Terminating muxer thread 0
[AVIOContext @ 0x55ba67e65980] Statistics: 36929 bytes written, 0 seeks, 1 writeouts
frame=  125 fps= 86 q=27.0 Lsize=      36kB time=00:00:04.96 bitrate=  59.6kbits/s speed= 3.4x    
video:35kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.905349%
Input file #0 (testsrc):
  Input stream #0:0 (video): 126 packets read (60480 bytes); 126 frames decoded; 
  Total: 126 packets (60480 bytes) demuxed
Output file #0 (output.webm):
  Output stream #0:0 (video): 125 frames encoded; 125 packets muxed (35541 bytes); 
  Total: 125 packets (35541 bytes) muxed
Terminating demuxer thread 0

Second command:

./ffmpeg/ffmpeg -y -v verbose -f webm_dash_manifest -i output.webm -c copy -map 0 -f webm_dash_manifest -adaptation_sets "id=0,streams=0" result.mpd
ffmpeg version N-108912-g2537fdc510 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (GCC)
  configuration: --enable-libvpx --disable-doc
  libavutil      57. 40.100 / 57. 40.100
  libavcodec     59. 51.101 / 59. 51.101
  libavformat    59. 34.101 / 59. 34.101
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 49.101 /  8. 49.101
  libswscale      6.  8.112 /  6.  8.112
  libswresample   4.  9.100 /  4.  9.100
[webm_dash_manifest @ 0x55e37720a640] Error parsing Cues
[AVIOContext @ 0x55e3772132c0] Statistics: 36951 bytes read, 3 seeks
output.webm: Invalid data found when processing input

comment:4 by Kerry Shetline, 5 months ago

I've run into the same error. I'm trying to create a manifest for three VP9/webm video files generated by Handbrake, and one Vorbis/webm audio file generated by ffmpeg.

I've done this before without a problem, but only for a couple of other movies. For some reason one movie is now giving me this "Error parsing Cues" grief. I'm running an automated process to enable streaming for a large collection of movies, but I've only processed a couple of other movies successfully before hitting this glitch, so perhaps it will come up often.

I only mention that it's an automated process to say that the other movies which worked were converted from H.264 to VP9 in exactly the same way, without any subsequent problems.

I've posted a sample video that fails here: https://shetline.com/video/sample.v480.webm (my apologies that there's nothing but a black screen for about 3.5 minutes while music that's not included would be playing).

The video plays without a problem, mediainfo works with it without a problem, but it fails using ffmpeg or ffprobe.

I'm using version 2023-08-28-git-b5273c619d-full_build-www.gyan.dev.

Last edited 5 months ago by Kerry Shetline (previous) (diff)
Note: See TracTickets for help on using tickets.