( search forums )
Challenge to all you programmers out there
Soldat Forums - Soldat Talk - General Discussions
King Bling
March 2, 2006, 12:06 am
Wouldn't it be great if a utility was made for converting demos into a playable mpeg or movie file? It would be easier to make clan promos or map walkthroughs as well as tests of that 707411Y 1337 m0D. Thats my challege to all you big big programmers

Chakra`
March 2, 2006, 12:13 am
Don't think thats strictly possible guv. A demo file is little more than a 'recording' of all the actions done 'within' soldat. Not an actual demostration within the file itself. Otherwise to do what you ask would be to have something that records and converts into mpeg live while the demo is playing ....which'd be a bit of a [CENSORED] on the processor.

n00bface
March 2, 2006, 12:16 am
if memory serves me right, diamond demo player has the option to extract the demo into BMPs which you can then use to turn into an AVI or an MPEG. That is the closest you will get to converting demos to video.

FliesLikeABrick
March 2, 2006, 12:54 am
demos aren't actually video files, they're just large sets of instructions to make soldat re-enact a game. It isn't possible to take these instructions and turn it into video

Swarmer
March 2, 2006, 1:46 am
It's possible. You can make a program that runs the demo at 200%, and it records it (like Fraps), and saves the resulting file at 50% speed. So basically, you could make a compiler, but not a converter.
It's the same concept as a good midi editor. When you normally save, it saves the midi file, which is a set of numbers and instructions that tells what notes to be played when. But if you export it as a mp3 file, it records the actual playback of it, although at a faster speed, which is later reduced.

mar77a
March 2, 2006, 1:58 am
^ exactly, but extracting a demo is not something you can do in the background.

bja888
March 2, 2006, 2:34 am
You could have a program the extracts the bitmaps then puts them in an avi.
Of course, the best way to achieve something like this is for MM to open source the Demo Format and run time rendering engine. I'm still pissed that one of the best demos I recorded got corrupted. I know its possible to fix it but I do not know how.

Swarmer
March 2, 2006, 2:35 am
Yeah, it'll take up a lot of computing power. But if it was made, and had a batch compiling function, where it would compile every demo in a folder to a seperate video, you could run it overnight and have all your demos converted. It would only take about 35-40 seconds or so for a 1 minute demo anyways.

I was planning on doing something like this, but instead of making a program, I just downloaded a macro recorder, which would record all of my actions and do them over and over. I never got around to doing them though.

Deleted User
March 2, 2006, 4:37 am
Can't you fraps a demo and F9 it?

FliesLikeABrick
March 2, 2006, 5:13 am
yes guys, but the point is that you cannot convert it directly from sdm to <video file>, which is what the original post was asking for

Koon
March 2, 2006, 5:17 am
I will be the first to make this wonderful demo converting application! Once i learn to program of course ;)

Deleted User
March 2, 2006, 7:16 am
 Quote:Originally posted by KoonI will be the first to make this wonderful demo converting application! Once i learn to program of course ;)


not if i beat u there first.....get my friend to do it and take al credit...jk lol...but exactly HOW would u do that?

DePhille
March 2, 2006, 9:43 am
Guys, don't waste your time on that , it isn't possible.

I tired to look for patterns in the demo file so I could cut out the X first seconds or minutes out of the demo and let it start from there, dunno anymore how that research ended heh :S. Maybe I should get back at it later.

What would be very useful is that MM improves the BMP script. I think it currently records every frame in Soldat, and that's way too much. Maybe there should be a parameter to set the fps to 30 or something. And if he laso adds a parameter to save the files as JPG , GIF or BMP it'll boost the speed alot I think.

Grtz , DePhille

rabidhamster
March 2, 2006, 12:32 pm
dephille, can't you just set it to play at 200% while extracting?

edit: lol, i'm a 747!

DePhille
March 2, 2006, 12:56 pm
rabidhamster: That won't make it faster if not slower.
The problem is that when you extract it saves every frame as a .bmp file.
So wether or not you increase the play speed it still has to save every frame as a .bmp file.

Grtz , DePhille

bja888
March 2, 2006, 7:42 pm
 Quote:Originally posted by DePhilleAnd if he laso adds a parameter to save the files as JPG , GIF or BMP it'll boost the speed alot I think.

Jpg and gif are smaller file sizes but you will have to convery it to a bmp then a jepg. So we are talking 30% loger on each frame.

DePhille
March 2, 2006, 8:54 pm
The frame that is captured doesn't necessarily have to be bmp at first. You just load the image data into the memory and then save it as .gif or .jpg . It doesn't have to write 800kb BMPs to the HD anymore (which also is a cause of the slow extraction) but instead it writes it to the memory first (Memory is way faster than the HD) and then saves a tiny 80Kb file on the HD (also 10x faster). The processor converts it to .gif or .jpg faster than the HD can write a 800KB file.

Grtz , DePhille

Dark_Noddy
March 9, 2006, 5:41 pm
Its very possible to make a sdm -> <video format>.. There are a few bimps along the road and ofcors the major one 'requiers the soldat source' :o I'd say fraps is the way to go :)

Deleted User
March 9, 2006, 11:25 pm
Ahem... It is not impossible, it can be done... though it cannot be an instant conversion; it is still possible. One way for example is automatically running the demo in a hidden window (with the extract BMP parameter) that wont show on the taskbar (All you VB Programmers should know how to do this one), then once that is done; convert the BMP's into AVI/MPG (There are free libraries that you can use to do this). And to speed this process up, you can send the F8 key to the screen once its started to play it in faster and still get the right amount of BMP's. Seems logical enough.

Pathos
March 10, 2006, 11:30 am
A lot of work for something that is already possible.

demos never seem to work for me ...

DeMo
March 16, 2006, 9:11 pm
No need to write a program for that.
Just tell Soldat to extract the demo to BMPs and them use bmp2avi (google it) to make the movie.
Further editing can be done with programs like Adobe Premiere, Windows Movie Maker, VirtualDUB and bla bla bla

a-4-year-old
March 17, 2006, 11:34 pm
 Quote:Originally posted by DeMoNo need to write a program for that.
Just tell Soldat to extract the demo to BMPs and them use bmp2avi (google it) to make the movie.
Further editing can be done with programs like Adobe Premiere, Windows Movie Maker, VirtualDUB and bla bla bla


what is it? /extracttobmps ?