Is there a simple, automated way to create a video from an STV demo file? I want to avoid any manual editing and I will be working with POV demos only. I don't intend to upload the videos anywhere, so video quality really isn't important to me.
Alternatively, does anyone know what kind of information one could get from a demo file? For example could I somehow learn stuff like the outcome of a match, the number of kills/deaths of a player, the position of a player on the map or the entities present in the field of vision of the player at a specific time? I imagine the first two examples should be easy enough to get, but stuff like the last two is what I'm really after.
So far I found that the Source engine simply dumps the network packets into the demo file (https://developer.valvesoftware.com/wiki/DEM_Format), but analyzing those packets is proving to be more difficult than I thought and I'm not sure how far I can get this way.
Is there a simple, automated way to create a video from an STV demo file? I want to avoid any manual editing and I will be working with POV demos only. I don't intend to upload the videos anywhere, so video quality really isn't important to me.
Alternatively, does anyone know what kind of information one could get from a demo file? For example could I somehow learn stuff like the outcome of a match, the number of kills/deaths of a player, the position of a player on the map or the entities present in the field of vision of the player at a specific time? I imagine the first two examples should be easy enough to get, but stuff like the last two is what I'm really after.
So far I found that the Source engine simply dumps the network packets into the demo file (https://developer.valvesoftware.com/wiki/DEM_Format), but analyzing those packets is proving to be more difficult than I thought and I'm not sure how far I can get this way.
To create a video from an STV file you'd most likely have to sit in the stv manually and record it with fraps/dxtory or something. And no, demos literally only record the POV of a player and you can't really get any more data than you could just watching it.
To create a video from an STV file you'd most likely have to sit in the stv manually and record it with fraps/dxtory or something. And no, demos literally only record the POV of a player and you can't really get any more data than you could just watching it.
BuschmasterACRAnd no, demos literally only record the POV of a player and you can't really get any more data than you could just watching it.
What does it mean to "literally only record the POV"? Do you mean it only records what's on the player's screen? And what sort of data are we talking about?
Let's imagine the following simple scenario: an enemy soldier shoots a rocket at you from behind (you don't see him). If what you say is true and you play this demo, there would be no way for the game to know that you received any damage. But you certainly do get this information: damage, projectiles, explosions, deaths of team mates or enemies etc. At the minimum, the demo file must contain some time-based events (the rocket was fired at some moment in time from some position in some direction).
[quote=BuschmasterACR]And no, demos literally only record the POV of a player and you can't really get any more data than you could just watching it.[/quote]
What does it mean to "literally only record the POV"? Do you mean it only records what's on the player's screen? And what sort of data are we talking about?
Let's imagine the following simple scenario: an enemy soldier shoots a rocket at you from behind (you don't see him). If what you say is true and you play this demo, there would be no way for the game to know that you received any damage. But you certainly do get this information: damage, projectiles, explosions, deaths of team mates or enemies etc. At the minimum, the demo file must contain some time-based events (the rocket was fired at some moment in time from some position in some direction).
There isn't an automated way or a way outside of the game to play back the demo files.
A few methods you could use:
- Use lawena recording tool to playback the demo and record video as TGA with WAV audio, then using virtualdub to convert to AVI and compressing from there
- Use a video recording software like Fraps while playing back the demo in game
- Use a streaming service like twitch to stream the service, saving the vod after.
Unfortunately (And trust me, I looked) there's no external programs to playback demo files, STV or POV :(
Edit: What type of information are you looking to extract if not recording the video?
There isn't an automated way or a way outside of the game to play back the demo files.
A few methods you could use:
[list]
[*] Use lawena recording tool to playback the demo and record video as TGA with WAV audio, then using virtualdub to convert to AVI and compressing from there
[*] Use a video recording software like Fraps while playing back the demo in game
[*] Use a streaming service like twitch to stream the service, saving the vod after.
[/list]
Unfortunately (And trust me, I looked) there's no external programs to playback demo files, STV or POV :(
Edit: What type of information are you looking to extract if not recording the video?
So I looked into this a long while back, and the short answer is no. Unless someone's made a breakthrough lately (I haven't been keeping up), nobody but Valve really knows what's going on inside demo files. It appears to be a series of serialized packet-like information, and is very cryptic. Reverse engineering wouldn't yield too many benefits for most people, especially the type of people who would put the effort in (ie. hackers), so it probably won't come along any time soon.
So I looked into this a long while back, and the short answer is no. Unless someone's made a breakthrough lately (I haven't been keeping up), nobody but Valve really knows what's going on inside demo files. It appears to be a series of serialized packet-like information, and is very cryptic. Reverse engineering wouldn't yield too many benefits for most people, especially the type of people who would put the effort in (ie. hackers), so it probably won't come along any time soon.
The closest thing to what I need was linked on this post. It's an old program that can extract and play audio from TF2 demos. I managed to get the code to compile (Java's my choice of language so I was really happy with it). Sadly, this software is quite outdated and doesn't seem to work with the new network protocol that Valve uses. In theory, it should be easy to update it if someone had managed to document the new Source header structures.
I don't have any specific goal in mind yet, but I'm trying to think of a way to do batch-processing on demo files in order to extract useful information from them. The practical use of this could be an analysis of the matches, predicting future outcomes, assessing the evolution of a player's skill throughout the season etc. Come to think of it, I could maybe get most of the info I need from TF2logs.com. Now I just need to figure out a way to easily create a unified database from there.
The closest thing to what I need was linked on [url=http://gaming.stackexchange.com/questions/20224/is-there-any-way-to-extract-voice-chat-audio-from-tf2-source-demo-recordings]this post[/url]. It's an old program that can extract and play audio from TF2 demos. I managed to get the code to compile (Java's my choice of language so I was really happy with it). Sadly, this software is quite outdated and doesn't seem to work with the new network protocol that Valve uses. In theory, it should be easy to update it if someone had managed to document the new Source header structures.
I don't have any specific goal in mind yet, but I'm trying to think of a way to do batch-processing on demo files in order to extract useful information from them. The practical use of this could be an analysis of the matches, predicting future outcomes, assessing the evolution of a player's skill throughout the season etc. Come to think of it, I could maybe get most of the info I need from TF2logs.com. Now I just need to figure out a way to easily create a unified database from there.
LexxBuschmasterACRAnd no, demos literally only record the POV of a player and you can't really get any more data than you could just watching it.
What does it mean to "literally only record the POV"? Do you mean it only records what's on the player's screen? And what sort of data are we talking about?
Let's imagine the following simple scenario: an enemy soldier shoots a rocket at you from behind (you don't see him). If what you say is true and you play this demo, there would be no way for the game to know that you received any damage. But you certainly do get this information: damage, projectiles, explosions, deaths of team mates or enemies etc. At the minimum, the demo file must contain some time-based events (the rocket was fired at some moment in time from some position in some direction).
Yeah what Busch says is actually incorrect. Pov demos don't record as much as an stv demo, as in they don't record stuff happening far away and outside your pov, but if somebody is behind you, that is recorded. The biggest limitation of pov demos is that they don't allow you to see yourself while using the drive or smooth commands. You can see yourself if you use the thirdperson and cam_ideax commands.
As for what you're trying to do it seems that the info you want could easily be extracted from log files.
Also I'm not sure if this is anything, but Jimbomcb found a way to extract stv information to a web gl video a long time ago. https://www.youtube.com/watch?v=isGf63qiisM EDIT: looks like this is actually only a video by Jombo, he didn't write the code.
I don't really know anything about this stuff so this could be completely unrelated to what you are trying to accomplish, but it's something.
[quote=Lexx][quote=BuschmasterACR]And no, demos literally only record the POV of a player and you can't really get any more data than you could just watching it.[/quote]
What does it mean to "literally only record the POV"? Do you mean it only records what's on the player's screen? And what sort of data are we talking about?
Let's imagine the following simple scenario: an enemy soldier shoots a rocket at you from behind (you don't see him). If what you say is true and you play this demo, there would be no way for the game to know that you received any damage. But you certainly do get this information: damage, projectiles, explosions, deaths of team mates or enemies etc. At the minimum, the demo file must contain some time-based events (the rocket was fired at some moment in time from some position in some direction).[/quote]
Yeah what Busch says is actually incorrect. Pov demos don't record as much as an stv demo, as in they don't record stuff happening far away and outside your pov, but if somebody is behind you, that is recorded. The biggest limitation of pov demos is that they don't allow you to see yourself while using the drive or smooth commands. You can see yourself if you use the thirdperson and cam_ideax commands.
As for what you're trying to do it seems that the info you want could easily be extracted from log files.
Also I'm not sure if this is anything, but Jimbomcb found a way to extract stv information to a web gl video a long time ago. https://www.youtube.com/watch?v=isGf63qiisM EDIT: looks like this is actually only a video by Jombo, he didn't write the code.
I don't really know anything about this stuff so this could be completely unrelated to what you are trying to accomplish, but it's something.
http://www.igmdb.org/?page=render
you can upload tf2 povs here and the site'll render them for you. only to youtube though (for non-donators); Hope that'll serve your needs
http://www.igmdb.org/?page=render
you can upload tf2 povs here and the site'll render them for you. only to [url=https://www.youtube.com/playlist?list=UUTsefzdfIxl13X10sJ3cFTQ]youtube[/url] though (for non-donators); Hope that'll serve your needs