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 787328 - Video playback is pink
Video playback is pink
Status: RESOLVED NOTGNOME
Product: clutter-gst
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: clutter-gst-maint
clutter-gst-maint
: 787550 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-05 19:43 UTC by Jan-Michael Brummer
Modified: 2017-09-11 17:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Totem playing apple movie trailer in pink (1.83 MB, image/jpeg)
2017-09-05 19:43 UTC, Jan-Michael Brummer
Details

Description Jan-Michael Brummer 2017-09-05 19:43:18 UTC
Created attachment 359233 [details]
Totem playing apple movie trailer in pink

Starting within this development circle totem now plays videos with a pink color tone (see attached screenshot). It does not occur when playing with gst-launch on cli:

gst-launch-1.0 playbin uri=file:///video-file-location video-sink=autovideosink audio-sink=autoaudiosink

The issue is location and format independent.

Totem 3.25.90.1 running on Wayland with a Intel HD 5300.
Comment 1 Bastien Nocera 2017-09-06 08:43:39 UTC
Which version of gnome-shell and mutter do you have? Please check that you have the very latest versions.

(It's not a totem bug, no code has changed in that area for absolutely ages)
Comment 2 Jan-Michael Brummer 2017-09-06 18:56:58 UTC
Name         : gnome-shell
Version      : 3.25.91
Release      : 1.fc28

Name         : mutter
Version      : 3.25.91
Release      : 2.fc28
Comment 3 Baptiste Mille-Mathias 2017-09-06 19:35:23 UTC
Same problem here when I switched from f26 to f27.

clutter-gst2-2.0.18-4.fc27.x86_64
clutter-gst3-3.0.24-3.fc27.x86_64
gstreamer1-1.12.2-3.fc27.x86_64
gstreamer1-libav-1.12.2-1.fc27.x86_64
gstreamer1-plugin-openh264-1.10.4-1.fc27.x86_64
gstreamer1-plugins-bad-free-1.12.2-5.fc27.x86_64
gstreamer1-plugins-bad-free-gtk-1.12.2-5.fc27.x86_64
gstreamer1-plugins-base-1.12.2-3.fc27.x86_64
gstreamer1-plugins-good-1.12.2-3.fc27.x86_64
gstreamer1-plugins-ugly-free-1.12.2-3.fc27.x86_64
PackageKit-gstreamer-plugin-1.1.6-7.fc27.x86_64

gst-launch-1.0 works fine as reporter
Comment 4 Bastien Nocera 2017-09-06 19:37:31 UTC
Does Cheese show the same problem?
Comment 5 Jan-Michael Brummer 2017-09-06 19:38:54 UTC
Had a quick look at totem source code, it is using the cluttersink for video output. Using this as sink on the cli also results in the pink image. So i guess it needs to be moved to gstreamer cluttersink...
Comment 6 Jan-Michael Brummer 2017-09-06 19:39:53 UTC
...unless totem will switch to autovideosink....
Comment 7 Bastien Nocera 2017-09-06 21:30:57 UTC
(In reply to Jan-Michael Brummer from comment #6)
> ...unless totem will switch to autovideosink....

That's just a wrapper around various videosinks, and it doesn't support all the features we use from cluttervideosink.
Comment 8 Emmanuele Bassi (:ebassi) 2017-09-06 21:50:01 UTC
Usually, a pink hue from GL rendering means that something is parsing floating point values in shaders using a locale-dependent function, in a locale where the decimal separator is not '.'.

As far as I know, it hasn't been the case for any of the libraries involved for at least 5 years, but you never know.

What happens if you run Totem with `LANG=en_US.UTF-8`, or any other English locale?
Comment 9 Emmanuele Bassi (:ebassi) 2017-09-06 21:51:32 UTC
Alternatively, this is a texture swizzling issue, and the red and blue channels are getting flipped. Are you sure Totem is being used with the Wayland backend?
Comment 10 Bastien Nocera 2017-09-06 22:23:25 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #8)
> Usually, a pink hue from GL rendering means that something is parsing
> floating point values in shaders using a locale-dependent function, in a
> locale where the decimal separator is not '.'.
> 
> As far as I know, it hasn't been the case for any of the libraries involved
> for at least 5 years, but you never know.
> 
> What happens if you run Totem with `LANG=en_US.UTF-8`, or any other English
> locale?

I can reproduce by setting LC_ALL=fr_FR.UTF-8

(In reply to Emmanuele Bassi (:ebassi) from comment #9)
> Alternatively, this is a texture swizzling issue, and the red and blue
> channels are getting flipped. Are you sure Totem is being used with the
> Wayland backend?

I'm using Wayland, and was the one that cherry-picked the swizzle fix to put on top of mutter 3.25.91.

Seems to be that parsing problem you mentioned above.
Comment 11 Jan-Michael Brummer 2017-09-08 19:36:24 UTC
For the record: I'm using using de_DE locale on my system. Replacing it with en_GB fixes the issue.

Where do we have to look for the bug? Which component?
Comment 12 Bastien Nocera 2017-09-11 13:32:30 UTC
(In reply to Jan-Michael Brummer from comment #11)
> For the record: I'm using using de_DE locale on my system. Replacing it with
> en_GB fixes the issue.
> 
> Where do we have to look for the bug? Which component?

Could reasonably be:
- mutter
- mesa
- clutter-gst
Comment 13 corrado venturini 2017-09-11 14:18:47 UTC
I have the same problem https://bugs.launchpad.net/ubuntu/+source/gstreamer1.0/+bug/1716250 both with x11 and with Wayland, changing my locale from Italia (decimal separator is comma) to United states (decimal separator is dot) solved the problem.
Comment 14 Ray Strode [halfline] 2017-09-11 14:38:37 UTC
might be from xlocale.h getting dropped by default from glibc, so mesa doesn't setlocale now ?

see

https://bugs.freedesktop.org/show_bug.cgi?id=102454
Comment 15 Bastien Nocera 2017-09-11 15:38:44 UTC
*** Bug 787550 has been marked as a duplicate of this bug. ***
Comment 16 Ray Strode [halfline] 2017-09-11 17:07:55 UTC
can someone on fedora who's seeing this try:

https://bodhi.fedoraproject.org/updates/FEDORA-2017-601887be61

?
Comment 17 Bastien Nocera 2017-09-11 17:16:20 UTC
Yep, that fixes it.

I'll close this as NOTGNOME. If you still have problems after updating the packages, please file a new bug. If you don't use Fedora, please ask your distribution to pick up those changes and open a new bug if that doesn't fix it.

Thanks Ray for catching this!