My thoughts on Slackware, life and everything

Category: Rant (Page 7 of 10)

A journey into recording sound & video in Slackware

ssr When it comes to audio and sounds in Slackware, we’re happy to have ALSA as the sound subsystem. It works reliably, and has done so ever since it replaced OSS in Slackware all those years ago. In due course ALSA got capable of dynamically mixing multiple sound sources – which is basically what a sound server does, too. We were never plagued with the issues of other distros when they abandoned ALSA for PulseAudio.
When the Arts sound daemon of KDE was deprecated and finally removed with the release of KDE4, Slackware was left without a sound “server” that ran out of the box. We still have ESD, the Enlightened Sound Daemon but that one has limited use because of the wrapper programs it needs.
There are however scenarios where you wish Slackware had some sort of audio server. Until now, the only times when that thought crossed my mind it was related to streaming audio over a network – think of remote desktop sessions and virtual machines. I may write some more about that topic in a future post because I think I have the solution now – read on.

A more immediate need arose when I went looking for software that can record videos of my Slackware desktop – individual program windows and gameplay footage. My son is a huge Minecraft fan and wants to be able to do in Slackware what he already does with Fraps in Windows. My intention is to task him with creating some Slackware “end-user” videos to attract newcomers to the distro 🙂

It turns out that there really is not all that many good desktop video recording software in Linux land. I have tried recordmydesktop and like it well enough (that is how it ended up in Slackware’s “/extra” section) but it does not deliver stellar videos, in particular I don’t think it is suited for recording gameplay. It also produces OGG video only, which is OK since that gives you the only free and open video format and codecs… but I believe this design decision limits my options too much.

I read up on ArsTechnica’s attempts to record gameplay footage on SteamOS. To this day, the ArsTechnica folk have not found a way to record the audio of a game… apparently it is not as easy as you might think, to record OpenGL games. Programs like FFMPEG and VLC are able to record (parts of) your desktop but it is cumbersome and also does not deliver high-quality video with properly synced audio. These programs are not capable of intercepting OpenGL renders either, which limits their use.
So I went looking… and came across GLC, an ALSA & OpenGL recording software for Linux which was inspired by Fraps and Yukon, but it seems mostly abandoned by its author. Then there also is SimpleScreenRecorder, a relatively new piece of work by Maarten Baert. The program uses FFMPEG’s codecs to allow you to record audio and video into any format supported by the locally installed version of ffmpeg. It supports the recording of ALSA sound sources (think of a microphone). The word “simple” in its name only characterizes the ease-of-use, not the featureset! And it has a Qt-based GUI which nicely blends into my KDE desktop. By means of an OpenGL injection library it also supports direct recording of OpenGL renders (read: games). That should produce superior videos compared to merely recording the desktop window (because that produces lower frame rate videos or lower quality).

Unfortunately it turned out that SimpleScreenRecorder was not capable of recording my Slackware desktop’s sound, and therefore game videos are silent.
That is a show stopper… apparently you need a sound server like PulseAudio in order to record the audio as well. I am not prepared to install PulseAudio on Slackware – as you are well aware, this is a personal issue I have with the PA author and the way he writes code. So I investigated further, and found out that the unreleased GIT sources of SimpleScreenRecorder support JACK as a new sound source next to ALSA (and PulseAudio). I built the program from its GIT sources and then went on to learn about JACK Audio Connection Kit. I knew that JACK is primarily used by audio professionals and musicians because of its low-latency core design. But as it goes with versatile programs, it is inherently difficult to grasp its concepts and complex to configure. But I persevered and ultimately found a way to configure JACK on my desktop, and reconfigure my ALSA setup so that all the programs that I use can still emit sound, and SimpleScreenRecorder is now capable of recording video and audio! I put a demo video online which I recorded for the intro sequence from the Metro: Last Light game.

As you can see, the game stutters a bit, but that is not caused by the recording software – it’s my desktop PC which is just not fast enough for the game.

ssr_qtui

My next post will be about how I built and configured JACK, and what I had to change in my ALSA configuration so that for instance Steam games (using SDL for audio) and MineCraft (using OpenAL for audio) would still make sounds.

