Main menu:

Sponsoring

Please consider a small donation:

 

Also appreciated: support me by clicking the ads (costs nothing) :-)

 

Or you can donate bitcoin:

 

Thanks to TekLinks in Birmingham, AL, for providing colocation and bandwidth.

Page Rank

Fame

FOSS Force Best Blog--2013 Award

Recent posts

Recent comments

About this blog

I am Eric Hameleers, and this is where I think out loud.
More about me.

Search

My Favourites

Slackware

Calendar

August 2014
M T W T F S S
« Jul    
 123
45678910
11121314151617
18192021222324
25262728293031

RSS Alien's Slackware packages

RSS Alien's unofficial KDE Slackware packages

RSS Alien's multilib packages

Meta

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

Comments

Comment from Me
Posted: December 30, 2013 at 05:29

Thanks Eric :)
I also like SSR and recommends it .
Looking forward for part 2.
I also found an other video on your youtube channel that i will listen to.
And about Poettering i always say to myself that the moment slackware introduces any of Poetterings “babies” i will change distro.
I couldn’t agree more with this blog post ;)

Happy holidays!

Comment from Marcelo
Posted: December 30, 2013 at 08:35

I think the jack no updated. =/

Comment from Niki Kovacs
Posted: December 30, 2013 at 09:00

That was an interesting read, Eric. BTW, your inclusion of recordmydesktop in Slackware’s extra/ is well appreciated. I discovered this little tool some time ago, and wrote a little HOWTO about it.

http://www.microlinux.fr/slackware/Linux-HOWTOs/RecordMyDesktop-HOWTO.txt

Cheers,

Niki

Comment from bratpit
Posted: December 30, 2013 at 09:07

I personally not use jack or pulseaudio.
I do not like such redundant programs .
So to record sound I use separate .asoundrc file.

http://privatepaste.com/941a0277af

It uses snd_aloop module.

Comment from alienbob
Posted: December 30, 2013 at 13:30

Hi bratpit,

Usually I do not have a need for Jack audio either (if you are a musician running a Digital Audio Workstation then Jack is a requirement). My solution to tie ALSA and Jack together also uses snd_aloop :-)

Eric

Comment from bratpit
Posted: December 30, 2013 at 16:33

Bob

There is one drawback in that asoundrc.
No mixing from multiple input to 1 output .
So I have to use 2 conf files depending on what I’m doing :-)

For grabbing I use ffmpeg with keybinding script , and what do you mean saing that “does not deliver high-quality video with properly synced audio.”.
I do not agree for the video. its a codec matter e.g. x264 produces decent quality , but sync with audio is sometimes problem, but most of the time is the matter of proper use options and filters.
But buggy muxer to mkv in ffmpeg there was a problem too.

Comment from alienbob
Posted: December 31, 2013 at 00:27

Hi bratpit

When I am finished with my next article we will compare our .asoundrc files. Mine is targeted at bridging ALSA and Jack Audio but I think there must be a way to just skip Jack.

Eric

Comment from alienbob
Posted: December 31, 2013 at 12:41

Me:

Ultimately the choice whether to include or reject software into Slackware is determined by two factors: pressure from other upstream projects versus the willingness to change the course of the Slackware distribution in order to stick with its core philosophy. What if KDE or XFCE would adopt a hard dependency on SystemD or Wayland for instance?

It is not hard to think how people will react if Slackware would abandon major desktop environments, or even lower level utilities like udev and dbus, udisks, policykit, consolekit in an attempt to remain true to the UNIX ideals of old.

It’s like with PAM: as long as it is not absolutely required for the distro to function, it is not going to be added. The same could not be said for other software that has been introduced to Slackware over the past few years – luckily those additions were less intrusive than say, PAM or SystemD or Wayland.

Think of a Slackware with only X.Org and fluxbox as your graphical work environment and you can see how that would appeal to part of the Slackware user community while at the same time repelling another part of that same community.

Eric

Pingback from Alien Pastures » Setting up Jack Audio in Slackware
Posted: January 2, 2014 at 15:50

[…] A journey into recording sound & video in Slackware […]

Comment from Roy
Posted: January 3, 2014 at 05:10

> as you are well aware, this is a personal issue I have with the
> PA author and the way he writes code

No, I was not aware of it; by the way, I discover the name of
this given “PA author” today for the first time. Anyway, and
provided I am not mistaken on my interpretation of your “personal
issue,” agreed!, systemd is crap — why?, I invite everyone to
attentively read here:

http://skarnet.org/software/s6/why.html
Why another supervision suite ?

Fingers crossed on Slackware, my god… I hope it never will
embrace systemd! (I am looking with apprehension at, e.g., Arch
Linux.) And, as an aside: of course!, s6 works like a beauty on
my (slackware) laptop.

Cheers.

Comment from zezaocapoeira
Posted: March 12, 2014 at 20:48

Salve mano .Consegui fazer a instalação do SimpleScreenRecorder com Jack Audio http://www.youtube.com/watch?v=xp45pkIQFtQ .Parabéns pelos excelentes tutoriais .
Obrigado pela atenção ,salve !!!

Pingback from Flash does not like pulseaudio
Posted: April 20, 2014 at 03:31

[…] out AlienBob's blog posts: A journey into recording sound & video in Slackware Setting up Jack Audio in […]

Write a comment