Board index FlightGear Development New features

Video recorder

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Video recorder

Postby mr_no » Sat Aug 04, 2012 2:44 pm

Since the flightrecoder records a flight and flightgear has a take screenshot function, it would be nice if there was a video recorder function so that flightrecoder writes jpg or bmp files of the flight. This way apps like Fraps and other who have lag would not be needed and recorder could take all the time it needs to write all the files.
Mosquito-XE JT-5B-autogyro Extra-300s STOL-Ch701
User avatar
mr_no
 
Posts: 360
Joined: Thu Jan 19, 2012 3:20 pm

Re: Video recorder

Postby Hooray » Sat Aug 04, 2012 4:26 pm

If you really wanted to, OSG has already support for writing video streams from OSG::Cameras
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Video recorder

Postby Kabuki » Sat Nov 24, 2012 11:56 pm

Theslayerbudgie wrote in Sat Nov 24, 2012 9:05 pm:i am really intrested in a recorder that doesnt just record games as fraps (fraps is great) but that it can record the whole window like desktop and so.


It would be almost trivial to add "record" and "save" buttons to the instant replay gui.

Getting them to actually work, would be a little harder, :roll: but it would practically turn the instant replay feature into a video editor.
This is a family-friendly saloon. No talk stink.
Kabuki
 
Posts: 584
Joined: Sat Oct 24, 2009 12:21 am
Location: Usually on the ground, always in the sky, except when underwater.
Callsign: Kabuki
Version: 3.0.0
OS: Windows 7

Re: Video recorder

Postby Michat » Sun Nov 25, 2012 1:09 am

Hi folks.

There is a free software project called http://www.mediagoblin.org that has just started its 2nd stage of development, for the moment you can share media without flash, ogg ogv audio video format within others, real time 3d render preview of a shared 3d format.
This next stage is dedicated to improve new functions: real time play + record streaming, broadcasting + save as, with desktop capture of course. etc .
It will change the centralized way we share media nowadays. Soon I hope ;)

------
@Hooray what kind of osg cameras? real life cameras or virtual one?

------------
Simmers, is the replay MP again?



Cheers to all
User avatar
Michat
 
Posts: 1226
Joined: Mon Jan 25, 2010 7:24 pm
Location: Spain
Version: 191b
OS: MX 21 Fluxbox oniMac

Re: Video recorder

Postby Hooray » Sun Nov 25, 2012 6:06 am

OSG supports both: Virtual camera, but also real video feeds - which are basically rendered to a texture.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Video recorder

Postby Hooray » Sun Nov 25, 2012 8:22 am

Kabuki wrote in Sat Nov 24, 2012 11:56 pm:
Theslayerbudgie wrote in Sat Nov 24, 2012 9:05 pm:i am really intrested in a recorder that doesnt just record games as fraps (fraps is great) but that it can record the whole window like desktop and so.


It would be almost trivial to add "record" and "save" buttons to the instant replay gui.
Getting them to actually work, would be a little harder, :roll: but it would practically turn the instant replay feature into a video editor.


There are several options to implement something like this. FlightGear already has a built-in fgcommand to take screen shots - a similar command could be added to stream the FG window to a buffer, or a file. OSG has support for both of these features.
A simple "hack" would be using the screen shot feature at a high rate several times per frame ... and maybe writing everything to an asynchronous buffer.

I suggest to file a feature request: https://code.google.com/p/flightgear-bu ... %20request
While I don't have a need for this personally, I do understand that there are lots of video enthusiasts here, and it would obviously make it even easier for people to promote FG to users, without requiring external tools to create videos that can be uploaded to youtube etc.
So, I can see this being useful - also for people creating video tutorials or demonstrations (LinuxTag/FSWeekend) that don't require a fully working/interactive fgfs instance.

From the OSG side of things this is not even difficult to implement - but it would obviously add some additional OSG-related dependencies that are currently not required.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Video recorder

Postby Kabuki » Tue Nov 27, 2012 7:27 pm

I just learned about screen recording with VLC, which already happened to be on my system. Results were disappointing. I tried recording at 24fps (VLC recording rate -- not flightgear's framerate) and although I was flying at a smooth 45+ fps on flighgear, the resulting .mp4 was unwatchable. The framerate was ridiculous. It was hard to even tell what was going on.

I'm guessing it has to do with all the work VLC has to do in compressing what it's recording. (?) Funny thing however is that flightgear was doing fine, not seeming to be slowed down by the recorder. Later, I tried throttling flightgear's framerate to 24 fps, but it didn't help the bottom line.

Am I missing some setting for VLC that will allow it to record at a higher framerate -- 20 or 24 fps? I don't know diddly squat about video recording and formats... anybody help?
This is a family-friendly saloon. No talk stink.
Kabuki
 
Posts: 584
Joined: Sat Oct 24, 2009 12:21 am
Location: Usually on the ground, always in the sky, except when underwater.
Callsign: Kabuki
Version: 3.0.0
OS: Windows 7

Re: Video recorder

Postby LukeaFG » Tue Nov 27, 2012 11:33 pm

VLC has different codec settings you can choose from. Sometimes a codec can be more CPU intensive than others and that means the video recorder will drop frames while recording if your computer isn't up to it, hence the laggy video. Try Camstudio (free) http:// camstudio.org / and download Lagarith Lossless codec (great quality but massive file size + easier on your computer) http:// lags.leetcode.net/ codec.html
Using Camstudio is much easier and more manageable. If Lagarith is still making your video file laggy then try using Divx codec (Lossy codec - quality will degrade a bit but is much easier on your computer)
This should help ;-)
LukeaFG
 
Posts: 269
Joined: Sun May 06, 2012 10:19 am

Re: Video recorder

Postby Kabuki » Wed Nov 28, 2012 3:30 am

Hooray wrote in Sun Nov 25, 2012 8:22 am:[...]
There are several options to implement something like this. FlightGear already has a built-in fgcommand to take screen shots - a similar command could be added to stream the FG window to a buffer, or a file. OSG has support for both of these features.
A simple "hack" would be using the screen shot feature at a high rate several times per frame ... and maybe writing everything to an asynchronous buffer.


Whew, that sounds ugly. But doable. I wonder if the framerates might conflict and cause dizzying results (which apparently happens with VLC). Commendable idea, however.

Hooray wrote in Sun Nov 25, 2012 8:22 am:I suggest to file a feature request: https://code.google.com/p/flightgear-bu ... %20request


Thanks for the suggestion. I took it. :)
This is a family-friendly saloon. No talk stink.
Kabuki
 
Posts: 584
Joined: Sat Oct 24, 2009 12:21 am
Location: Usually on the ground, always in the sky, except when underwater.
Callsign: Kabuki
Version: 3.0.0
OS: Windows 7

Re: Video recorder

Postby Hooray » Wed Nov 28, 2012 12:21 pm

yes, framerate would definitely be impacted by this for the time being. At the moment, the screen shot function seems to be implemented in a blocking fashion, i.e. the simulator is "paused" while the screen shot is taken. But there's no need to do it this way actually, so it would be possible to capture the screen at a configurable interval and write it a buffer. A background thread could then write it to the disk or to a network socket (for streaming).

Flightgear-devel: scheduling and threading
Johnk Denker wrote:A similar question applies to the jpg-httpd imaging
system. Is there any reason why that should not be
asynchronous?

Indeed it would be nice if the JPEG stuff ran in its
own thread. Some people have very powerful multi-
processor systems, and it's embarrassing for the
display to freeze every time a snapshot is taken.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to New features

Who is online

Users browsing this forum: No registered users and 9 guests