Install MPlayer With VA-API (Hardware Acceleration For Intel / AMD GPUs) Support In Ubuntu

VA-API is an open source library/API which enables hardware accelerated video processing. It uses the GPU to accelerate video processing in order to offload the CPU.

Supported hardware includes Intel HD Graphics and G45 chipsets and newer as well as AMD Radeon GPUs (there’s also a Nvidia VDPAU backend for VA-API). You can find a list of supported hardware, drivers and video codecs HERE.
Here’s an example: on my laptop, the CPU usage is around 40-50% when watching an 1080p H.264 video using MPlayer without VA-API and around 2-5% when watching the same 1080p video using MPlayer with VA-API. You can see some screenshots below:
mplayer without vaapiCPU usage: MPlayer without VA-API
mplayer vaapiCPU usage: MPlayer with VA-API

Install Intel / AMD VA-API drivers in Ubuntu
Before installing MPlayer with VA-API support, install the VA-API drivers:

– for Intel GPUs (for Intel HD Graphics as well as G45 and later):
sudo apt-get install i965-va-driver
– for AMD Radeon GPUs (you also need the proprietary drivers!):
sudo apt-get install xvba-va-driver
The Intel VA-API driver is available in the official Ubuntu 12.04 Precise Pangolin (and newer) repositories. For Ubuntu 11.10 Oneiric Ocelot, you’ll find a package in the MPlayer VAAPI PPA (see below).
Nvidia users: MPlayer supports VDPAU by default so everything you need for hardware accelerated video decoding is already in the repositories. See THIS old post for more info (unless something has changed, but I can’t test it since I have Nvidia Optimus and Bumblebee doesn’t support VDPAU). You can also use the “vdpau-va-driver” driver which is a VDPAU-based backend for VA-API and follow use the instructions below to install Mplayer with VA-API.

Install MPlayer with VA-API support in Ubuntu
By default, the MPlayer version available in the official Ubuntu repositories doesn’t support VA-API, but you can use a PPA which provides custom MPlayer builds with VA-API support.
To install MPlayer with VA-API support in Ubuntu 12.10, 12.04 or 11.10, use the following commands:
sudo add-apt-repository ppa:sander-vangrieken/vaapi
sudo apt-get update
sudo apt-get install mplayer-vaapi
Once installed, open SMPlayer (or whatever MPlayer GUI you’re using: Gnome Mplayer, KMPlayer, etc.) and in its Preferences, on the Video tab (in SMPlayer: General Video > Output driver) set the video output driver to “vaapi”:
SMPlayer vaapi
That’s it!

Other Linux distributions:
Arch Linux users can install MPlayer with VA-API support from the community repository.The mplayer-vaapi source can be downloaded via gitorious.org
Note: I’ve tested this on an Intel GPU only!

via Ubuntu.ru wiki

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on Install MPlayer With VA-API (Hardware Acceleration For Intel / AMD GPUs) Support In Ubuntu

Install MPlayer With VA-API (Hardware Acceleration For Intel / AMD GPUs) Support In Ubuntu

VA-API is an open source library/API which enables hardware accelerated video processing. It uses the GPU to accelerate video processing in order to offload the CPU.

Supported hardware includes Intel HD Graphics and G45 chipsets and newer as well as AMD Radeon GPUs (there’s also a Nvidia VDPAU backend for VA-API). You can find a list of supported hardware, drivers and video codecs HERE.
Here’s an example: on my laptop, the CPU usage is around 40-50% when watching an 1080p H.264 video using MPlayer without VA-API and around 2-5% when watching the same 1080p video using MPlayer with VA-API. You can see some screenshots below:
mplayer without vaapiCPU usage: MPlayer without VA-API
mplayer vaapiCPU usage: MPlayer with VA-API

Install Intel / AMD VA-API drivers in Ubuntu
Before installing MPlayer with VA-API support, install the VA-API drivers:

– for Intel GPUs (for Intel HD Graphics as well as G45 and later):
sudo apt-get install i965-va-driver
– for AMD Radeon GPUs (you also need the proprietary drivers!):
sudo apt-get install xvba-va-driver
The Intel VA-API driver is available in the official Ubuntu 12.04 Precise Pangolin (and newer) repositories. For Ubuntu 11.10 Oneiric Ocelot, you’ll find a package in the MPlayer VAAPI PPA (see below).
Nvidia users: MPlayer supports VDPAU by default so everything you need for hardware accelerated video decoding is already in the repositories. See THIS old post for more info (unless something has changed, but I can’t test it since I have Nvidia Optimus and Bumblebee doesn’t support VDPAU). You can also use the “vdpau-va-driver” driver which is a VDPAU-based backend for VA-API and follow use the instructions below to install Mplayer with VA-API.

