-
Notifications
You must be signed in to change notification settings - Fork 101
Parsing Broadcasts
Markus edited this page May 26, 2019
·
3 revisions
Work In Progress ...
This page lists some of my discoveries while trying to parse broadcast data (https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Broadcast).
I attempted to create a fake demo file with the broadcast data. To get the data I used https://github.com/BeepFelix/csgo-broadcast
node index.js
- In game console:
tv_enable 1; tv_broadcast_url "http://localhost:8181/broadcast"
- Go into map
map de_dust2
- Start recording a demo and broadcasting:
tv_record bc-test; tv_broadcast 1
- The header needs to be created manually (I copied the first 1077 bytes from a working demo - this also includes the signon command)
- It looks like the first 6 bits from
0_start
need to be removed, after that follows a net message chunk. First I thought this wasSeqNrIn
/SeqNrOut
, but it's only 6 instead of 8 bits so I'm not sure -
p.bitReader.Skip((152 + 4 + 4) << 3)
inParser.parsePacket
needs to be skipped because none of the packets have aCommandInfo
andSeqNrIn
/SeqNrOut
. - Now we can just
cat 0_start 1_full 1_delta 2_full 2_delta ... n_full n_delta
Or just use this command: { head -c 1077 ~/path/to/demo_FROM_CORRECT_MAP.dem; tail -c +6 0_start; for i in $(ls *_full | cut -c 1); do cat ${i}_full ${i}_delta; done; } > fake.dem
and (for now) the broadcast-parsing
branch which can read the generated demo with missing CommandInfo
etc.