Upvote Upvoted 37 Downvote Downvoted
demos.tf - Demo editor
posted in Projects
1
#1
0 Frags +

demos.tf now includes the a demo editor to perform some limited editing to demo files: https://demos.tf/edit

The editor currently comes with the following options:

  • pov unlock:

    Allows unlocking the camera in pov demos, allowing free camera movement as if it were an stv demo

  • demo cutting:

    Allows cutting/trimming the demo file down to a specific tick range.
    This can be used to remove the need to spend a long time seeking through the demo in game to record that one airshot 23 minutes into the game.

Although it usually works, editing, and especially cutting, is still experimental and the resulting demo files might be broken in any number of ways.
If you're experiencing issues with a cut demo, trying to set the start tick a few seconds earlier or later can sometimes helps to alleviate some issues.

demos.tf now includes the a demo editor to perform some limited editing to demo files: https://demos.tf/edit

The editor currently comes with the following options:

[list]
[*] [b]pov unlock[/b]:

Allows unlocking the camera in pov demos, allowing free camera movement as if it were an stv demo

[*] [b]demo cutting[/b]:

Allows cutting/trimming the demo file down to a specific tick range.
This can be used to remove the need to spend a long time seeking through the demo in game to record that one airshot 23 minutes into the game.

[/list]

Although it [i]usually[/i] works, editing, and especially cutting, is still experimental and the resulting demo files might be broken in any number of ways.
If you're experiencing issues with a cut demo, trying to set the start tick a few seconds earlier or later can sometimes helps to alleviate some issues.
2
#2
0 Frags +

unlocking pov?! This is amazing. I can't seem to download the demo I uploaded though after pressing edit.

unlocking pov?! This is amazing. I can't seem to download the demo I uploaded though after pressing edit.
3
#3
0 Frags +

It should automatically start the download once the processing is completed

It should automatically start the download once the processing is completed
4
#4
0 Frags +

Is processing complete when the processing text goes away? No downloads come for me

Is processing complete when the processing text goes away? No downloads come for me
5
#5
0 Frags +

Yes,

I'll look into adding a separate download button for cases where it doesn't start automatically

Yes,

I'll look into adding a separate download button for cases where it doesn't start automatically
6
#6
0 Frags +

This is awesome wtf

This is awesome wtf
7
#7
3 Frags +

- Fixed an issue where the editing would crash when trying to unlock pov on an stv demo
- It now shows if there was an error during editing instead of showing nothing

- Fixed an issue where the editing would crash when trying to unlock pov on an stv demo
- It now shows if there was an error during editing instead of showing nothing
8
#8
4 Frags +

- improved handling of some demos where the recording wasn't finished correctly, leading to a truncated demo

- improved handling of some demos where the recording wasn't finished correctly, leading to a truncated demo
9
#9
5 Frags +

This is really cool. Is there any chance in the future of having a local script version so it can parse a killstreaks.txt and auto trim every demo in a folder to 1000 or 2000 ticks before the relevant one?

This is really cool. Is there any chance in the future of having a local script version so it can parse a killstreaks.txt and auto trim every demo in a folder to 1000 or 2000 ticks before the relevant one?
10
#10
1 Frags +

When I unlock the pov, it seems to stick the camera at 0 0 0 and I can't move it even with drive.

When I unlock the pov, it seems to stick the camera at 0 0 0 and I can't move it even with drive.
11
#11
0 Frags +

Some demos that i edit do not work, when i download and try to load in via demoui, it returns no errors, its says on the console "Playing demo [demoname]" but the demo just dont play at all, it looks like it has 0 Ticks

Some demos that i edit do not work, when i download and try to load in via demoui, it returns no errors, its says on the console "Playing demo [demoname]" but the demo just dont play at all, it looks like it has 0 Ticks
12
#12
4 Frags +