Install MPlayer with VA-API support in Ubuntu
By default, the MPlayer version available in the official Ubuntu repositories doesn’t support VA-API, but you can use a PPA which provides custom MPlayer builds with VA-API support.
To install MPlayer with VA-API support in Ubuntu 12.10, 12.04 or 11.10, use the following commands:
sudo add-apt-repository ppa:sander-vangrieken/vaapi
sudo apt-get update
sudo apt-get install mplayer-vaapi
Once installed, open SMPlayer (or whatever MPlayer GUI you’re using: Gnome Mplayer, KMPlayer, etc.) and in its Preferences, on the Video tab (in SMPlayer: General Video > Output driver) set the video output driver to “vaapi”:
SMPlayer vaapi
That’s it!

Other Linux distributions:
Arch Linux users can install MPlayer with VA-API support from the community repository.The mplayer-vaapi source can be downloaded via gitorious.org
Note: I’ve tested this on an Intel GPU only!

via Ubuntu.ru wiki

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on Install MPlayer With VA-API (Hardware Acceleration For Intel / AMD GPUs) Support In Ubuntu

Primus: Better Performance And Less Power Consumption For Bumblebee [Optimus Hybrid Graphics Chipsets]

Nvidia Optimus is a technology used to increases battery life by switching between two graphics adapters (a low-performance integrated Intel graphics adapter and a high-performance one by Nvidia) within a computer system. Optimus GPU switching is officially only supported on Windows, but it’s also unofficially available on Linux thanks to the Bumblebee project.
Primus brings better performance and less power consumption when using Bumblebee, by replacing VirtualGL. According to the Bumblebee G+ page, this has the following advantages over the optirun (VirtualGL) solution used by default in Bumblebee:Less overhead (better framerates) and cleaner solution (no networking or compression involved at all)Fixes the “bug” that causes Bumblebee to shut down the GPU too early sometimes (no more need for the “optirun bash” workaround)Less buggy/glitchy, easier to debugOnly uses/starts secondary GPU for OpenGL parts of applications – everything else remains on your main GPU (power savings)
The Bumblebee developers explain what Primus does and the difference between Primus / optirun in simple terms in a comment on their G+ page:

Bumblebee uses VirtualGL to copy the image generated by the second (faster) GPU to your display. VirtualGL was intended for use over a network though, so it takes a great many steps to enable this (compression, sending the image over a network link, decompression, etc).

Primus doesn’t perform all these “extra” steps, instead taking a more direct route (copying the rendered image in memory to the other GPU, then displaying there). In theory this should get you better performance as well as better compatibility. Running applications will “see” the OpenGL implementation of your real hardware, nothing virtual is presented to them.
For comparison, here are the framerates I get on my laptop when using the integrated Intel graphics, when using the Nvidia graphics card using optirun and using primusrun (this is just for FPS and not an indicator for the whole performance!):
glxspheres intel gpuIntegrated (Intel) graphics
glxspheres optirun bumblebeeoptirun (default in Bumblebee) using the Nvidia GPU
glxspheres primusrun bumblebeePrimus using the Nvidia GPU
As you can see, the FPS using

Category: Ubuntu | Comments Off on Primus: Better Performance And Less Power Consumption For Bumblebee [Optimus Hybrid Graphics Chipsets]

How To Use Netflix In Ubuntu Through Wine (PPA Available)

Netflix is finally working on Linux! No, there’s no native Linux Netflix application, but with a patched Wine build, you can now use Netflix under Linux.
netflix ubuntu

Thanks to a campaign by IHeartUbuntu to get Netflix running on Ubuntu and the work of Erich Hoover, Ubuntu users can now use Netflix through Wine (with some patches) and Microsoft Silverlight, all installable from a PPA.
For those who are not familiar with Netflix, this is an on-demand TV shows & movies streaming service available in USA, Canada, South America, UK, Ireland, Sweden, Danmark, Norway and Finland.

