I use avconv to make screen recording of gameplays on linux (yeah, I'm sorry, I am one of them, but I get more excited about the scripts than playing it self), but recently my harddrive has gone and while waiting for the warranty I'm using one from an old notebook.

The problem is that I already knew that I cannot record using this HD for it's to much slower than my old one, as it turns out to be true, I gave up trying to record and started to search for other options.

That was when I remembered of tmpfs/ramfs, and this is how I'm trying to work things out:

1) I mount the tmpfs:

$ sudo mount -t tmpfs -o size=2048M captura ~/Videos/capture/memoria/
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       286G   63G  209G  24% /
captura         2.0G   62M  2.0G   3% /home/rarlei/Videos/capture/memoria

2) Start gaming (Minecraft, heavy memory usage?)

3) Start recording: avconv $thousands_of_parameters -v:c libx264 -preset fast memoria/video.mp4 (video only)

After some playing I just stop recording to see what I have, but what I see is no different from what I see recording to harddrive.

I have 8GB of some pretty good memory (1.2ghz or something like that, I don't know how I can see from linux)

I'm not using any specific video card, it's just some regular Intel, but this never afected the recording with my previous harddisk.

Wasn't tmpfs supposed to be much faster? Does minecraft affect this? Does encoding affect this? Any thoughts?


I think I'm not being clear, what I am doing is compare two videos, one writen onto harddisk partition, and other writen into tmpfs (memory?), both with same codecs, both from X11 display, my expected result was that tmpfs video had much less lags than harddisk (lags that don't appear while playing), but the result is that both video shows lags, in almost same quantity.

Worth saying that those lags didn't occur back with my previous harddisk, so I know it's storage related, and not processor/codec.

UPDATE - Solved (?)

Turns out that something seems to happen in the encoding process that is much more memory consuming (which is obvious now, since it need to load each frame into memory and process there, and then write back into another section of the very same memory) than I foresaw, so, doing everything in memory really caused those lags/framedrops while encoding.

I tried to record using rawvideo, and after re-encoding back to mp4 there was no lag in the video. Too bad it takes 1GB for every 10 seconds and I don't have enought memory.

There was no way to record rawvideo right to harddisk, doing that slowed the game to the point of stopping it until I stop recording. :(

Thank you guys anyway :)

  • What is your actual question or problem?
    – Baarn
    Commented Jan 19, 2013 at 15:33
  • If tmpfs wasn't supposed to be much faster than my harddisk
    – Rarlei
    Commented Jan 19, 2013 at 15:47
  • 1
    That's not a clarification. You record video to the partition, then you play it back. You wrote, "what I see is no different than recording to the harddrive". Why would it be? And why would the speed of video recording or playback have changed? That's constant.
    – goldilocks
    Commented Jan 19, 2013 at 15:55
  • I'm actually writing to an tmpfs partition which (I suppose) is stored right into ram, so it's write and read access should be higher, don't? But it has nearly the same lags on the video that has writing to harddisk
    – Rarlei
    Commented Jan 19, 2013 at 15:59
  • Lags in video playback will never be because of a local I/O bottleneck; witness you can stream video online at speeds much much slower than accessing a normal hard-drive. Video from cd-rom is also fine. To sort of answer your question: that's not the issue, so using a faster storage medium will not make any difference.
    – goldilocks
    Commented Jan 19, 2013 at 16:11

1 Answer 1


You could try running avconv with a higher priority; this may cause the game to slow down, but:

nice n=-10 aconv ...

That presumes the problem is because aconv isn't getting enough processor time to do what it needs to do. Whatever it is, as per my comments it is not because it cannot write to disk fast enough.

See man nice if you haven't heard of it before.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .