Von „http://www.julian-fietkau.de/blog/recordmydesktop_and_ogv“

recordmydesktop and OGV

2011-09-20 18:53:02

Stichwörter: Freie Software, Linux, Technologie

Just a small heads up to anyone doing any kind of screencast or desktop recording on a typical desktop Linux:

Usually, people will recommend recordmydesktop, which is a very cool program that's available e.g. in the Ubuntu repositories. It works really well and all, but I keep running into walls with the OGG/Theora videos that it produces.

I'm no expert on video encoding, but apparently recordmydesktop does some very fancy optimizations involving variable FPS and stuff like that, so the video files are quite small byte-wise. Unfortunately, this has caused problems for me down the line: I can play the files just fine in Totem (thus, gstreamer) or VLC. But as soon as I try to reencode them, all hell breaks loose.

I tried importing the files into Kino, but they would cut off too early and the framerate would go bananas. I tried reencoding with ffmpeg, only to get playback speed issues. Mencoder didn't help either. Even VLC, which could play the files without problems, would not produce usable results, but would seemingly offset frame rates, so that when there was no movement on screen for any length of the video, in the resulting video it would pause a couple of frames earlier, which was very annoying.

Despite long searches, I wasn't able to find anyone else having the same problem online. So maybe I'm just incompetent and I'm making some obvious mistake. Still, I wasted hours today trying to figure this out, and I still failed.

So if by any chance you run into the same problem some time, just save yourself a lot of grief and use ffmpeg with x11grab instead of recordmydesktop. It has the added advantage that you can directly encode to any format that ffmpeg can do (which is pretty much all of them).

(It almost pains me to admit this, but in the end I used ffmpeg/x11grab to capture my OGV playing in Totem and then re-muxed the audio because I didn't want to re-record it all. In the future I'll probably use x11grab directly.)


Bitte geben Sie in die folgenden drei Textfelder nichts ein, sie dienen dem Schutz vor unerwünschten automatischen Eingaben. Wenn hier etwas eingetragen wird, wird der Kommentar nicht gespeichert!

Ende der Falle - ab hier bitte das Formular ausfüllen.

Textformatierung in Kommentaren erfolgt per Markdown.

Hervorhebung *Hervorhebung* oder _Hervorhebung_ (innerhalb einer Zeile)
Starke Hervorhebung **Starke Hervorhebung** oder __Starke Hervorhebung__ (innerhalb einer Zeile)
Neuer Absatz eine Leerzeile einfügen


> Zitat
  • ungeordnete
  • Liste
* ungeordnete
* Liste
  1. geordnete
  2. Liste
1. geordnete
2. Liste
Weblink [Weblink](http://www.julian-fietkau.de)
Hinweis: Nur per OpenID authentifizierte Benutzer können Weblinks setzen.
Ausführliche Beispiele gibt es bei Daring Fireball.
2011-09-20 21:06:08

I had similar problems. I was able to solve them by fiddling with recordmydesktop's video capture settings. Way bigger files, but I could edit them fine afterwards. Sorry, but I can't recall what I did, right now, but it was something like setting the video mode to progressive and a fixed framerate.

Julian F.
Julian F. (via julian-fietkau.de)
2011-09-20 21:17:53

Unfortunately in my (Ubuntu 11.04) version of recordmydesktop, I can't find any such settings. The only thing that seems to be related is the "--full-shots" option, which didn't solve the problem for me... Oh well.

2011-09-21 11:25:40

ctrl+alt+shift+r in gnome3 should help you make easily screencasts

Julian F.
Julian F. (via julian-fietkau.de)
2011-09-22 15:33:34

In case this will help someone down the line, I now use the following command to capture an area of my screen and my microphone input:

ffmpeg -y -f x11grab -r 24 -s 768x576 -i :0.0+500,110 -vcodec libx264 -crf 22 -threads 0 -f alsa -ac 2 -i pulse -ab 256k video.mp4

Replace H264 with a better and/or more free codec at your leisure.