Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to do some screencasting, but since my computer is much too old and slow the video being produced is laggy and the application I'm trying to record becomes unresponsive due to the CPU consumption. Since I can't upgrade at the moment, I'm looking to optimize what I have.
I switched from GNOME to OpenBox, and I've killed unnecessary processes, etc. Still no good. I've also optimized the application I'm recording, so the only thing left would be the recorder itself, which is FFMpeg.

What are some options and flags that can be used to get the best performance out of FFMpeg? Are there any specific codecs that are easier to process than others? I'll be recording about 10-15 mins at a time, so something that doesn't produce HUGE files sizes would also be appreciated. Any ideas?

share|improve this question
3  
As a rough guideline: small size, good quality, high speed: pick any two. I'd record to a format with less compression/higher bitrate per second first and afterwards re-compress that file to something smaller at a lower-than-realtime speed. –  Ulrich Schwarz Feb 3 '12 at 5:33
    
@UlrichSchwarz, Excellent reply. I agree with him completely. –  user14517 Feb 3 '12 at 7:44
add comment

1 Answer

If you have old computer any codec will make problems for real time encoding (not just for CPU but for disk as well). I suggest to find resolution which is low enough to reduce file size. I you want to have custom resolutions and framerate (mpeg1/mpeg2 can't be used). Resolution and framerate choose wisely.

Here is my suggestions for switches in ffmpeg:

-vcodec libx264 
-r 15
-preset ultrafast
-s 800x600

here I put 800x600 (this is maybe too low) and framerate is 15 fps. For better performance set framerate from 15 to 10 FPS. In my experience x264 is fast codec and allows custom resolutins and framerates.

Here is setup for MPEG2 (which is faster but is limited by resolutions & framerate)

-r 25 
-s 720x480 
-preset ultrafast 
-vcodec mpeg2video
share|improve this answer
    
I must check, you may be the first person in history to refer to H.264 encoding as "fast"... :-P But yeah, the key thing there is the preset to turn off all the expensive options. –  derobert Nov 14 '12 at 13:03
    
You are right! if 720x480 is good enough here this is faster: -r 25 -s 720x480 -preset ultrafast -vcodec mpeg2video (I live in Full HD world and complitly forgot someone use 800x600 resolution :() –  manuel Nov 15 '12 at 16:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.