Install Netflix Desktop application (with patched Wine) in Ubuntu
netflix ubuntu
I like to test everything I post, but since Netflix is not available where I live, I was unable to test this. Hopefully it will work for you using the instructions below.
To add the PPA and install the patched WINE and everything required to use Netflix in Ubuntu Raring, Quantal, Precise or Oneiric, use the commands below:
sudo apt-add-repository ppa:ehoover/compholio
sudo apt-get update
sudo apt-get install netflix-desktop
The commands above will install a patched WINE which doesn’t overwrite your current Wine installation, along with a Netflix web app that automatically downloads and installs Firefox for Windows and Microsoft Silverlight. The Netflix app is available for both 32bit and 64bit while the patched Wine package is only available for 32bit, but it should work on 64bit thanks to Ubuntu’s multi-arch support.
If you get the following error on 64bit:
netflix-desktop : Depends: wine-compholio (> 1.5.16) but it is not installablemake sure the universe, multiverse and restricted repositories are enabled via Software Sources (on the first tab). To open Software Sources in Ubuntu 12.10, go to System Settings > Software Sources or, in Ubuntu 12.04 or older, you can access it via Ubuntu Software Center > Edit menu > Software Sources. Then run an “sudo apt-get update” and try to install netflix-desktop again and it should work.
Once installed, you can launch the Netflix Desktop web app through Dash / the menu. By default, the application runs in full screen but you can exit full screen mode by pressing F11.

Using Netflix Desktop app & patched Wine in other Linux distributions
For other Linux distributions: to get Netflix to work, see the instructions available @ iheartubuntu.com and compholio.com (use the patches from compholio!).
Fuduntu users: the patched Wine is already available in the Fuduntu repositories, so all you have to do is install Firefox for Windows and Microsoft Silverlight to be able to use Netflix.

For Arch Linux, Netflix Desktop can be installed via AUR.

Using the custom Netflix Wine build for other websites that require Silverlight
firefox ubuntu silverlight

Tip: since the Netflix Desktop web app comes with just a window titlebar (no menu, tabs, address bar, etc.), if you want to use this custom Wine build with other websites that require the Microsoft Silverlight plugin, launch Firefox for Windows (Wine) from the newly created desktop shortcut. Or, to launch it from Unity’s Dash, search for “Mozilla Firefox” (the native Firefox application for Linux should show up as “Mozilla Firefox Browser” so the names are not identical).

Alternatively, in the Netflix Desktop web app, you can use F11 (to exit full screen), then press ALT + V and from the View > Toolbar menu, enable the Menu Bar and Navigation Toolbar.

thanks to iheartubuntu.com for the info and screenshots

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on How To Use Netflix In Ubuntu Through Wine (PPA Available)

Kazam Screencaster 1.3.2 Gets New UI, Screenshots Support

A new Kazam Screencaster version has been released today, which brings a complete UI overhaul, support for taking screenshots and other new features.

Kazam is a screen recording tool – or better said, it was, because with the latest 1.3.2 version, it’s not just for screencasts and it can be used to take screenshots as well: fullscreen (current monitor), all screens, window or area.
The new version also brings a new user interface which lets you easily switch between the screencast and screenshot mode:


The encoder type, framerate and other options have been moved from the main window to a new preferences dialog:

In the preferences, you can select the speakers and microphone source, enable/disable the countdown splash, set the framerate, encoding type, if the files should be automatically saved, the directory where to save the files and the filename prefix. There’s also an option to set the screenshot shutter sound (or to turn it off).

Other changes in Kazam Screencaster 1.3.2:
Support for Gstreamer 1.0Automatic file saving. You can set the prefix filename separately for screenshots and screencastsSupport for selecting a single window to screencastTheme-able shutter sounds. Included sounds: Canon 7D and Nikon D80.
The latest Kazam should also support keyboard shortcuts:start recording: Super + Control + rpause recording: Super + Control + pfinish recording: Super + Control + fshow Kazam: Super + Control + squit: Super + Control + q

If you want to see some screencasts recorded using Kazam, take a look at our Lubuntu 12.10 and Xubuntu 12.10 videos.