This is very cool, not sure how actively you're developing new features like this but I wonder if it'd be possible to automatically trim to the start of matches -- similar to how P-REC started recording then. I tested uploading a pov demo (link) to the site and was actually able to see the metadata, players, logs, etc. Given the filename was from my in game tf2 recorder I was then able to look through my logs and find the equivalent STV (link) by looking at map/dates and then confirming because it shows the same players when you pull it up. But of course since I uploaded a POV demo with the in game recorder, it recorded the pregame, and that's reflected in the logs you see when the POV one is pulled up (see first link above). Basically, I'm thinking that you can probably automate the process I'm doing and look for the same players and same map and same date, and match the POV to the STV, and then automatically trim it (not sure if the POV demos with in game actually end at the end of the match config, but there should be some way to match up events and such).

TLDR: I think it should be possible to automatically trim POV demos by looking up corresponding STV demos on demos.tf, and it would be a really awesome feature if you could upload POV demos and have the site automatically trim them. If this feature would be too difficult for you to tackle I (or maybe someone else on this site, we have tons of compsci nerds lol) could at the very least look into it.

---

Another feature that would be really really useful would be if it was possible to upload POV demos to demos.tf directly and have proper support for them--currently it actually shows up in the same list of STV demos and there's no clear way to distinguish them--someone could download the POV demo I linked above thinking it was an STV.