In the meantime, if you want to try SimpleScreenRecorder, there’s a couple of dependencies you need to install as well. SimpleScreenRecorder was built against ffmpeg (version 2.1 to be precise – please note that upgrades of ffmpeg will usually break a lot of applications that depend on it due to a change in library versions). Also, the package which I released has been built against jack – even if you do not plan on using it, you’ll have to install it… or you can rebuild SimpleScreenRecorder yourself.
If you want to use SimpleScreenRecorder to record 32-bit OpenGL programs (Steam games, WINE based games) and are running a 64-bit Slackware, it will have to be a multilib system and you will have to use the “convertpkg-compat32″ script (part of my compat32-tools package) to convert and install the 32-bits “compat32” versions of the simplescreenrecorder, ffmpeg and jack packages as well as the 64-bit versions.
If you want to try and record a Steam game without the Steam windows being visible (those are also rendered in OpenGL), you’ll definitely have to read these instructions: http://www.maartenbaert.be/simplescreenrecorder/recording-steam-games/#native-steam-for-linux because currently it involves some manual tweaking to get this working (I expect that this will get easier in time). Judging by his Wiki, Maarten is responsive to the users of his program and is able to write meaningful documentation.

Get packages (and sources) here:

Have fun! Eric

City of Munich completes migration to Linux of 15000 desktops

munich_logoOn 12 december 2013, a full ten years after deciding to move away from the vendor-lock in that is called Microsoft Windows, the german city of Munich has completed the migration to their own Linux distribution called “LiMux“, a brand of Ubuntu with a KDE desktop environment. A full 15,000 computers are running Linux now. What an accomplishment!

The project had its setbacks but I applaud it for its successful ending. I know firsthand how hard it is to migrate institutions (governmental or commercial) to Linux – all my involvements have met with “death from above” meaning higher up in the hierarchy the decision was made to stop the pilots.

It is obvious that the commitment of the city counsil has been the crucial factor here. For the council, cost savings were not the goal, it was the realization that an external entity was able to dictate its terms to the city: to be precise, Microsoft required that all Munich computers would have to be upgraded from Windows NT to a newer version of the OS, and of  its Office Suite. At great cost since it affected 14,000 computers. In order to remove Microsoft from the equation, the “LiMux” project was started. During the ten years this project ran, Steve Ballmer visited the city in order to convince the council that they should reconsider and offered licenses for the Microsoft OS and Office suite at ridiculous discounts. But his words fell on infertile grounds.

Munich has calculated that it saved ten million euros by not upgrading their Windows software and instead going for Linux and Open Source. A number that has been disputed by several parties, including Microsoft. And to be honest, licenses are not the only cost factor in a migration like this, if you take into consideration rewriting/porting of critical software, educating people and running two IT infrastructures in parallel for a decade. A rock-solid conviction that freedom is more important than cost is required to stand fast against the big influencers. But Munich has a socialist majority, which has certainly helped to sustain the project through uncertain times. In this regard, when I look at my own dutch government, mostly my representatives are spineless and talking out of their asses. It’s not possible for me to point at someone who will get my vote and is member of a political party I hold in high esteem.

A shining example of the council’s commitment on the other hand, is the story told at LinuxTag 2013 by Peter Hoffman (LiMux project leader) about the time when Bill Gates himself spoke with the Major. At one point, Gates asked the Major what his reasons were for this Linux migration. The answer ‘We want more freedom” did not satisfy Gates, and he asked “Freedom from what?”. The major replied with “Freedom from you, Mr. Gates!'”

Read more about this epic voyage on the European Union’s JoinUp site, in Linux Magazin (in german) or on Tech Republic,  and of course the web site dedicated to the LiMux project (in german).

Pipelight: using Silverlight in Linux browsers

pipelight-logo That is the exact title of an article which appeared on fds-team.de last august.

You may have read my earlier rant about dutch schools migrating (or forced to migrate) to a Microsoft SilverLight based learning management software called Magister. A disastrous move induced by an arrogant company, which of course leaves Linux desktop users out in the cold. In my article, I mentioned that I was looking at ways to render SilverLight based websites in a Linux browser. The most promising (in fact as it turned out,  the only) solution appeared to be Pipelight.

It took a while to get it all sorted out and make sense of the way in which the various pieces of software interact, but despite a busy work schedule I managed to pull it off in the end. This article will show you how to install and configure Pipelight on Slackware Linux without effort. Not just dutch Slackware users with children in secondary school will profit. You may definitely want to install Pipelight in order to view Netflix content on your Linux computer! Having a Netflix subscription forced you to boot a Windows computer but that is now history.

What is Pipelight and how does it render these SilverLight pages, and Netflix videos, and more, in your browser?

