Capturing a Linux desktop using Mint
Recently I started messing around with screen captures.
There was no reason for this other than straightforward curiosity, and the belief the the best way to learn anything is through trial and error.
Obtaining a static snapshot of any part of the screen is pure simplicity in Linux. I use Shutter and it does everything I could possibly ask.
Dynamic recording of a desktop (or part thereof) is a little more complex, as I discovered.
I searched around and discovered recordMyDesktop, which on the face of it does precisely what I wanted. I went into my Software Manager and downloaded it along with gtk-recordmydesktop, which is its front end. Both were downloaded form the Linux Mint repository so I didn’t expect any problems. I fired up the programme, selected a portion of the screen and clicked on ‘record’. That was the start of my problems.
Having let the programme record for about fifteen seconds, I told it to stop. Immediately the recordMyDesktop-encoder appeared on my screen with its progress bar and a dire warning that doing anything to it would lose my recording. Two things worried me straight away. The first was a ghost outline of the area I had recorded, which refused to go away, and the second was that the progress bar did absolutely nothing. It steadfastly remained stuck on 0% and that was it. In the end, the only way I could shut the whole lot down was to kill the process using System Monitor.
I searched the Internet, but could find no resolution. After a lot of false trails I decided that recordMyDesktop was just not going to work so I decided to try alternative methods. During my research, I came across one tutorial that talked about command line capture using ‘ffmpeg’. I decided to try that, even though I am not a particular fan of command lines. However, I discovered that ffmpeg is not part of the base install of Linux Mint. No problem – I installed it.
It was at that point I had a thought that maybe that was why recordMyDesktop wasn’t working. I tried it again, and it worked perfectly!
As a test, I recorded a Movie Player visualisation. As I wanted good sound quality, I decided to record just video, and to dub on sound afterwards. Capturing the video went without a hitch, but I ended up with an ‘OGV’ file which could be played in Media Player but that’s all. I wanted to dub the sound on, and had chosen Avidemux as my chosen application, but that didn’t recognise OGV files.
I resorted to the Internet again and found the solution –
mencoder out.ogv -o newfile.avi -oac mp3lame -lameopts fast:preset=standard -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=4000
n the above, ‘out.ogv’ is the file I wish to process and newfile.avi is the output. This worked perfectly so then it was a simple matter of combining my original video with my original MP3.
The result –
Incidentally, the only reason I chose to work on that particular visualisation is because I like the effect.
Bang it up to full screen, then sit back and relax!
Nice! I’m going to play with that today – I need to create some online tutorials and Wink (another screen-cast thing) isn’t as cool as a live video.
What’s the tune?
It’s a piece called “Sense of Touch” by Mark Isham. I don’t know who the artist performing it is, but I can tell you that it’s in Welsh!
To be honest I stick these notes up for anyone that may be interested, but my primary reason is that next time I install Linux I will probably run into the same traps and pitfalls, so it’s nice to have my own instructions where I can’t lose them!