Tuesday 19 June 2012

Fixing Blue Tint Video (Linux Mint 13 and Ubuntu 12.04)

Open 'gstreamer-properties' by typing into a terminal...  
$ gstreamer-properties 
 Click on the 'Video' tab. Under 'Default Output' choose the 'Plugin' dropdown and select 'Custom'. Add the following line to the 'Pipeline' box. 
videobalance hue=-1 ! autovideosink
 If that doesn't work, it might be worth turning off  'Xv optimizations'. Under the same tab choose... 
X Window System (No Xv)  
 If this method doesn't work... try the following here.

I have also found the following methods to be useful...

1. Patch libvdpau.

Install patched libvdpau: 
sudo add-apt-repository ppa:tikhonov/misc
sudo apt-get update
sudo apt-get install libvdpau1 
 Or simply modify Flash Player's library:   
cd /usr/lib/adobe-flashplugin/
sudo perl -pi.bak -e 's/libvdpau/lixvdpau/g' libflashplayer.so     
 2. Enable Flash Player hardware video decoding.

Most users have reported that this leads to very frequent crashes of Flash Player (probably due to concurrency issues in decoding) but if you're feeling lucky, give it a try.

This is also the same method used by Flash-Aid addon. It won't make it any better. 
Run: sudo mkdir /etc/adobe
 echo -e "EnableLinuxHWVideoDecode=1" | sudo tee /etc/adobe/mms.cfg > /dev/null 
 This will create the /etc/adobe/mms.cfg file with EnableLinuxHWVideoDecode=1 content. This is the only way how to actually force Flash Player to decode video on GPU and it's not officially supported by Adobe.

To undo this, run:
sudo rm /etc/adobe/mms.cfg 
 to remove the mms.cfg file.

You can try to further improve Flash Player's stability with VDPAU_NVIDIA_NO_OVERLAY=1 environment variable, see Nvidia forums.  

3. Install patched libvdpau (proper patch).

Stephen Warren has created nice patch for libvdpau, which detects Flash Player and applies workarounds only for it. The patch can be controlled using /etc/vdpau_wrapper.cfg file.

Patched libvdpau fixes colours and allows Flash Player to use VDPAU for hardware overlay which still provides some performance benefits.

For Precise (12.04) and Oneiric (11.10) you can install the patched libvdapu from Maxim Thikonov's PPA using the following commands: 
sudo add-apt-repository ppa:tikhonov/misc
sudo apt-get update
sudo apt-get install libvdpau1 
 The change should come into effect after reboot (or possibly sooner).  

4. Prevent Flash Player from finding libvdpau (Via Daniel Mario Vega on Launchpad)

Run the following commands (given you have adobe-flashplugin package installed):
cd /usr/lib/adobe-flashplugin/
sudo perl -pi.bak -e 's/libvdpau/lixvdpau/g' libflashplayer.so 
 The changes take effect after starting the browser.

This will modify Flash Player's binary to search for non-existent "lixvdpau" library instead of "libvdpau". Therefore it won't attempt to use VDPAU presentation at all.

The command creates libflashplayer.so.bak backup of the binary in case you run into any problems.

You need to run this command every time there's a Flash Player update since your change will be overwritten.

With this workaround you can keep HW acceleration on, have libvdpau1 installed and it's very easy to apply compared to patching libvdpau.

5. Disable Flash Player's Hardware Acceleration

The easiest and the least intrusive fix is to disable Flash Player's HW acceleration in Display settings – right click on Flash, select Settings…

This, however, is not that easy since the Settings window is unresponsive under composite manager (Compiz, standard Unity) and if the browser shows scrollbars.

To disable Hardware acceleration open any video (e.g. on YouTube) in fullscreen and then open the Settings… window. Or you an temporarily switch to Unity 2D or other non-composite WM.

The change takes effect after refresh.

The drawback: this disables HW acceleration in Flash Player even for vector and bitmap operations. Some Flash games and movies may have worse performance and/or worse graphics.  

6. Replace Flash players (As recommended by bowser on Launchpad)

Use FlashVideoReplacer Firefox add-on, Literna Mágica or other solution to replace standard players in Flash with embedded video player plugin (like Totem – totem-mozilla – or VLC – mozilla-plugin-vlc). No Flash Player, no problem.

No comments:

Post a Comment