Project Pipelight utilizes the efforts made by Erich E. Hoover who created a set of Wine patches to get Playready DRM protected content working inside Wine. This modified Wine (wine-pipelight) is combined with a new browser plugin (pipelight) that embeds Silverlight directly in any Linux browser supporting the Netscape Plugin API (yes… the API which Google is planning to drop from its Chrome browser in 2014… not playing nice here, Google!).

Let me quote verbatim from the project page, because I can not phrase it better:

Pipelight consists out of two parts: A Linux library which is loaded into the browser and a Windows program started in Wine. The Windows program, called “pluginloader.exe”, simply simulates a browser and loads the Silverlight DLLs. When you open a page with a Silverlight application the library will send all commands from the browser through a pipe to the Windows process and act like a bridge between your browser and Silverlight. The used pipes do not have any big impact on the speed of the rendered video since all the video and audio data is not send through the pipe. Only the initialization parameters and (sometimes) the network traffic is send through them. As a user you will not notice anything from that “magic” and you can simply use Silverlight the same way as on Windows.

That is good news. And now, how to get this all working in Slackware?

? First, you need a couple of my packages (you may have some of them already). I made them available for Slackware 14.0 and 14.1, both 32-bit and 64-bit editions. Download and install the following packages for your Slackware version and architecture:

? Note that Wine is a 32-bit product (and the pre-compiled pipelight pluginloader comes as 32-bit binary only), so if you are running 64-bit Slackware you will have to switch it to a multilib system first. I noticed some references to wine64 in the piplelight sourcecode (un-implemented functionality as of yet) so there’s hope that multilib will not be needed in future.

? If you are running 64-bit Slackware, then you should download the 32-bit version of the OpenAL package and use the “convertpkg-compat32” program in order to create a multilib “compat32” package. You need to install that, instead of using the 64-bit package, otherwise Wine will not work. For instance (version and build numbers may change over time) using these commands:

# convertpkg-compat32 -i OpenAL-1.15.1-i486-2alien.tgz
# upgradepkg –install-new /tmp/OpenAL-compat32-1.15.1-x86_64-2aliencompat32.tgz

? The webcore-fonts-installer is a nifty package. It does not contain any Microsoft font (therefore I am allowed to distribute the package), but the post-installation script will automatically download and install the Microsoft Core Fonts for the Web for you. These fonts are required by SilverLight.

? Then, open a terminal and check out the new functionality by running the “pipelight-plugin” program. Use it to list the available plugins and to enable/disable one or more of these plugins. Do this as your own user account, not as the root user! The result of enabling a plugin is that a symbolic link to the corresponding shared library will be created in your ~/.mozilla/plugins/ directory.

$ pipelight-plugin –help

Supported plugins:
silverlight5.1
silverlight5.0
silverlight4
flash
shockwave
unity3d
$ pipelight-plugin –enable silverlight
Plugin silverlight5.1 is now enabled
$ pipelight-plugin –list-enabled
silverlight5.1

? Install a browser User Agent switcher. Some SilverLight sites will tell your Linux browser that it is unsupported, and you will have to make the server believe that your browser is running on Windows. For Firefox, you should pick https://addons.mozilla.org/en-US/firefox/addon/user-agent-overrider .

? Start your Firefox or Chrome browser (Konqueror should work too but I did not test that) and open the URL http://fds-team.de/pipelight/ which is the team’s diagnostics page. You can select one of the available plugins to test, and this will trigger the browser to try and load that pipelight plugin. The first time the plugin loads, it will automatically download and install the required Windows programs using the customized wine-pipelight program. You will see a few Windows installation dialogs (for SilverLight etc). These do not require any interaction, and you can sit back and relax. It will only take a short while, and then the disgnostics page will show the plugin’s status. The wine-pipelight program will install all its files in its own wine prefix so that it will not interfere with a “normal” version of  Wine which you may have installed already. The directory which is used, is  ~/.wine-pipelight/ .

pipelight03

SilverLight DRM (protected content) on Linux

In order to play protected content in SilverLight, Microsoft has invented PlayReady. The customized version of Wine which comes with Pipelight (wine-pipelight) implements this DRM support through Linux Extended Attributes (xattr). Your kernel has to support it for the filesystem you use. Slackware’s kernels have enabled this for most filesystems (below output is for a Slackware 13.37 kernel):

# zcat /proc/config.gz | grep XATTR
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_REISERFS_FS_XATTR=y
# CONFIG_JFFS2_FS_XATTR is not set
CONFIG_UBIFS_FS_XATTR=y
CONFIG_SQUASHFS_XATTR=y
# CONFIG_CIFS_XATTR is not set

