This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[TF2] Match Recorder


Post New Thread Reply   
 
Thread Tools Display Modes
carbon
Junior Member
Join Date: May 2009
Location: Tampere, Finland
Old 09-24-2009 , 11:50   Re: [TF2] Match Recorder
Reply With Quote #11

I made a little bash script that can be run using crontab to process the demos without disrupting the possibly ongoing recording. This example compresses the demos and moves them to /home/user/public_html/demos/. The key thing in this is that it checks if the demo file is still in use by stv.

Code:
#!/bin/bash

# edit these. fuser can be located in /sbin/ or /bin/
TF_PATH=/home/<user>/tf2/orangebox/tf/
WWW_PATH=/home/<user>/public_html/demos/
FUSER_BIN=/bin/fuser


cd $TF_PATH

for file in $(ls | grep "\.dem")
do
        $FUSER_BIN $file >/dev/null 2>&1

        if [ $? -eq 1 ]
        then
                gzip $file
                mv $file.gz $WWW_PATH
        fi
done
Just save this to e.g. demo.sh and chmod it to +x. You can run it every ten minutes by using the following crontab line:
Code:
*/10 * * * * nice -n 19 /home/<user>/demo.sh >/dev/null 2>&1
This script can also be easily modified to upload the compressed file to a remote server by replacing the mv operation with the one you need (e.g. scp with key authentication).

Last edited by carbon; 09-25-2009 at 15:55. Reason: one tiny typo
carbon is offline
hansieil
Senior Member
Join Date: Aug 2009
Old 12-27-2009 , 11:48   Re: [TF2] Match Recorder
Reply With Quote #12

Where will the Files be saved?
hansieil is offline
Hawkeye-
Senior Member
Join Date: Jan 2009
Old 12-27-2009 , 12:24   Re: [TF2] Match Recorder
Reply With Quote #13

As recorded the Demo files should be saved in orangebox\tf folder (where your motd.txt file resides) and sport a .dem extension.
Hawkeye- is offline
pindab0ter
New Member
Join Date: May 2010
Old 05-10-2010 , 11:50   Re: [TF2] Match Recorder
Reply With Quote #14

Quote:
Originally Posted by carbon View Post
Yeah I experimented with that, but it turned out to be useless since almost no-one changed the default team name (or if they changed, it was to something like ":-D"). It's still possible to implement it by modifying TeamStateEvent function to track the name changes. The event structure holds the newname field.
I actually use this always. At the moment I actually run through my p-rec folder to look up the teamnames on the .dem files before I go to my FTP to download the STV demos.

Please implement this as well as the leaving player recognition
pindab0ter is offline
WiKer
Member
Join Date: Apr 2009
Old 06-06-2010 , 10:22   Re: [TF2] Match Recorder
Reply With Quote #15

Can you make a cvar, where i will chose a folder name (which will be located in "tf") and the demo will be recorder there?

Example:
match_recorder_dir "_demo_server1"

And all demos will be recorder and i will find them in folder ..\tf\_demo_server1"
WiKer is offline
slate_chris
New Member
Join Date: May 2010
Old 05-14-2011 , 05:49   Re: [TF2] Match Recorder
Reply With Quote #16

Although this kinda feels like necro'ing. Could anyone point me in the right direction, how i could implement that the name of the demo holds the teamnames? Someone else in this post mentionend that it would be nice if a new log file was started for each record. I've have already tried that by recompiling the plugin with &quot;log on&quot; and &quot;log off&quot; in the record_start and record_stop part, but the log files were of no use to me as the new logfile naturally didn't have the the jointeam and changerole lines. It would be awsome if that was somehow possible to archive though. -slate
slate_chris is offline
Shwan
Junior Member
Join Date: Aug 2010
Old 06-12-2011 , 01:30   Re: [TF2] Match Recorder
Reply With Quote #17

Recently I noticed that my server's demos (running matchrecorder) would only play a few minutes (or moments) before crashing tf2.

I then recorded a match using the tv_record command and watch it with no issues. This leads me to believe that somehow the demos are getting corrupted by matchrecorder.

Another thing to note is that the filesize for the demos recorded with matchrecorder are normal but for some reason they get to a certain point and crash.

demo recorded with math recorder: http://www.theshwan.com/vice/demos/vice_v_badv2.dem
demo recorded with tv_record: http://www.theshwan.com/vice/demos/testdemo.dem

Would love to see if it has happened to anyone else running match recorder and what we can do to fix this issue!

EDIT:

Upon further testing a teammate of mine discovered that the demo does not crash TF2 for him. Instead, all the players remain in their original spawn positions and proceed to shoot, jump, and seemingly kill things without ever leaving spawn. Furthermore, all the fighting that occured on the map happens in the proper locations (explosions, rockets, bullet tracers and whatnot). This seems to confirm the corrupted (or mis-recorded) demos which are produced from match recorder. Does this make sense to anyone? Which particular part of the plugin might be causing this issue?

Last edited by Shwan; 06-12-2011 at 02:03.
Shwan is offline
SuperRaWR
SourceMod Donor
Join Date: Jan 2010
Location: Sylvan Lake, Alberta, Ca
Old 06-12-2011 , 22:33   Re: [TF2] Match Recorder
Reply With Quote #18

Quote:
Originally Posted by Shwan View Post
Recently I noticed that my server's demos (running matchrecorder) would only play a few minutes (or moments) before crashing tf2.

I then recorded a match using the tv_record command and watch it with no issues. This leads me to believe that somehow the demos are getting corrupted by matchrecorder.

Another thing to note is that the filesize for the demos recorded with matchrecorder are normal but for some reason they get to a certain point and crash.

demo recorded with math recorder: http://www.theshwan.com/vice/demos/vice_v_badv2.dem
demo recorded with tv_record: http://www.theshwan.com/vice/demos/testdemo.dem

Would love to see if it has happened to anyone else running match recorder and what we can do to fix this issue!

This DOES use tv_record... See here:

Code:
Format(command, sizeof(command), "tv_record %s", filename);
 // Start recording
 ServerCommand(command);
__________________
[WDZ]SuperRaWR

I use event scripts.
SuperRaWR is offline
Send a message via Skype™ to SuperRaWR
Shwan
Junior Member
Join Date: Aug 2010
Old 06-13-2011 , 02:07   Re: [TF2] Match Recorder
Reply With Quote #19

Quote:
Originally Posted by SuperRaWR View Post
This DOES use tv_record... See here:

Code:
Format(command, sizeof(command), "tv_record %s", filename);
 // Start recording
 ServerCommand(command);
Then why can I play though the demo I made manually and the other one crashes? can you download the two and have a look?
Shwan is offline
SuperRaWR
SourceMod Donor
Join Date: Jan 2010
Location: Sylvan Lake, Alberta, Ca
Old 06-13-2011 , 10:50   Re: [TF2] Match Recorder
Reply With Quote #20

I did, and both seem to work fine for me, I left it running while I made some breakfast and came back, and it didn't crash.

I've been using this plugin for quite some time, and haven't had any issues with it.
__________________
[WDZ]SuperRaWR

I use event scripts.
SuperRaWR is offline
Send a message via Skype™ to SuperRaWR
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode