<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Automated Replay Detection and Multi-Stream Synchronization</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author role="corresp">
							<persName><roleName>BSc</roleName><forename type="first">Kevin</forename><surname>Mekul</surname></persName>
							<email>kmekul@edu.aau.at</email>
							<affiliation key="aff0">
								<orgName type="institution">Alpen-Adria-Universität Klagenfurt</orgName>
								<address>
									<country key="AT">Austria</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Automated Replay Detection and Multi-Stream Synchronization</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">ECAF793FFCB5D7DC910E80BDAFF9F0D7</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-23T20:14+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>This paper introduces an algorithm for automated replay detection in CS:GO tournaments. Firstly, it uses a content-based approach for replay identification in the commentator stream and then the metadata to synchronize them to the player streams. The provided metadata for events cannot be used for detecting events in the streams, because the timestamps of these events are very inaccurate and differ up to 40 seconds. Furthermore, the algorithm uses a content-based approach along with the synchronization data to detect the equivalent scenes in the matching player stream.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">INTRODUCTION</head><p>E-sports are competitions which are only held virtually via video games. These sports are becoming increasingly popular nowadays. One of these games is Counter-Strike: Global Offensive (CS:GO), which is a multiplayer first-person shooter game. The CS:GO World Championship tournament was placed in Katowice in 2018. Each game is played between two teams of five players. Such events produce an enormous amount of multimedia data and metadata. During the tournament, the multimedia data of each game is composed of the commentator stream and ten player streams. It is not possible to process the material manually and therefore Mediaeval 2019 defined one task: GameStory: The 2019 Video Game Analytics Challenge <ref type="bibr" target="#b1">[2]</ref>. The first part of this task is to find replays in the commentator stream and the second one to synchronize the streams and detect the replay scenes at the original player stream. A replay is a predefined scene of a player stream, which starts and ends with a logo in the commentator stream. Figure <ref type="figure" target="#fig_0">1</ref> shows this logo. The final goal is to run the implemented algorithm with the test dataset (video material of 03-03-2018) and submit up to three solutions. The processing of multimedia data was developed in Python in combination with OpenCV <ref type="bibr" target="#b0">[1]</ref> and the metadata preparation was implemented in Java. The detection approach is a content-based variant and the algorithm can be divided into three steps, but each step uses the interim result of the step before:</p><p>• Replay detection in the commentator stream • Processing the metadata • Scene detection in the player streams This subdivision is necessary, because the first step needs a lot of time, because the replay detection algorithm runs through the whole commentator stream and analyzes every frame.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">REPLAY DETECTION</head><p>The tournament the GameStory challenge focuses on ran its course over three days and there is video material of each gaming day, which includes the commentator stream and the player streams. Every player stream shows the perspective of a specific player. The commentator stream includes live scenes, replays of interesting events, statistics and much more. This video has a frame rate that differs from the player streams. Therefore, the algorithm adjusts the frame rate to 59 fps. This correction enables an acceptable basis for the following detection. According to detection speed, I resized the width to 450 pixels. In addition, the system converts color frames to gray scale images for further analysis.</p><p>A replay contains a specific scene with a pair of logo transitions and a sweeping off effect at the beginning and the end <ref type="bibr" target="#b3">[4]</ref>. This shot is detected and defined only once, and the algorithm can detect the starting and endpoint throughout the whole video.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Detecting replay start</head><p>The replay start point detection is always identical. In contrast, there are five variants of the replay end.</p><p>The detection of a starting point is a full frame comparison based on the structural similarity index, which OpenCV provides. If the score is higher or equal than the threshold of 0.99, the algorithm found the start logo. The next step in this process is adding a predefined number to the just found frame number, to get the first frame after the logo transition. After this step, the algorithm starts at the adapted frame number to check four regions of interest (ROIs).</p><p>The first ROI is the name of the current shown player. The second one is the small Intel-Logo at the right side of the frame. If a replay is running, this logo will not be displayed. The third ROI analyses the current health, which is a number from 100 down to 0. The algorithm uses this ROI to detect the kill of the currently shown player. The last ROI analyzes the time.</p><p>While detecting the replay starting point it is possible, that no replay is found after the start replay logo. Because of this reason, the algorithm checks the first and second ROI. If that scene is no replay, the found start frame can be deleted and the search process for the start logo begins again. If the frame difference limit is reached, the algorithm will stop the search for the ending logo. If a correct start point for a replay is found, the algorithm will check the replay end scenarios.</p><p>MediaEval'19, 27-29 October 2019, Sophia Antipolis, France K. Mekul</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Detecting replay end</head><p>The algorithm includes five end scenarios. The first three scenarios just stop the replay. The last two stop the current replay and start a new one. These five scenarios are:</p><p>• The standard stopping case for a replay is the logo transition at the end. This detection is the same as the start detection, only the adaptation of the frame number is different. The algorithm reduces the frame number with a predefined number. • A replay will stop if the current shown player is killed. This happens, when the health of a player reaches zero. The algorithm uses the L1-norm of the normalized reference and the ROI values. If the norm drops below the threshold value, the current shown player will be killed, and the replay will stop at this frame. • A hard shot, every pixel in the frame is black, stops the replay too. The black frame occurs after a normal frame and after the black one, a normal frame is shown again but from another scene. The algorithm detects this case with the OpenCV method absdiff and stops the replay. The next replay logo is not marked as a starting point, because it is the end of the prematurely stopped replay. • The algorithm for detecting a player change uses the first ROI and the structural similarity index. The found frame is the last of the current replay and the next one is the beginning frame of the new starting replay. • The system identifies a time jump based on the time ROI and compares the current time with the time from the 13th frame before. The results of replay detection are the frame numbers for begin and end of a replay and the shown player. The metadata processing uses these interim results.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">METADATA PROCESSING</head><p>The metadata processing uses the result from the detecting replay and generates a list with the roundbegin and next_round_begin frame numbers for the matching player stream. The Java program reads the replay_begin, replay_end and replay_source values from the commentator stream results and looks up the suitable match and round. After that, the algorithm uses the matching match and round to find the correct round_begin frame number of the player stream. This process uses the sync-points, but some rounds have no frame numbers. For that reason, it searches the metadata.csv for the specific day. This metadata is not usable because it is very inaccurate. As a result of using the metadata.csv the working time for the next step is longer. Fortunately, this metadata.csv was never used, because all detected replays are in rounds with sync-points.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">SOURCE DETECTION</head><p>The replay source detection is the last step of the algorithm and is implemented with Python and OpenCV. This step uses the round_begin numbers to start the detection.</p><p>The algorithm compares two ROIs. First, it checks the time of the found replay starting frame of the commentator stream with the current time of the player stream until it fits. If the times match, the middle region of the same frame is checked until the suitable frame The result of this step includes the replays of the commentator stream and the begin and end frame number of the accurate player stream.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">RESULTS AND DISCUSSION</head><p>The approach I have chosen was mainly based on content-based methods. Only the generation of the synchronization part uses another approach. A Python script and a groundtruth file for the training dataset was available to check and verify the algorithm.</p><p>The next step was to check the algorithm with the test dataset. All parameters and configurations are the same as in the implementation step with the training dataset. The described approach detects 39 replays for the test dataset and the possible matching source scenes for that. The organization group checked this with a Python script. Table <ref type="table" target="#tab_0">1</ref> shows the result.</p><p>This task is evaluated in 2 steps. Both, the found replays in the commentator stream and the found scenes in the player stream were checked. For the first step, the used methods are precision, recall and the balanced F1-score. For the second step an average overlap of the found sequence was computed. One detected replay is labeled with result 'None', because the video stream files of P7 and P10 shows in match 1 and round 1 to 4 the same player on that day.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: The replay logo</figDesc><graphic coords="1,342.24,155.26,191.68,107.77" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1 :</head><label>1</label><figDesc>Result: test dataset The algorithm does the same with the replay and frame of the commentator stream. The detection stops if the matching start and end frame in the player stream is detected or the next round begins. The time ROI has one disadvantage: the program must resize the time of the commentator stream in order to compare it with the time ROI of the player stream, because the time ROI has different size in the commentator and the player streams.</figDesc><table><row><cell cols="3">jc &gt;= precision recall</cell><cell>F1</cell><cell>avg. overlap</cell></row><row><cell>0.50</cell><cell>0.9744</cell><cell cols="2">0.8636 0.9157</cell><cell>0.7458</cell></row><row><cell>0.75</cell><cell>0.9487</cell><cell cols="2">0.8409 0.8916</cell><cell>0.7595</cell></row><row><cell>is found.</cell><cell></cell><cell></cell><cell></cell></row></table></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>ACKNOWLEDGMENTS</head><p>Special thanks to the organization group especially Mathias Lux and thanks to Michael Wutti for the provision of the synchronization points <ref type="bibr" target="#b2">[3]</ref>.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<monogr>
		<title level="m" type="main">OpenCV computer vision with python</title>
		<author>
			<persName><forename type="first">Joseph</forename><surname>Howse</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2013">2013</date>
			<publisher>Packt Publishing Ltd</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">GameStory Task at Media-Eval 2019</title>
		<author>
			<persName><forename type="first">Mathias</forename><surname>Lux</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Michael</forename><surname>Riegler</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Duc-Tien</forename><surname>Dang-Nguyen</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Pirker</forename><surname>Johanna</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Martin</forename><surname>Potthast</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Pål</forename><surname>Halvorsen</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of MediaEvel</title>
				<meeting>MediaEvel</meeting>
		<imprint>
			<date type="published" when="2019">2019. 2019</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Automated Killstreak Extraction in CS: GO Tournaments</title>
		<author>
			<persName><forename type="first">Michael</forename><surname>Wutti</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of MediaEvel</title>
				<meeting>MediaEvel</meeting>
		<imprint>
			<date type="published" when="2018">2018. 2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Highlight summarization in sports video based on replay detection</title>
		<author>
			<persName><forename type="first">Zhao</forename><surname>Zhao</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Shuqiang</forename><surname>Jiang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Qingming</forename><surname>Huang</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Guangyu</forename><surname>Zhu</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">IEEE international conference on multimedia and expo</title>
				<imprint>
			<publisher>IEEE</publisher>
			<date type="published" when="2006">2006. 2006</date>
			<biblScope unit="page" from="1613" to="1616" />
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
