On Sunday 03 June 2007 20:46:54 Curtis Olson wrote:
> On 6/3/07, Pigeon wrote:
> >     Considering you're Linux you could also try xvidcap (which has GUI)
> > and ffmpeg (which you have to do at command line).
> >
> >
> >     But to be honest I doubt they would make huge differences from
> > Instabul or recordmydesktop.
> >
> >
> >     I often find the bottle neck on most machines is not the video/audio
> > encoding but how fast the data is being captured. For that you could try
> > capturing at a smaller resolution or slower frame rate. I also notice a
> > better display card does give a better performance, possibly related the
> > xshm implementation of the driver and other display card specifics like
> > memory bandwidth.
> >
> >
> >     And also depending on your machine and disk, you can try
> > capture+encode on the fly versus capture-into-frames (jpg/png/xwd) then
> > encode later. Though my personal experience is on slower processor they
> > yield pretty much the same performance, while on a faster processor (say
> >
> > >2GHz) it is faster to capture+encode on the fly as there is less disk
> >
> > io.
>
> Another option which I have used at my day job with excellent results is to
> get a scan converter that converts your vga signal to NTSC (or PAL) video.
> Now pipe that video output into a video capture box that is plugged into a
> second computer.  It's more expensive than an open source software package,
> but the results are full smooth frame rates since you don't have two
> applications competing for the same video/memory/disk/cpu resources.
>
> Curt.

This an old thread that I discovered when I was trying to figure out how to 
create videos of a flightgear session.  The thread was a dead end but it did 
point out somethings that do not work so that I didn't have to spend anytime 
looking at those options.  So I did a little research myself and figured out 
a way to get OK recordings.   Since it appears that no one has documented a 
way to do this I will do it now.

After doing some research I tried using yukon to do the capture and it works 
much better but it also requires more steps.  Yukon is specifically for 
recording OpenGL games and uses hand optimized assembly code at least on x86 
and x86_64 hardware.    To do this with yukon I ended up using a three step 
process.

Step 1.

Capture the FDM data for a flight using

--generic=file,out,20,<file>,playback

as part of the command you use to run FG.  <file> is the name of the output 
file that contains the FDM data.  This creates a fairly small data file (less 
than 1 meg per minute of flight time).  This step can be done using what ever 
screen resolution you want since it does not affect the final result in any 
way. In my case I have been using 3200x1200.

In the --generic parameters the 20 is the captured frame rate for the FDM.  
Depending on your hardware you might find other values that work better.  In 
addition, I do not know if this is the best value to use in my case because I 
did not try too many other settings.   Yukon seems to capture at 25FPM no 
matter what I told it to do so I think that using 25 might give the best 
overall results.

For those using fgrun you can set this up in the Advanced dialog in the 
Input/Output section.  Use the generic protocol. 

Step 2.

Play back the file created in step 1 in FG using a better video capture 
resolution such as 640x480 or 320x240 and record it with yukon using a 
command that looks like this:

yukon /usr/games/bin/fgfs --fg-root=/usr/share/games/FlightGear 
--fg-scenery=/usr/share/games/FlightGear/Scenery --aircraft=pc7 
--enable-horizon-effect --enable-game-mode --lon=-122.3590 --lat=37.6157 
--altitude=0 --heading=120 --geometry=640x520 --bpp=32 --fov=90 
--generic=file,in,20,<file>,playback --fdm=external

Where <file> is the file created in step 1.  Use F8 to start and stop recoding 
by yukon.  It is important that the air craft and starting position used in 
the above command are the same as when the FDM output file was created in 
step 1. Be sure that yukon is configured correctly and is working before 
doing this. Warning - the file created by yukon is uncompressed raw video and 
is very large. You can find info about yukon here:

http://neopsis.com/projects/yukon/wiki

For Gentoo users there is are ebuilds for seom and yukon in the sunrise 
overlay.  You need to have seom installed to build and run yukon.  

Step 3.

At this point you have a very large raw video file and you will need to do 
additional processing to make it usable.

So do something like:

seom-filter yukon.seom | mencoder - -ovc xvid -xvidencopts bitrate=512 -o 
myvideo.avi

mencoder is part of mplayer.  You can change the bitrate to get higher quality 
(but also larger files) or lower quality (smaller files) video. Setting 
bitrate to 512 did have noticeable artifacts in the resulting video captured 
at 640x480. You may want to try higher values.  You can also do a two pass 
conversion with mencoder to get higher quality video at a given bitrate.

Using the above techniques I have made a 8 minute 47 second video and a 5 
minute 20 second video.  Again captured at 640x480.  The output from yukon on 
the longer video was almost 4 gigabytes and the resulting avi file using a 
512 bitrate was 32.4 megabytes. The shorter video had 2.1 gigabyte and 19.8 
megabyte files respectively.

Both of these videos played back fine using xine and mplayer.  But I was not 
able to get either to work when uploaded to youtube.   I don't know why.

Now I have a question.  I would like to be able to pan and zoom in the 
recoding session (IE. during step 2).  Zooming is easy since I can us the x 
and X keys.  But panning is problematic since right clicking the mouse to use 
it for panning results in a big ugly cursor in the middle of the recording.  
If the cursor was not visible this would work great.  Is there anyway to 
prevent that cursor from appearing? 

Hal

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Flightgear-users mailing list
Flightgear-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-users

Reply via email to