Install Kazam Screencaster in Ubuntu
The latest Kazam Screencaster 1.3.2 is considered an unstable build so it can be installed from the Kazam Unstable PPA, for Ubuntu 12.10 only (for other Ubuntu versions there are older Kazam builds). To add the PPA and install Kazam, use the commands below in a terminal:sudo add-apt-repository ppa:kazam-team/unstable-series
sudo apt-get update
sudo apt-get install kazam
For other Linux distributions, you can download Kazam Screencaster via Launchpad.
Report any bugs you may find @ Launchpad.

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Category: Ubuntu | Comments Off on Kazam Screencaster 1.3.2 Gets New UI, Screenshots Support

How To Enable Intel SNA Acceleration In Ubuntu

SNA is a 2D acceleration architecture for the open source Intel Linux graphics driver that provides improved X.Org driver performance, and thus, better desktop user experience. The name stands for “Sandy Bridge New Acceleration” and contrary to its name, it not just for Sandy Bridge but for previous Intel graphics generations as well.

Here’s how to enable Intel SNA in Ubuntu 12.04 or 12.10.

According to the x.org wiki (link; cached copy since the page seems down right now), SNA should work with i830-i865G and newer Intel chipsets.
You can see some old UXA (used by default) vs SNA benchmarks at Phoronix.

intel sna ubuntu

Enable Intel SNA in Ubuntu 12.10
Intel SNA is available in Ubuntu 12.10 without installing any extra packages, but it’s not enabled by default.
To enable SNA, you need to create a /etc/X11/xorg.conf file:
gksu gedit /etc/X11/xorg.conf
And paste the following:

Section “Device”
Identifier “intel”
Driver “intel”
Option “AccelMethod” “sna”
EndSection
Then save the file, log out and log back in.

In my test (using an Intel HD 3000 GPU), there were some artefacts when using Intel SNA in Ubuntu 12.10, which don’t occur after adding the Xorg Edgers PPA so if that’s the case for you too, follow the steps under the alternative method below.
Or, if you just want to revert the changes, remove the xorg.conf file:
sudo rm /etc/X11/xorg.conf
Then log out and log back in.

Enable Intel SNA in Ubuntu 12.04 (alternative method for Ubuntu 12.10)
For Ubuntu 12.04 (or for Ubuntu 12.10, if the method above doesn’t work properly for you), you can use the Xorg Edgers PPA which has packages with SNA enabled by default for Intel.

Warning: this PPA uses Xorg packages from GIT and while I didn’t encounter any issues (I’ve used it for Ubuntu 12.04 and I’m using it now in Ubuntu 12.10), things may break. Use it at your own risk!
Add the Xorg Edgers PPA using the following command:
sudo add-apt-repository ppa:xorg-edgers/ppa
Then launch the Update Manager (now called Software Updater in Ubuntu 12.10) and update your system. Once the update finishes, log out and log back in (though a restart is probably better since this PPA upgrades many system packages).
If you want to revert the changes and go back to the drivers available in the official Ubuntu repositories, use the commands below:sudo apt-get install ppa-purge
sudo ppa-purge ppa:xorg-edgers/ppa

Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



Related Blogs

    Category: Ubuntu | Comments Off on How To Enable Intel SNA Acceleration In Ubuntu

    Alternative YouTube Video Lens Updated With Previews, More [Ubuntu 12.10]

    A while back, Lorenzo has created an alternative video lens and YouTube scope for Unity, which can be used to easily search and play YouTube videos using an external player of your choice.
    Unity in Ubuntu 12.10 does have its own video lens, but it only supports YouTube Shows, Movies and Educations, so most YouTube results won’t show up in the default Ubuntu video lens.
    Lorenzo’s YouTube lens/scope has been updated for Ubuntu 12.10 recently, getting proper video previews (I say “proper” because the default Ubuntu 12.10 video lens previews are kind of broken) which display the license, view count, likes and dislikes, the video description along with a video image and options to play the video using the player selected from the YouTube scope settings or open it in a web browser – check it out:

    For those not familiar with this YouTube scope, besides being able to easily search for YouTube videos, it comes with a tool that lets you select an external player for viewing YouTube videos, so you don’t have to open your browser (and without Flash). In the latest version, more players are supported and you can download videos as well, feature for which youtube-dl, a command line tool to download YouTube videos, is used.

    The new version also comes with speed improvements and better search results, along with other new features, such as:
    filter videos by length (short: less than four minutes, medium: less than twenty minutes, long: videos longer than twenty minutes)filters for HD or 3D videosnew supported video players like Totem or SMPlayeroption to download videos which supports selecting the downloaded video format

    Install Scope-YouTube in Ubuntu 12.10
    Add the PPA and install Scope-YouTube using the following commands:
    sudo add-apt-repository ppa:atareao/lenses
    sudo apt-get update
    sudo apt-get install yavol scope-youtube youtube-dl
    Once installed, restart Unity:
    setsid unity
    To configure which video player to use for viewing YouTube videos, launch Yavol from Dash (shows up as “yavol-scope-youtube-configurator”). In my test, VLC didn’t work properly, so I suggest using something like Totem or Minitube to play the videos.

    via atareao.es

    Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



    Category: Ubuntu | Comments Off on Alternative YouTube Video Lens Updated With Previews, More [Ubuntu 12.10]

    Alternative YouTube Video Lens Updated With Previews, More [Ubuntu 12.10]

    A while back, Lorenzo has created an alternative video lens and YouTube scope for Unity, which can be used to easily search and play YouTube videos using an external player of your choice.
    Unity in Ubuntu 12.10 does have its own video lens, but it only supports YouTube Shows, Movies and Educations, so most YouTube results won’t show up in the default Ubuntu video lens.
    Lorenzo’s YouTube lens/scope has been updated for Ubuntu 12.10 recently, getting proper video previews (I say “proper” because the default Ubuntu 12.10 video lens previews are kind of broken) which display the license, view count, likes and dislikes, the video description along with a video image and options to play the video using the player selected from the YouTube scope settings or open it in a web browser – check it out:

    For those not familiar with this YouTube scope, besides being able to easily search for YouTube videos, it comes with a tool that lets you select an external player for viewing YouTube videos, so you don’t have to open your browser (and without Flash). In the latest version, more players are supported and you can download videos as well, feature for which youtube-dl, a command line tool to download YouTube videos, is used.

    The new version also comes with speed improvements and better search results, along with other new features, such as:
    filter videos by length (short: less than four minutes, medium: less than twenty minutes, long: videos longer than twenty minutes)filters for HD or 3D videosnew supported video players like Totem or SMPlayeroption to download videos which supports selecting the downloaded video format

    Install YouTube scope/lens in Ubuntu 12.10
    Add the PPA and install the alternative YouTube scope/lens in Ubuntu 12.10 Quantal Quetzal using the following commands:
    sudo add-apt-repository ppa:atareao/lenses
    sudo apt-get update
    sudo apt-get install yavol scope-youtube youtube-dl
    Once installed, restart Unity:
    setsid unity
    To configure which video player to use for viewing YouTube videos, launch Yavol from Dash (shows up as “yavol-scope-youtube-configurator”). In my test, VLC didn’t work properly, so I suggest using something like Totem or Minitube to play the videos.

    via atareao.es

    Originally published at WebUpd8: Daily Ubuntu / Linux news and application reviews.



    Category: Ubuntu | Comments Off on Alternative YouTube Video Lens Updated With Previews, More [Ubuntu 12.10]

    Easily Create Animated GIF Images From Videos With Video2Gif

    There are various ways of creating animated GIF images from video files under Linux, but most require cutting the video into images, then combining the images using GIMP or some other tools, but here’s an easy way that only requires selecting the video, and optionally, changing the frame rate: Video 2 Gif.
    video2gif

    Video 2 Gif is a python tool created by Lorenzo from atareao.es which uses Mplayer to convert the video to GIF and lets you configure the start and end frame, video size and the frame rate. It doesn’t have many options, just the basics that allow you to create an animated GIF image from a video in seconds.
    To see GIF created using Video2Gif from an YouTube video, click HERE (I’ve used 3 frames per second). The quality isn’t great, but you can get better quality by using a higher frame rate (though this will increase the GIF file size). The GIF quality also depends a lot on the source video, so you’ll get mixed results, depending on what video you use.

    Before downloading and using Video 2 Gif, make sure you have mplayer installed:

    sudo apt-get install mplayer

    Then, download Video2Gif from here: English | Spanish

    Once downloaded, extract the archive, double click “video2gif”, select “Run” and you’re ready to convert a video to GIF. The tool doesn’t have a progress bar so once you click “OK”, wait until Video 2 Gif closes!
    Thanks to Lorenzo @ Atareao.es for Video 2 Gif!

    Category: Linux, Ubuntu | Comments Off on Easily Create Animated GIF Images From Videos With Video2Gif