Unexpected ghosting around a transparent video encoded with hevc_videotoolbox
|Reported by:||Chris Patuzzo||Owned by:|
|Version:||git-master||Keywords:||hevc hevc_videotoolbox apple transparent alpha|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Summary of the bug:
I am trying to convert two transparent videos from VP9 to HEVC so that I can play them in Safari. They are both videos of some particle effects. The first video that contains black pixels transcodes correctly. The second video that contains blue pixels transcodes incorrectly. The alpha values around the edges of the particles seems to be incorrect creating a ghosting effect.
The video with blue particles was generated from the one with black particles. I did this by mapping over each of the PNG files that were used to create the videos and re-mapping the color from black to blue. I believe I did this correctly. I can have attached one sample PNG of blue and black to this ticket.
How to reproduce:
This transcode produces the correct result:
ffmpeg -c:v libvpx-vp9 -i black_particles.webm -c:v hevc_videotoolbox -alpha_quality 1 -vtag hvc1 black_particles.mov
This transcode produces an incorrect result:
ffmpeg -c:v libvpx-vp9 -i blue_particles.webm -c:v hevc_videotoolbox -alpha_quality 1 -vtag hvc1 blue_particles.mov
I have attached the '-report -v 9 -loglevel 99' output for both transcodes as well as the input/output videos and screenshots that show the correct and incorrect ghosting in Apple's video preview.
I built ffmpeg yesterday from the master branch, commit 7e9e2cf93b6e22eaec72837ab59ac654c19b8d99. I used these parameters:
./configure --enable-libfdk-aac --enable-libvpx --enable-libvorbis --enable-libx265 --enable-libx264 --enable-gpl --enable-nonfree