The Linux extended filesystems (ext2, ext3, ext4) enable extended attributes by default when you mount them. Other filesystem types may require a mount option in /etc/fstab.

Troubleshooting Pipelight issues

  • Running Firefox from the command line will show debugging output from the pipelight plugin when you go to http://fds-team.de/pipelight/
  • When using the UserAgent control to spoof your browser and OS, try not to pick MS Internet Explorer. Apparently, only disguising as Firefox/Windows will work with Netflix.
  • If you are using Firefox and the pipelight diagnostics page informs you that SilverLight was installed OK but that your browser’s plugin cache needs to be cleared, you should follow the advice. If you don’t do that, Firefox will not reload the plugin on the next start. To clear the plugin cache, type “about:support” in your address line and hit Enter. You should now see a button which opens your profile directory. Click on it and remove the “pluginreg.dat” file. Restart your browser and check if it works (don’t worry, the “pluginreg.dat” file will be automatically re-created).
  •  If Netflix informs you that you are logged in with another browser or tab and you are certain that you are not, you need to close your browser windows and then kill off all of the wine services, plugin-container and pluginloader.exe processes. Then start your browser again. The Wine processes are left-overs from a previous (failed) attempt to load the pipelight plugin.

Enjoy! Eric

Education and Open Source

I really need to rant and fume a bit about the dutch education system – and I will end with some free promotion for an Open Source centered conference in my own city.

I have a son, he is in Secondary School now. But even in Primary School, he was exposed to a Microsoft-dominated IT infrastructure. He would work on texts in MS Word, and create presentations in MS PowerPoint or even MS Visio.

The problems for parents would inevitably start when the kids were sent home with instructions to finish their school assignments at home, effectively forcing the parents to buy copies of MS Office Professional or “go illegal”. The LibreOffice suite did not exist back then, and OpenOffice was not able to cope with Visio files (and quite honesly, could not cope well with complex Word documents either). at the time, I used a web-based MS Office conversion tool to create PDF files of the stuff my son brought home for printing (because colour printing at school would cost money).

Asking the local IT guy about Linux based education possibilities or even opportunities (my own expertise counts for something, you’d think) would only return blank stares. Apparently Microsoft has invested serious money in SURFMarket (joint venture with KennisNet and SURF) to ensure that dutch educational institutes are being supplied with Microsoft software at bargain prices, so that there is no incentive to look for alternatives. Which is detrimental to the development of the children, because they are not learning about Information Technology… they are learning how to operate MS Office.

In comparison, look at the initiatives in the UK, where the government-funded BBC sparked the development of the Acorn computer (Acorn developed the ARM CPU -originally an acronym for Acorn Risc Machine), and a few years ago this concept was rebooted by a couple of awesome guys from the University of Cambridge in the form of the Raspberry Pi, an ideal target for Computer Education in primary school. I can only look at the British in envy, and seriously think that the dutch have made fatal errors in long-term strategic decisions regarding the education of new geneations.

Fast forward to Secondary School.

Every pupil in my son’s school is required to have access to a Windows computer at home. The only software used at school is Microsoft based. Luckily the Document Foundation has spent a tremendous effort at making the LibeOffice suite more interoperable with the Microsoft counterpart, so there are ways around the Windows office requirements at school.

However there is still one major stumbling block. An by major, I mean stupid policy-makers are apparently being bought. Our Secondary school, one of many similar schools, has moved its Student Registration and Management system to Magister. Magister is built on Microsoft’s Silverlight content creation sofrtware, which is of course not cross-platform.

On Linux, an open-source Silverlight implementation called Moonlight (part of Mono) has been available for a while but its development has ceased. Petitions (from school teachers even) to provide alternatives that would work on Linux and Mac computers have not been honoured. A lot of links prove how bad the situation is and I could easily produce a lot more (most are in dutch by the way).

I am forced to use Silverlight. That is bad, when you consider that the dutch government has pledged to promote the use of Open Software and Open Standards – first through ICTU‘s OSOSS program, and later through the NOIV program. When that program ended, the message was that the government would not divert from this strategy in future. Ha ha ha.

I have been using a Chrome plugin that renders Silverlight pages on-line but the company which ran the service has closed shop last year. I am now looking at Pipelight, which is a cross-browser plugin which uses a patched version of Wine to render Silverlight pages locally. Expect Slackware packages soon, if it impresses me sufficiently. I want to be able to monitor my son’s progress on my Slackware computer dammit!

