[MEncoder-users] Can mencoder record a video of my desktop ?

Jorge Peixoto de Morais Neto please.no.spam.here at gmail.com
Tue Jul 31 20:50:46 CEST 2007


[snip]
> > > I need to make a demonstration of a program to a
> > > friend.
> > > I want to make a video of my desktop (including
> > > mouse moves if possible)
> > > Is mencoder able to do this kind of job ?
[snip]
> I've tried istanbul, but it seems, there's no way to control the output
> file.
> x11vnc seems to be a good program, but I only found a tool (pyvnc2swf)
> that produce swf files.
> I'd like to build mp4 files with mencoder; but I can't catch the vnc
> stream with mencoder ?

Well, it would be more efficient to capture to Xvid directly,
but you can always capture with an intermediate encoder and then
transcode to Xvid. It would be wise to choose a very high
quality level for this intermediate file (to minimize loss), then
use a lower quality level for the final file (to minimize size). 

For example, I have here a flv file and I can transcode it to Xvid 
like this:

mencoder -oac mp3lame -ovc xvid -lameopts q=4 -xvidencopts fixed_quant=12 -o out.avi -vf pp=ac,hqdn3d weirdalillsueya.flv

The weirdalillsueya.flv file has been downloaded from Youtube; this is
just an example of how you can transcode video from any format to Xvid.
"-oac mp3lame" chooses the LAME audio encoder, which is an mp3 encoder.
"-ovc xvid" chooses the Xvid video encoder, which is an MPEG4 part 2 encoder.
"-lameopts q=4" selects sound quality and "-xvidencopts fixed_quant=12"
selects video quality. You can vary these numbers (I took 4 and
12 out of my hat) according to how much quality you
need and how big you accept the final file to be. Check the man page of
mencoder for details.
In my case the final file has an a/v desynch problem (perhaps a bug in
mencoder?) but I think this won't bother you since
your file likely has no sound anyway.

Then you may want to mux it into matroska:

mkvmerge -o out.mkv out.avi

Matroska is a superb container format and produces slightly smaller
files than avi. It also allows you to seek in the file with a finer
detail and provides you with more playing speed options. 

You can also transcode to vorbis/theora with ffmpeg2theora:
ffmpeg2theora -a 0 -v 3 -o out.ogg weirdalillsueya.flv
Again, the numbers 0 and 3 must be chosen by you (0 and 3 were took out
of my hat), as they control quality/size. Check the man page of
ffmpeg2theora for details.
This is that I would personally do: transcode to vorbis/theora. Completely free software and high quality. 

Ps: What do you mean by "mp4 file"? I think it is possible to put
different kinds of video (different codecs like MPEG4 part 2 or MPEG4
part 10) in MPEG container format and call it an "mp4 file". You
probably mean MPEG4 part 2, which is implemented extremely well by the
Xvid software (which I used in the above example) and also by the
libavcodec library that is part of mencoder. Rumor has it that the
libavcodec implementation is less quality, but faster. Another software
that implements MPEG4 part 2 is Divx, but I think it is closed source
and less quality than Xvid. You don't want that.

Ps2: I didn't understand what exactly is the problem with istanbul
-- 
Software is like sex: it is better when it is free. --Linus Torvalds



More information about the MEncoder-users mailing list