[FFmpeg-trac] #7965(avcodec:open): Support for HEVC with Alpha
FFmpeg
trac at avcodec.org
Thu Dec 26 17:11:53 EET 2024
#7965: Support for HEVC with Alpha
-------------------------------------+-----------------------------------
Reporter: leemartin | Owner: (none)
Type: enhancement | Status: open
Priority: wish | Component: avcodec
Version: git-master | Resolution:
Keywords: hevc | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-----------------------------------
Comment (by Igor):
I noticed a recent commit that adds (some) support for packaging HEVC with
alpha layer.
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/17e4746687abc53f0a042620a7af6dd6cea44b80
However, I still cannot get a video that works. I am trying the following
{{{
ffmpeg -vcodec libvpx-vp9 -i input.webm -c:v libx265 -x265-params
"alpha=1" output.mp4
}}}
Output
{{{
Input #0, matroska,webm, from 'input.webm':
Metadata:
encoder : libwebm-0.3.0.0
creation_time : 2023-11-29T12:59:06.000000Z
Duration: 00:00:03.00, start: 0.000000, bitrate: 4790 kb/s
Stream #0:0(eng): Video: vp9 (libvpx-vp9) (Profile 0), yuva420p(tv),
1200x1638, SAR 1:1 DAR 200:273, 30 fps, 30 tbr, 1k tbn (default)
Metadata:
alpha_mode : 1
[libvpx-vp9 @ 0x5591173d7000] v1.9.0
Stream mapping:
Stream #0:0 -> #0:0 (vp9 (libvpx-vp9) -> hevc (libx265))
Press [q] to stop, [?] for help
[libvpx-vp9 @ 0x5591173d7000] v1.9.0
x265 [info]: HEVC encoder version 4.1+54-fa2770934
x265 [info]: build info [Linux][GCC 10.2.1][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX
FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 12 threads
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 3 / wpp(26 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias : 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: b-intra strong-intra-smoothing lslices=8 deblock sao
alpha
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf61.9.101
Stream #0:0(eng): Video: hevc (hev1 / 0x31766568), yuva420p(tv,
progressive), 1200x1638 [SAR 1:1 DAR 200:273], q=2-31, 30 fps, 15360 tbn
(default)
Metadata:
encoder : Lavc61.28.100 libx265
alpha_mode : 1
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
}}}
Funny that `ffmpeg` understands that the output should be in `yuva420p`
but the resulting file isn't recognized by Safari or QuickTime on Mac, but
plays on Windows without transparency (though like the input file).
`ffprobe` does not recognize alpha layer (I guess when it says
`Scalability type 2 not supported`)
{{{
[hevc @ 0x56075b908c40] Scalability type 2 not supported
[hevc @ 0x56075b908c40] Ignoring unsupported VPS extension
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf61.9.101
Duration: 00:00:03.00, start: 0.000000, bitrate: 854 kb/s
Stream #0:0[0x1](eng): Video: hevc (Main) (hev1 / 0x31766568),
yuv420p(tv, progressive), 1200x1638 [SAR 1:1 DAR 200:273], 842 kb/s, 30
fps, 30 tbr, 15360 tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc61.28.100 libx265
[hevc @ 0x56075b925b40] Scalability type 2 not supported
[hevc @ 0x56075b925b40] Ignoring unsupported VPS extension
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7965#comment:15>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list