I am not venting my anger just because I can not bear it any longer. I wanted to take the opportunity and do a bit of PR for an event that will be taking place in Eindhoven, mu home town. There is a lot to learn there about proper and effective use of Open Source and Open Standards in eduction.

t-dose-square If you are interested, consider visiting  T-DOSE in the weekend of 26-27 october. T-DOSE is a free yearly recurring conference to promote the use and development of Open Source Software. I did a talk about the history of Slackware at the 2009 edition (I was so terribly ill and ran on paracetamol… but the talk was OK). This year the conference will run a full “track” consisting of several talks related to education and Open Source – I do not even mention all of them:

And for those who are interested in hands-on experience on top of the talks, an Open Source Class Room demonstration enviroment will be available during the whole event.

It’s free entry people! And if you are planning to go, leave a note here and you may meet me during drinks.

Cheers, Eric

So I finally packaged VLC 2.1. And what about LibreOffice?

VLC

Finally, the daunting task of compiling 12 packages for VLC has come to completion. I created packages for the latest VLC 2.1 (codenamed ‘rincewind’… who the heck keeps thinking that these half-arsed nicks are useful). Like with the release candidate which I packaged last month, the internally used libraries are up to date again (ffmpeg, fluidsynth, libass, libcdio, libdc1394, libdvbpsi, libebml, libmatroska, libva, opus, orc, schroedinger, vcdimager, vo-amrwbenc, and x264).

Those of you who are running Slackware 13.37, 14.0 and -current will rejoice 🙂 That being said, it is likely that this is the last major VLC update for which I will produce a Slackware 13.37 package – the effort is just becoming too big.

The 2.1 release is the culmination of nearly two years of work by the team, squashing over a thousand bugs (although it is not mentioned anywhere how many of those were caused by actually coding the 2.1 branch). More importantly, the commit history shows that VLC is very much alive, evidenced by the fact that 140 code committers do not belong to the actual VideoLAN team. Good news because my expericnce was that the 1.x and 2.0 development cycles have actually caused a decrease in the quality and robustness of VLC as an allround media player. Let’s see if 2.1 will turn this around. With a new audio core and lots of work on improving the ports to other platform, I really hope that much of the deficits of the video decoders which made me switch back to MPlayer as my video app of choice, have been addressed as well.

Where to find my new VLC packages:

Rsync acccess is offered by the mirror server: rsync://taper.alienbase.nl/mirrors/people/alien/restricted_slackbuilds/vlc/ .

My usual warning about patents: versions that can not only DEcode but also ENcode mp3 and aac audio can be found in my alternative repository where I keep the packages containing code that might violate stupid US software patents.

libreoffce_logoLibreOffice

My latest LibreOffice packages (for Slackware 14) are version 4.0.5. In the meantime, those hard-working LibreOffice developers are almost at version 4.2.1… so what happened to the ‘alien’ builds of LibreOffice 4.1?

Well, during the packaging of 4.0 I noticed that the dictionaries which are now being offered as a source tarball, including many languages, needed another way of building and installing. I have been trying to find time to investigate and come up with proper packages, but I ran into a snag with the SlackBuild script and kept telling to myself that I would look into it right after the next KDE… OpenJDK… Calibre… whatever package would have been created. To be honest…. I am swamped with work during my paid daytime job and I spend more hours per week at work. It takes time to finish the bigger projects (like LibreOffice) in my spare time. Be patient, packages will be released eventually.

Oh yeah…

I helped my son today with the home-made pizza he had promised to create. I did something I realized I had never done before… I created the pizza dough from scratch: flour, yeast, water, olive oil, salt. Kneading the dough, seeing it rise and flattening it out to an oven-plate sized pizza bottom was very rewarding. Eating the pizza was rewarding as well! I have promised myself to finally bake that Focaccia bread which I have been wanting to try forever.

And finally:

Anyone with a Google Nexus tablet out there and experience with unlocking it, putting some brand of real Linux on it? I am going to pick up my own ARM port after Slackware 14.1 is released and besides my personal targets (getting it to boot on my TrimSlice and my ChromeBook) I was wondering how open the Google Nexus tablets really are with regard to having linux device drivers available. I am dead-curious about seeing how well Slackware behaves on a touch device… and both the Nexus 7 and Nexus 10 look like they are awesome devices.

Be good! Eric

 

 

« Older posts Newer posts »

© 2024 Alien Pastures

Theme by Anders NorenUp ↑