I've been experimenting with recording screencasts using FFmpeg's X11grab module, which has worked more or less fine so far. I understand that a/v encoding is a complex process with many fine details, but I'm doing my best to learn.
I'd like to do "lightweight" recording of a video stream, that puts as little strain as possible on the system while the stream is being recorded. I record two audio streams separately with pacat and sox. Later, the whole thing is filtered, normalized, encoded, and combined into a Matroska container.
Right now, I'm having ffmpeg record a rawvideo stream to be fed to x264's yuv4 demuxer. I experimented with ffv1 and straight x264 recording before. My system can't handle real time encoding with x264 on the settings I want for the final stream, so I have to recompress separately once the recording is done. I've found that ffv1 gives me terrible frame dropping, and yuv4 too, but less so. I suspect this is due to hard drive speed, even if I'm sitting in a SATA3 Caviar Black that's being used exclusively to hold the recorded data.
The question is, which combination of video codecs should I look at? Record straight in x264 and recompress to "better" x264 later? Raw video, then compress? How would I go about pinpointing issues such as the frame drops I've been experiencing?
EDIT: This is the ffmpeg line I currently use.
ffmpeg -v warning -f x11grab -s 1920x1080 -r 30000/1001 -i :0.0\
-vcodec rawvideo -pix_fmt yuv420p -s 1280x720\
-threads 0\
recvideo.y4m