After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 629808 - Transparency / alpha channel for PNG or SVG images won't work unless you set the clip opacity to less than 100 percent
Transparency / alpha channel for PNG or SVG images won't work unless you set ...
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: General
Git
Other Linux
: Normal normal
: 0.91
Assigned To: Pitivi maintainers
Pitivi maintainers
: 634951 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-09-16 00:17 UTC by Jean-François Fortin Tam
Modified: 2013-09-30 19:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
CBC logo (106.85 KB, image/png)
2010-09-16 03:28 UTC, Jean-François Fortin Tam
Details
screenshots (320.00 KB, application/x-tar)
2010-09-16 03:45 UTC, Jean-François Fortin Tam
Details

Description Jean-François Fortin Tam 2010-09-16 00:17:51 UTC
Transparent images are not transparent.
Comment 1 Jean-François Fortin Tam 2010-09-16 03:28:28 UTC
Created attachment 170390 [details]
CBC logo

Actually, this is quite interesting:
- the PNG transparency works in thiblahute's effects branch
- it doesn't work in master

Here's a sample transparent PNG file to test.
Comment 2 kxra 2010-09-16 03:43:13 UTC
It's working for me using the PPA version
Comment 3 Jean-François Fortin Tam 2010-09-16 03:45:13 UTC
Created attachment 170391 [details]
screenshots

Yay for heisenbugs. In pitivi git master, this sometimes happens, sometimes not, and here's two screenshots (fail/pass).
Comment 4 unixgamerocker 2010-09-16 18:51:44 UTC
Same thing happens here:

Not transparent: http://img168.imageshack.us/img168/3835/nottrans.png
Is transparent:  http://img695.imageshack.us/img695/9585/istrans.png

Steps to reproduce:
1. Import video and png file (any order).
2. Position png over image.
3. seek to spot during png or render.

Steps to workaround:
1. Change alpha (that is, mess with the red level bar) for *any* video track.
2. Re-seek to verify.

The workaround should not be necessary once this bug is fixed.

The workaround will trigger another bug where gstreamer crashes (on my machine anyway) and a few extra timeline seeks/clicks are necessary to get it to wake up but that's outside of the scope of this bug and I'll file another.
Comment 5 Alessandro Decina 2010-09-17 14:06:17 UTC
commit 5289ebd332277160bdb44a24debe58c7ada3d5fd
Author: Volker Sobek <reklov@live.com>
Date:   Thu Sep 16 16:33:37 2010 +0200

    Fix wrong positions of keyframe value labels
    
    Fixes #629811
Comment 6 Alessandro Decina 2010-09-17 14:09:38 UTC
oops, wrong tab :)
Comment 7 bens 2010-11-17 01:15:08 UTC
*** Bug 634951 has been marked as a duplicate of this bug. ***
Comment 8 bens 2010-11-17 01:19:14 UTC
I'm seeing this failure pretty reliably with the transparent .mkv movie in attachment 174536 [details], as documented in #634951 (dupe).  Preview is usually wrong (unless I wiggle the alpha slider, as suggested here), and render is always wrong.  In contrast, when working with PNGs things mostly seem to behave correctly (so I must be on the lucky side of that race).
Comment 9 Jean-François Fortin Tam 2010-12-15 18:05:54 UTC
Actually, this might be because we operate in "passthrough" when the clip's alpha is 100% (to not destroy performance)
Comment 10 Jean-Philippe Fleury 2010-12-22 07:32:09 UTC
I have this bug on 0.13.5, both with the previewer and with the rendering.
Comment 11 Jean-Philippe Fleury 2010-12-22 07:35:55 UTC
Is this report a duplicate of bug 611749 ?
Comment 12 kxra 2011-03-10 05:47:07 UTC
Not sure if this is new, but the render button seems to reset gstreamer. This means that the work around doesn't work if you adjusted the alpha levels as suggested in Comment #4 and then moved them back to 100% after gstreamer restarted. 

In order for this to work, there must be a part of the clip that is not set to 100% at the time of rendering. Either adjusting alpha level for the entire clip, or having it fade out or in. Either way, leads to Bug 644372
Comment 13 kxra 2011-05-10 00:56:17 UTC
Using Ogg Theora as format for the input file (on the bottom layer, at least!) gets around this and 644372 entirely!
Comment 14 Jean-François Fortin Tam 2011-05-24 01:31:08 UTC
Okay, tested again on pitivi git (since many things changed). Everything works *if* you set the clip's opacity curve to something else than 100%, because it will operate in passthrough mode otherwise.

Maybe there would be a way to detect if the source media (ex: the PNG image) has a built-in alpha channel and not use passthrough in those cases... but then maybe there are some video or image formats that always say they have an alpha channel?

Retitling for clarity.
Comment 15 bens 2011-07-06 15:21:12 UTC
If the video or image format advertises an alpha channel it should be honored.  Better to be correct and slow than wrong and fast.

In the special case of still images it might be worthwhile to detect if the alpha channel is fully opaque, but at the moment this would be a premature optimization.
Comment 16 Jean-François Fortin Tam 2011-09-16 16:22:46 UTC
From what I've been told, GES will handle that automatically, so retargetting.
Comment 17 Jean-François Fortin Tam 2013-09-30 19:17:17 UTC
This *should* be fixed now, please reopen if it isn't.