Jump King is a challenging climbing-platformer. The speedrun, however, takes under 5 minutes of time which makes it possible to perform quick feature extraction from the speedrun videos.
In this project I decode the raw videos of a game to extract useful features, such as current screen (i.e. stage or background) and king's position. As a result, I obtain the heatmap from the video data alone. The data can be used for further analysis such as the number of falls made on each stage so that the players would know the areas which they need to train more.
The speedrun video should be 30fps, 60fps does not lead to an increase in quality
I used this speedrun to manually extract screens from the game
-
pip install -r requirements.txt
-
Run
python3 download_video.py -l "https://youtu.be/FZ0fMGuJTLI" -o speedrun_side
to download the speedrun video to thedata
directory. This video will be used to map other videos. -
(Optional) Run
python3 map_screens.py --video data/speedrun_side.mp4
and manually map the screens.- The repository already includes the file produced at this stage.
- press
d
to map the start andd
again to map the end of the screen
-
Run
python3 screen_to_frames.py --video data/speedrun_side.mp4
to obtain thedata/screen_to_frame.p
. This file stores the averaged frame for each screen for screen classification task in the next steps -
Run
python3 heatmap.py --video path_to_video.mp4
to make the heatmap of the jump king for any other video
See full image