Some important features:
1. The ability to upload privately, and have it only show up under your name (currently you can filter basedd on logs you're in, but there could probably just be a separate tab for your POV demos or something)
2. The ability to share a link to a privately uploaded demo (e.g., send to admins to review, or send to submit to a frag video, jump competition, etc.)

Some simple-ish extra features that would be nice:
3. The ability for people to make their own lists, for example you could go through and select all of your match demos for a given season and organize them
4. Ability to export a list or batch download files (e.g., all of your demos from one season, or from a LAN)

Some much more complex features:
5. The ability to automatically upload from in game, similar to STV auto uploading. This one I'm not even sure if it is possible, but it would be huge because it removes the human error component (and if somebody goes away on vacation and leaves their computer, it will automatically be uploaded)
- I was thinking about doing a simple script for this to upload to google drive, but then realized well if there's already an API (docs) for demos.tf, that would be much better. Only problem was the privacy--some people likely will not want their POV demos to be public. But adding a simple privacy option I think would make this viable, and allow someone like me to test out auto upload scripts.

The motivation for this is that it would make it significantly easier for people to upload and share demos for things like RGL demo checks (see https://www.teamfortress.tv/64762/a-thank-you-letter-to-rgl for context, basically a lot of people have been punished for missing demo checks now that P-REC doesn't work).
* Currently people generally upload to google drive/dropbox/etc., but this is difficult to organize, easy to mess up sharing privileges, and often times has people uploading .zips which leads to security issues
* Currently there is no way to see metadata, or even verify it's the right demo except by opening it in game and viewing it--though it could very well be the same players on the same map but not the match, etc. My guess is admins don't even look at a large number of the demos uploaded, which is not exactly great practice, but if it was easier to see metadata and view things at a glance, they probably would more.

This is very cool, not sure how actively you're developing new features like this but I wonder if it'd be possible to automatically trim to the start of matches -- similar to how P-REC started recording then. I tested uploading a pov demo ([url=https://demos.tf/1164727]link[/url]) to the site and was actually able to see the metadata, players, logs, etc. Given the filename was from my in game tf2 recorder I was then able to look through my logs and find the equivalent STV ([url=https://demos.tf/1149274]link[/url]) by looking at map/dates and then confirming because it shows the same players when you pull it up. But of course since I uploaded a POV demo with the in game recorder, it recorded the pregame, and that's reflected in the logs you see when the POV one is pulled up (see first link above). Basically, I'm thinking that you can probably automate the process I'm doing and look for the same players and same map and same date, and match the POV to the STV, and then automatically trim it (not sure if the POV demos with in game actually end at the end of the match config, but there should be some way to match up events and such).

TLDR: I think it should be possible to automatically trim POV demos by looking up corresponding STV demos on demos.tf, and it would be a really awesome feature if you could upload POV demos and have the site automatically trim them. If this feature would be too difficult for you to tackle I (or maybe someone else on this site, we have tons of compsci nerds lol) could at the very least look into it.

---

Another feature that would be really really useful would be if it was possible to upload POV demos to demos.tf directly and have proper support for them--currently it actually shows up in the same list of STV demos and there's no clear way to distinguish them--someone could download the POV demo I linked above thinking it was an STV.

Some important features:
1. The ability to upload privately, and have it only show up under your name (currently you can filter basedd on logs you're in, but there could probably just be a separate tab for your POV demos or something)
2. The ability to share a link to a privately uploaded demo (e.g., send to admins to review, or send to submit to a frag video, jump competition, etc.)

Some simple-ish extra features that would be nice:
3. The ability for people to make their own lists, for example you could go through and select all of your match demos for a given season and organize them
4. Ability to export a list or batch download files (e.g., all of your demos from one season, or from a LAN)

Some much more complex features:
5. The ability to automatically upload from in game, similar to STV auto uploading. This one I'm not even sure if it is possible, but it would be huge because it removes the human error component (and if somebody goes away on vacation and leaves their computer, it will automatically be uploaded)
- I was thinking about doing a simple script for this to upload to google drive, but then realized well if there's already an API ([url=https://demos.tf/api]docs[/url]) for demos.tf, that would be much better. Only problem was the privacy--some people likely will not want their POV demos to be public. But adding a simple privacy option I think would make this viable, and allow someone like me to test out auto upload scripts.

The motivation for this is that it would make it significantly easier for people to upload and share demos for things like RGL demo checks (see https://www.teamfortress.tv/64762/a-thank-you-letter-to-rgl for context, basically a lot of people have been punished for missing demo checks now that P-REC doesn't work).
* Currently people generally upload to google drive/dropbox/etc., but this is difficult to organize, easy to mess up sharing privileges, and often times has people uploading .zips which leads to security issues
* Currently there is no way to see metadata, or even verify it's the right demo except by opening it in game and viewing it--though it could very well be the same players on the same map but not the match, etc. My guess is admins don't even look at a large number of the demos uploaded, which is not exactly great practice, but if it was easier to see metadata and view things at a glance, they probably would more.
13
#13
5 Frags +

Ended up messing around with this for a few hours and made a simple GitHub repo with some scripts in case anyone's interested: https://github.com/elliottower/demostf_pov_autouploader/tree/master

I was able to get a working python script that matches the STV demo for a given POV, and fetches metadata, which I can definitely see being useful, though it currently just uses the date timestamp in the filename (rather than looking at the demo contents itself).

  • For the sake of using the in game recorder this should work well enough, but a better solution would be to actually inspect the metadata of the game (otherwise you can just rename any demo and trick it)
  • I figure the developers of demos.tf can do this better than I can anyways, as I've never even looked at demo data, and the python tooling for this seems limited -- though it should be possible by decompiling and using https://github.com/Source-Python-Dev-Team/Source.Python

I found two issues from the demos.tf side:

  • I tried out calculating the real start ticks, which I tried trimming with the editor (https://demos.tf/edit), and then uploading via https://demos.tf/upload, but it seems to have corrupted -- the duration went from `45:24` in the editor to `2579:53:21` in the uploader, when I trimmed off ten mins from it (pre-game ready up wait time). It then says error cannot upload demos longer than an hour.

  • I also found that the demo uploading API seems to be broken. I was able to do get requests but all post requests sent to https://api.demos.tf/upload has 404 errors, maybe your account has to have a specific flag to be able to upload via the API?

I also made a proof of concept script to monitor your demos folder and try to upload whenever a new file appears (and isn't being currently written, which tf2 does continually until the match is finished), so if the API issues above are fixed this could potentially be used by players -- though it wouldn't have privacy options, and it would spam demos.tf with uploads (the titles would be `na.serveme.tf #559357 - RED vs BLU - Cronjington Magoo` which I thought was fine though, if someone sees a demo with a specific player name as a hyphen they can probably guess it's not the regular STV)

Ended up messing around with this for a few hours and made a simple GitHub repo with some scripts in case anyone's interested: https://github.com/elliottower/demostf_pov_autouploader/tree/master

I was able to get a working python script that matches the STV demo for a given POV, and fetches metadata, which I can definitely see being useful, though it currently just uses the date timestamp in the filename (rather than looking at the demo contents itself). [list]
[*] For the sake of using the in game recorder this should work well enough, but a better solution would be to actually inspect the metadata of the game (otherwise you can just rename any demo and trick it)
[*] I figure the developers of demos.tf can do this better than I can anyways, as I've never even looked at demo data, and the python tooling for this seems limited -- though it should be possible by decompiling and using https://github.com/Source-Python-Dev-Team/Source.Python
[/list]


I found two issues from the demos.tf side:
[list]
[*] I tried out calculating the real start ticks, which I tried trimming with the editor (https://demos.tf/edit), and then uploading via https://demos.tf/upload, but it seems to have corrupted -- the duration went from `45:24` in the editor to `2579:53:21` in the uploader, when I trimmed off ten mins from it (pre-game ready up wait time). It then says error cannot upload demos longer than an hour.

[*] I also found that the demo uploading API seems to be broken. I was able to do get requests but all post requests sent to https://api.demos.tf/upload has 404 errors, maybe your account has to have a specific flag to be able to upload via the API?
[/list]

I also made a proof of concept script to monitor your demos folder and try to upload whenever a new file appears (and isn't being currently written, which tf2 does continually until the match is finished), so if the API issues above are fixed this could potentially be used by players -- though it wouldn't have privacy options, and it would spam demos.tf with uploads (the titles would be `na.serveme.tf #559357 - RED vs BLU - Cronjington Magoo` which I thought was fine though, if someone sees a demo with a specific player name as a hyphen they can probably guess it's not the regular STV)
14
#14
4 Frags +

I'm not really interested in making the site a place to upload POV demos. I have no problem with some POV demos being uploaded but if they get uploaded in large volumes I might have to implement some measures to keep the hosting sustainable.

bearodactylSome simple-ish extra features that would be nice:
3. The ability for people to make their own lists, for example you could go through and select all of your match demos for a given season and organize them
4. Ability to export a list or batch download files (e.g., all of your demos from one season, or from a LAN)

These sound reasonable and I might add them some day.

I'm not really interested in making the site a place to upload POV demos. I have no problem with some POV demos being uploaded but if they get uploaded in large volumes I might have to implement some measures to keep the hosting sustainable.

[quote=bearodactyl]
Some simple-ish extra features that would be nice:
3. The ability for people to make their own lists, for example you could go through and select all of your match demos for a given season and organize them
4. Ability to export a list or batch download files (e.g., all of your demos from one season, or from a LAN)
[/quote]

These sound reasonable and I might add them some day.
15
#15
2 Frags +

OK no worries then, I'll prolly just make some script to upload demos to google drive. It would be 12x as many demos if everyone did it so that is a large volume of extra hosting. This upcoming RGL LAN is requiring all of the players to record demos and upload them for the sake of making a frag video, and are just using google drive.

I think it would be cool to be able to use the demo viewer / demo metadata stuff on demos.tf somehow with POV demos but not actually hosting them to download, would it be possible to enable private uploads? Being able to look through quickly on the browser and view the killfeed and stuff like that is super useful (if the demo editor functionality is made good enough maybe these features could be incorporated into the same thing, basically being able to view and also quickly trim the demo in the browser and then download it)

OK no worries then, I'll prolly just make some script to upload demos to google drive. It would be 12x as many demos if everyone did it so that is a large volume of extra hosting. This upcoming RGL LAN is requiring all of the players to record demos and upload them for the sake of making a frag video, and are just using google drive.

I think it would be cool to be able to use the demo viewer / demo metadata stuff on demos.tf somehow with POV demos but not actually hosting them to download, would it be possible to enable private uploads? Being able to look through quickly on the browser and view the killfeed and stuff like that is super useful (if the demo editor functionality is made good enough maybe these features could be incorporated into the same thing, basically being able to view and also quickly trim the demo in the browser and then download it)
Please sign in through STEAM to post a comment.