Opened 2 years ago

Last modified 23 months ago

#8344 new enhancement

ffprobe does not recognize yuva420p format (alpha channel) for webm

Reported by: Jelle Haandrikman Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: alpha vp8 vp9
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: ffprobe does not recognize the alpha channel. Even when I encode a webm file from png files with alpha channel using ffmpeg.

How to reproduce:

ffmpeg -i inside_the_box_%04d.png -r 30  inside_the_box.webm                     
ffprobe inside_the_box.webm

The output from ffmpeg shows:

[libvpx-vp9 @ 0x55ecc6b67f80] v1.8.1
Output #0, webm, to 'inside_the_box.webm':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: vp9 (libvpx-vp9), yuva420p, 1080x1920, q=-1--1, 200 kb/s, 30 fps, 1k tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.35.100 libvpx-vp9
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1

When I check the output file, the alpha channel is not recognised. It recognises the stream as yuv420p and not as yuva420p.

Input #0, matroska,webm, from 'inside_the_box.webm':
  Metadata:
    ENCODER         : Lavf58.20.100
  Duration: 00:00:30.07, start: 0.000000, bitrate: 95 kb/s
    Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv), 1080x1920, SAR 1:1 DAR 9:16, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      alpha_mode      : 1
      ENCODER         : Lavc58.35.100 libvpx-vp9
      DURATION        : 00:00:30.066000000

This makes creating and displaying a video with alpha transparency hard to accomplish.

Ffplay also has the same issue.

If I check the file using Firefox and Chrome the alpha channel is included in the .webm file.
Also when playing the file using mpv --vd=libvpx-vp9 --alpha=yes inside_the_box.webm The alpha channel is shown on the display.

Tested on Debian-testing with ffmpeg: 4.1.4-1+b3 amd64

Change History (3)

comment:1 by Jelle Haandrikman, 2 years ago

Summary: ffprobe does not recognize yava420p format (alpha channel) for webmffprobe does not recognize yuva420p format (alpha channel) for webm

comment:2 by Gyan, 2 years ago

The native VP8/9 decoders don't decode alpha but libvpx does, and ffprobe uses native decoders for a stream when available. At present, there's no facility to force a specific decoder for streams.

comment:3 by Carl Eugen Hoyos, 23 months ago

Component: ffprobeavcodec
Keywords: vp8 vp9 added; channel removed
Priority: normalwish
Type: defectenhancement
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.