Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Video recording plugin

Author
Message
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 14th Feb 2011 18:41 Edited at: 14th Feb 2011 18:50
All the existing programs such as fraps, camstudio, etc. are too slow to record full-screen video on my computer, so I decided to make my own recorder integrated with DBPro/DGDK.

After a bit of tweaking, I've managed to record full-screen loss-less video, synchronized with a DBPro game at over 40 FPS (smooth video requires only 25 FPS, leaving plenty of processor time for your game), compared to the 4 FPS I get with any of the alternatives. The encoding code runs in a separate thread, so if you have multiple cores, you will get a speed boost.

The best part is that if your game suddely uses a lot of CPU (usually when there's a lot going on), with other programs the recording frame-rate would drop and you'd get jerky video at the most important part. With this plugin, the speed and multithreading make it unlikely to begin with, but because it's synchronized with the game, you can slow down the game instead at these points, but to anyone watching the final video, they won't be able to tell because the video will play back at 25 FPS (or whatever FPS you set) regardless of the actual framerate.

The code can save to the following video formats, although some depend on having the right codecs installed:


If such a plugin would be useful to you, please reply! What would you use it for? What extra features would you like to see?

If I were to sell the plugin, it would likely be fairly cheap (~£5) do you think it would be worth that?

[b]
budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 14th Feb 2011 23:14
Will it have any kind of audio encoding? If so, will the user be able to choose between speaker and microphone?


Mystic-Mod: Putting the fear back into sliced bread since 4th May 2010
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 14th Feb 2011 23:37
Nicely done.

BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 14th Feb 2011 23:41
Yep, I would buy it!
I would love for it to record audio too, even if it was only mono.
Admiral MH
15
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 15th Feb 2011 00:23
The plugin sounds good. I think audio recording would be nice to include. I like the FPS gains that you said, sounds impressive.

I think the main use of this plugin would be for recording the users program, then posting the video about the game. besides that I don't know what it could be used for.
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Feb 2011 00:33
I'll see what I can do about audio recording, although it's difficult to see how it would work as the recording speed may differ from the playback speed. (While recording, a frame is added each time you call "svUpdate", but you might call "svUpdate" at a different rate to the FPS you asked for)

Here are my thoughts:
- Have a separate mode which forces playback speed to match recording speed in which sound can be recorded. This would mean that any jerkiness in recording would also be present at playback time which would not otherwise happen.
- Record sound and then process it somehow to match the video speed, either changing its speed and then correcting the pitch or shortening silences.
- Record sound after recording the video, so it will match with the video playback speed.

[b]
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 15th Feb 2011 04:25
If you are going to build a video file, avi,mp4 etc.
record the audio separately and build the video file with the audio added after you have stopped the video recording, maybe.

I think allow audio recording at certain frame rates, say 30 & 60 fps.
If you want audio with your video, choose one of these rates.

Don't feel like you have to support every frame rate with audio.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 15th Feb 2011 19:31
This sounds like a good idea. I'd certainly buy this kind of plugin.

My signature is NOT a moderator plaything! Stop changing it!
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Feb 2011 19:55
If I'm going to go the whole way and add support for audio recording and video recording from both the screen and maybe webcams, as well as being able to edit videos and combine videos with sound, etc. then I'll have to increase the price (~£10), as this is quite a lot of work to do!

[b]
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th Feb 2011 14:28
I would buy for sure.

I was thinking of making a basic animation program to make 2D and 3D cut scenes for my games. I could definitely use this.

There is an avi plugin I downloaded somewhere but it's very limited.

Besides which you do provide an excellent amount of support (at least you have done on Box2D!)

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 16th Feb 2011 14:44 Edited at: 19th Feb 2011 01:13
This is how the API will work:


[b]
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Mar 2011 10:05
Any news on this Diggsey? I'm starting a "Movie Maker" for my new WIP and I could really use this plugin...

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Mar 2011 15:25
Just struggling to make the decoding part of the API flexible and easy to use while being consistent and compatible with the encoding part.

[b]
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Mar 2011 16:17
Glad to hear you're still working on it. I found a plugin that creates lossless avi but I wasn't sure about buying DarkVideo... any opinion whether DarkVideo is worth buying I've not heard much about it on the forums?

Or maybe I should wait for yours?

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Mar 2011 16:27
I don't believe DarkVideo has any recording functionality, just decoding and possibly encoding commands. I couldn't tell from the description if the encoding features were only in the stand-along encoder.

[b]
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Mar 2011 21:28
That's the impression I got. Thanks!

gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 11th Apr 2011 06:58
I was just wondering like others

how are things progressing ?

If a thought is Just a thought ~ so whats the main thought ?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Apr 2011 12:50
Yeah, me too. Could really use this for my cut-scene editor

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Apr 2011 15:54
I don't think I'll be able to finish this one, at least not imminently. There are problems with the license of a library I'm using which means I wouldn't be able to sell the plugin, and I just have too much on my plate at the moment to do it for free. There's also the overlap in certain features with DarkVideo which doesn't help.

If anyone with C++ knowledge wants to carry on where I left off I can send you the code, although it will probably require a bit of explaining for it to make sense. The important bit is getting the data from the screen fast enough and that's actually fairly simple.

[b]
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 11th Apr 2011 15:59
Quote: "I don't think I'll be able to finish this one, at least not imminently. There are problems with the license of a library I'm using which means I wouldn't be able to sell the plugin, and I just have too much on my plate at the moment to do it for free. There's also the overlap in certain features with DarkVideo which doesn't help."

Damn, that's a shame. Looks like I'll be reducing the capabilities I was hoping to add to my editor... shame

Quote: "If anyone with C++ knowledge wants to carry on where I left off I can send you the code, although it will probably require a bit of explaining for it to make sense. The important bit is getting the data from the screen fast enough and that's actually fairly simple."

How different from C# is C++? I know C#. I think I probably have a bit too much on my plate too though at the moment.

I wouldn't mind having the code to give it a try at some point though if that's OK? Never know when a window will open up...

D Ogre
22
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 11th Apr 2011 19:45 Edited at: 11th Apr 2011 21:21
I'm working on my own video plugin. It's not as sophisticated as Diggesy's, and it's in very very early development. ATM, my plugin will just write out DBPro images to an avi. I'm messing with the AVIFil32 library to output an avi. I planned to have my plugin allow you to merge the audio after the video was written out. It will offer video compression also.

@ Diggsey
What library are you using?

I'm still trying to learn DirectX 9. So, if you have any recommendations, tips, and pointers concerning screen and image capturing, I would appreciate it.
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 11th Apr 2011 23:58 Edited at: 12th Apr 2011 00:11
DarkVideo

http://www.deepcovesoftware.com/

DarkVIDEO is a self-contained movie encoder/playback solution exclusively for DarkBASIC Pro and DarkGDK,
targeted at anyone interested in adding fast movie playback into their game.
Built from the ground up to focus on speed and quality,
DarkVIDEO opens the gateway for high quality royalty and patent free movies but with a very low impact to your game.
Designed for ease of use and ease of integration,
DarkVIDEO makes adding movie functionality to your game a cinch. Coupled with a new MFC based encoder,
utilising DirectShow, you'll be up and running in no time.

basicly it compress a video sort of
it's still an avi but with the exstention name changed to
dvf

it loads a bit quicker

and it makes a dba file so dbp knows what to do with it

If a thought is Just a thought ~ so whats the main thought ?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Apr 2011 08:29
Quote: "I'm working on my own video plugin. It's not as sophisticated as Diggesy's, and it's in very very early development. ATM, my plugin will just write out DBPro images to an avi. I'm messing with the AVIFil32 library to output an avi. I planned to have my plugin allow you to merge the audio after the video was written out. It will offer video compression also."

That sounds great. I'd love to hear about it when you have something working. I have an AVI writing plugin from somewhere else here on the forum but it doesn't do compression.

@Resourceful, thanks yes I did consider DarkVideo but it would limit users of my Cut-Scene editor to people who own DV I am guessing.

gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 12th Apr 2011 08:40
baxslash

ya i would also think it would

too bad your project needs extra product file to make it work

umm what is the name of the product ?

If a thought is Just a thought ~ so whats the main thought ?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Apr 2011 08:52
Quote: "umm what is the name of the product ?"

You mean my Cut-Scene editor? It's called Take-1. It's open source too so it would also limit the number of people able to compile the project...

If you mean the AVI plugin I got it here

gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 12th Apr 2011 08:56
for baxslash and others

New MAKE AVI Plugin (beta) - make your own AVI files from DBPro!

http://forum.thegamecreators.com/?m=forum_view&t=75027&b=5

the main Reason I posted about the DarkVideo is so
others can know what it can and can't do

the one example video that comes with it
was 13 megs and reduced to 5 meg's

it was version 1.02 and it's 2.0
the layout changed a bit

and maybe a few changes but it dose what it dose

it would be nice to be able to play back a bad move a player makes
or a winning ending to a level

I know recording a set of moves to a file wile the game is being played

so the player can back up or see what they did wrong
is one thought

I know I read some ware in the forum about doing such
but it was at least a week back I read that

I've though and continue to look for things
to expand my understanding .. and it's been a real trip so far

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 12th Apr 2011 09:06
I tried to use the Take-1
i could not get it going as far as loading up a file

If a thought is Just a thought ~ so whats the main thought ?
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Apr 2011 10:52
Quote: "New MAKE AVI Plugin (beta) - make your own AVI files from DBPro!"

That's actually the same one I linked to just to avoid confusion

Quote: "I tried to use the Take-1
i could not get it going as far as loading up a file"

I'm working on a new menu at the moment and I've added a few more features. Look back in a few weeks and you should see an improvement. It should have been possible to load objects in the currently posted version but it was a very early version.

Frankly I was hoping a few people might want to get involved but the lack of interest from people wanting to help has left me just getting on with it on my own. Also I might be re-thinking the style of the game I'm making the editor for slightly which reduces the need for the 3D part of the editor somewhat. I'll probably be finishing "Take-2" first which will be an editing suite for adding effects etc.

Sorry for the long post in your thread Diggsey!

gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 13th Apr 2011 01:03
I was doing a search for avi

and found

Writing AVI Directly from darkbasic using blitzavi.dll

http://forum.thegamecreators.com/?m=forum_view&t=25495&b=6

the example just past mid way down the page works

when first run it ask for the compression to use

uncompressed works fine but using one of the other codex
I have produces a avi with a file size of 0 ;o(

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
16
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 3rd Jun 2011 02:56
I guess things are in limbo at this point ?

If a thought is Just a thought ~ so whats the main thought ?
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 3rd Jun 2011 03:35
When we have a file with size 0, that means that there is an internal problem of the program, although no error is given.I know that feeling

Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-10 17:39:16
Your offset time is: 2026-07-10 17:39:16