Opened 3 years ago
Last modified 3 years ago
#9531 new defect
Unexpected ghosting around a transparent video encoded with hevc_videotoolbox
Reported by: | Chris Patuzzo | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | hevc hevc_videotoolbox apple transparent alpha |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
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.
Build information:
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
Many thanks
Attachments (10)
Change History (12)
by , 3 years ago
Attachment: | black_particles.webm added |
---|
by , 3 years ago
Attachment: | blue_particles.webm added |
---|
by , 3 years ago
Attachment: | black_particles.mov added |
---|
by , 3 years ago
Attachment: | blue_particles.mov added |
---|
by , 3 years ago
Attachment: | ffmpeg-20211125-101242.log added |
---|
by , 3 years ago
Attachment: | ffmpeg-20211125-101252.log added |
---|
by , 3 years ago
Attachment: | black_particle_screenshot_correct.png added |
---|
by , 3 years ago
Attachment: | blue_particle_screenshot_incorrect.png added |
---|
by , 3 years ago
Attachment: | original_black_sample_frame.png added |
---|
by , 3 years ago
Attachment: | mapped_blue_sample_frame.png added |
---|
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Encoding of alpha with hevc is very beta since it is supported only with hevc_videotoolbox.
Minor note: When attaching videos to the ticket, I changed -alpha_quality from 1 to 0.25 so that the transcoded videos would fit within the 2.5MB upload limit.