Activity log for bug #1650372

Date Who What changed Old value New value Message
2016-12-15 20:26:40 Kam bug added bug
2016-12-15 20:26:40 Kam attachment added Source PNG sequence with alpha channel (see step 2) https://bugs.launchpad.net/bugs/1650372/+attachment/4792152/+files/AlphaChannelPNG.zip
2016-12-15 20:32:44 Kam attachment added AC.mov from step 2. A VP9 video with alpha channel in YUVA420 https://bugs.launchpad.net/panda3d/+bug/1650372/+attachment/4792153/+files/AC.mov
2016-12-15 20:33:56 Kam description Panda3D version: 1.10.0pre (git 34068dc) OS: Windows 7 64bit According to https://github.com/panda3d/panda3d/blob/master/panda/src/ffmpeg/ffmpegVideoCursor.cxx#L518 , Panda3D supports only RGB format decoded on the CPU by FFmpeg for MovieTextures. Movies with an alpha channel (e. g. RGBA format) are not supported yet. A workaround to this issue could be to use a second movie that is greyscale and combine it via TextureStage.setMode, however, this would mean that 2x RGB data is sent from the CPU to the graphics card. In order to allow an adequate and straightforward way to support videos with alpha channel, RGBA needs to be implemented. Additionally, to save further bandwidth on the PCI express bus and allow higher resoulution video streams and/or more simultanious playing MovieTextures, other formats such as YUV420 and YUVA420 could be implemented to be sent out to the graphics card. Implementing retaining the source format and sending that to the graphics card could allow resolving the alpha channel issue together. Reproduction: 1. Compile Panda3D with a recent FFmpeg build with libvpx (a recent build from https://ffmpeg.zeranoe.com/builds/ works) 2. Download the attached AlphaChannelPNG.zip and convert it to a video file with alpha channel. E. g.: ffmpeg -framerate 25 -i AlphaChannel%03d.png -c:v libvpx-vp9 -b:v 2000k -pix_fmt yuva420p AC.webm 3. rename AC.webm to AC.mov, so that Panda regocnizes the file being a video. 4. run pview with the video file, e. g.: pview AC.mov Expected: You'll see a red box floating around in front of the grey background. Issue: You'll see the red box in front of a black background. The are that is rendered black is transparent in the video file. For comparison you could run pview with one of the source PNG files. Panda3D version: 1.10.0pre (git 34068dc) OS: Windows 7 64bit According to https://github.com/panda3d/panda3d/blob/master/panda/src/ffmpeg/ffmpegVideoCursor.cxx#L518 , Panda3D supports only RGB format decoded on the CPU by FFmpeg for MovieTextures. Movies with an alpha channel (e. g. RGBA format) are not supported yet. A workaround to this issue could be to use a second movie that is greyscale and combine it via TextureStage.setMode, however, this would mean that 2x RGB data is sent from the CPU to the graphics card. In order to allow an adequate and straightforward way to support videos with alpha channel, RGBA needs to be implemented. Additionally, to save further bandwidth on the PCI express bus and allow higher resoulution video streams and/or more simultanious playing MovieTextures, other formats such as YUV420 and YUVA420 could be implemented to be sent out to the graphics card. Implementing retaining the source format and sending that to the graphics card could allow resolving the alpha channel issue together. Reproduction: 1. Compile Panda3D with a recent FFmpeg build with libvpx (a recent build from https://ffmpeg.zeranoe.com/builds/ works) 2. Download the attached AlphaChannelPNG.zip and convert it to a video file with alpha channel. E. g.: ffmpeg -framerate 25 -i AlphaChannel%03d.png -c:v libvpx-vp9 -b:v 2000k -pix_fmt yuva420p AC.webm 3. rename AC.webm to AC.mov, so that Panda regocnizes the file being a video. 4. run pview with the video file, e. g.: pview AC.mov Expected: You'll see a red box floating around in front of the grey background. Issue: You'll see the red box in front of a black background. The area that is rendered black is transparent in the video file. For comparison you could run pview with one of the source PNG files.
2019-01-10 11:57:19 rdb panda3d: milestone 1.10.0
2019-01-10 11:57:53 rdb panda3d: status New Fix Committed
2019-01-10 11:58:26 rdb panda3d: status Fix Committed Fix Released