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 :)