All 3 entries tagged Opensuse

View all 28 entries tagged Opensuse on Warwick Blogs | View entries tagged Opensuse at Technorati | There are no images tagged Opensuse on this blog

July 26, 2016

Codec support for openSUSE Leap 42.1

Do you use openSUSE Leap 42.1? Do you want Twitter to stop displaying "This browser does not support video playback." when you're looking at it in Firefox? Do you want support for stuff like watching DVDs and H.264/ACC in an mp4 container in gstreamer (used by the GNOME Videos application (Totem), Parole and others)? Do you want to do these things without polluting your install by adding third party repositories and replacing packages provided by openSUSE? Do you want to do that stuff on a machine you don't have root on? If you answered yes to any of the previous questions, keep reading.

For some years I used to maintain machines running SUSE Linux Enterprise Desktop and rolled my own solution for adding codec support to them by way of a single package that doesn't conflict with anything provided by SUSE. (The last iteration can be found at https://www.suse.com/communities/blog/additional-multimedia-codec-support-sled-12/) Having installed openSUSE Leap 42.1 I found that the recommend method for adding codec support was a page which said something like "this isn't available for technical reasons try this other place" and that other place talked about the phonon backend with no mention of gstreamer. Then I decided to build my own solution for openSUSE too. You can get it by clicking Stuff to add codec support to openSUSE Leap 42.1


You need to read the README.txt file for full details, but to give you an idea of what’s involved, the build process is as follows:

$ ./build


It'll tell you if there are packages you need to install. Install those, then run the script again. By default the plugins will be built to live in /opt/multimedia If you want them to live somewhere else then change the line

prefix=/opt/multimedia;

to reflect where you want to put them. E.g if you want them in your home directory you could use

prefix="${HOME}/.multimedia";

By default an rpm will be built but if you set the prefix to something in your home directory the rpm won’t be built as it’s assumed you’re specifying your home directory as the prefix because you don’t have root and hence can’t install an rpm.

What the script basically does is build a bunch of gstreamer plugins, stick them somewhere they don't clash with what's in openSUSE packages, and put something in place so gstreamer can find them. Making Firefox play videos in Twitter rather than display the "This browser does not support video playback." is done by including ffmpeg, which Firefox will use for video playback if it's installed. (Far as I can tell, the significant file is libavcodec.so. The ffmpeg binaries like ffmpeg, ffserver etc are also included.)

There's nothing for hardware decoding of H.264 included. I have an Nvidia card and use the propriety Nvidia drivers. I can get hardware acceleration for H.264 by installing gstreamer-plugins-vaapi which is in the standard Leap 42.1 repos. Unfortunately installing it renders Totem unable to play H.264 video. It displays black for a few seconds than borks. The version of gstreamer-plugins-vaapi included in Leap 42.1 is 0.5.10. I found that 0.7.0 is the latest version that will build with gstreamer 1.4.5 that's included in Leap, but that didn't work any better for me. (Seems it did for this guy though https://blogs.gnome.org/ovitters/2015/12/23/hardware-accelerated-video-playing-with-totem/bl ). Parole, the XFCE video application, works though. It uses GTK and gstreamer and works fine in GNOME. If you want to get minimalist about it, you could also use gst-play-1.0

$ gst-play-1.0 --interactive video.mp4

February 02, 2009

zypper equivalent of yum —downloadonly

Looking at moving from yum to zypper I found myself unable to work out how to get zypper to download packages but not install them. Yum can do this with the downloadonly plugin:

yum -y update --downloadonly

According to this bug report, zypper should be able to do it but I couldn't find any explanation as to how. In the end I emailed the guy who marked that bug report as fixed and he was kind enough to reply and point me in the direction of the keep-packages option. This is a per-repo setting which means download packages are kept in cache. Knowing this a Google search took me here where it is mentioned along with the --dry-run option. So to get zypper to download updates but not install them, enable caching of packages on all repos with

zypper mr -k -all

and then use

zypper -l -y  update --dry-run




November 05, 2008

Altering AutoYaST profiles on the fly…

...or: How to have one or more variants of an AutoYaST profile without having to actually maintain them.

Say you maintain a bunch of machines running some SUSE variant, you install them using AutoYaST so they're all identical but you find that sometimes you want to install a machine in a way which is slightly different to normal. For example, you want to be able to re-install a machine whilst preserving the contents of a particular partition. This presents a problem because it means you need more than one AutoYaST profile, the one you usually use and the variant. If you change the main profile you have to make the same changes to the variant. Maintaining a variant is going to be prone to human error, forgetfulness and possibly problems could be caused by trying to use a variant which you don't realise hasn't been maintained.

Faced with such a situation myself a neat solution occurred to me. My AutoYaST profile is accessed from a web sever at time of installation, so a script on the web server can be used to manipulate the XML on the fly and serve the modified version. This way only one AutoYaST profile has to be maintained but you can can have as many variants of it as you like provided you write a script to produce that variant. E.g. This PHP:

<?php
# reads the autoinst.xml file, alters the partition config data so that
# partitions are re-used rather than created, and /local is not formatted
# then outputs the new xml.

$sourcexmlfile="autoyast.xml";

$data=simplexml_load_file($sourcexmlfile);

foreach ($data->partitioning->drive->partitions->partition as $partition) {
$partition->create="false";
if ($partition->mount=="/local") $partition->format="false";
}

header('Content-Type: text/xml');
print $data->asXML();
?>

saved as a suitably named file on the web server and it's url provided as the source of the AutoYaST profile at install time allows machines to be re-installed whilst preserving the contents of the partition that gets mounted at /local.


Search this blog

Tags

RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder
© MMXVII