Difference between revisions of "Thwimp"

From Custom Mario Kart
Jump to navigation Jump to search
m (Consistency)
Line 1: Line 1:
 
{| class="textbox float-right grid"
 
{| class="textbox float-right grid"
 
|+ Thwimp
 
|+ Thwimp
| colspan=2 style="text-align:center" | [[file:Thwimp_Logo.png]]
+
| colspan=2 style="text-align:center" | [[File:Thwimp_Logo.png]]
 
|-
 
|-
 
! Author:
 
! Author:
| [[user:MrTamkis|MrTamkis]]
+
| [[User:MrTamkis|MrTamkis]]
 
|-
 
|-
 
! Operating Systems:
 
! Operating Systems:
 
| Windows
 
| Windows
 +
|-
 +
! Programming language:
 +
| Visual Basic
 
|-
 
|-
 
! Software Type:
 
! Software Type:
| THP decoder and encoder toolset.
+
| Decoder and encoder
 
|-
 
|-
 
! File Formats:
 
! File Formats:
| [[THP]], MP4, WAV, BMP, JPG
+
|  
 +
* [[THP]]
 +
* MP4
 +
* WAV
 +
* BMP
 +
* JPG
 
|-
 
|-
 
! Current Version:
 
! Current Version:
| v1.1, 2019-01-07
+
| v1.1
 +
|-
 +
! Date of Release:
 +
| 2019-01-07
 
|-
 
|-
 
! Website:
 
! Website:
Line 22: Line 33:
 
|-
 
|-
 
! Source Code:
 
! Source Code:
| [https://github.com/Tamk1s/Thwimp Github Source Code]
+
| [https://github.com/Tamk1s/Thwimp GitHub]
 
|-
 
|-
 
! User's Manual:
 
! User's Manual:
| [https://github.com/Tamk1s/Thwimp/blob/master/README.md Github Manual]
+
| [https://github.com/Tamk1s/Thwimp/blob/master/README.md GitHub Manual]
 
 
 
|-
 
|-
 
! Downloads:
 
! Downloads:
Line 35: Line 45:
 
|}
 
|}
  
'''Thwimp''' is a tool for handling [[THP]] files within Mario Kart Wii, especially those used in the menus.
+
'''Thwimp''' is a tool for handling [[THP]] files within [[Mario Kart Wii]], especially those used in the menus.
  
 
== Introduction ==
 
== Introduction ==
 
+
'''Thwimp''' is a Windows utility which allows users to easily view, rip and encode Nintendo THP video files for Mario Kart Wii (and for other [[GCN]]/[[Wii]] games, to an extent). Written in Visual Basic, the Thwimp application calls some FOSS and other command line tools '''(not included)''' "from arms length" via the Command Prompt to perform its tasks.
'''Thwimp''' is a Windows utility which allows users easily to view, to rip, and to encode Nintendo [[THP]] video files for Mario Kart Wii (and for other GCN/Wii games, to an extent). Written in Visual Basic, the Thwimp application calls some FOSS and other command line tools '''(not included)''' "from arms length" via the Command Prompt to perform its tasks.
 
 
 
  
 
'''Specifically, Thwimp uses:'''
 
'''Specifically, Thwimp uses:'''
  
* [https://www.ffmpeg.org/ FFMPEG] for video processing
+
* [https://www.ffmpeg.org FFMPEG], for video processing.
* [https://www.ffmpeg.org/ FFPlay] for THP playback
+
* [https://www.ffmpeg.org FFPlay], for THP playback.
* [https://www.irfanview.com/ IrfanView] for image conversion
+
* [https://www.irfanview.com IrfanView], for image conversion.
* THPConv '''(definitely not included)''' for encoding JPG frames + wav file into THP videos
+
* THPConv '''(definitely not included)''', for encoding JPG frames + WAV files into THP videos.
 
 
  
 
Thwimp can show the hard-coded information about how each THP file is formatted in Mario Kart Wii. Thwimp can also view Mario Kart Wii's THP files, as well as convert them to everyday video files. It can crop the THP video files to a particular subvideo cell and time period, and then convert them to MP4 (H.264 codec) video files, to WAV files (for videos with audio), and padding to BMP files.
 
Thwimp can show the hard-coded information about how each THP file is formatted in Mario Kart Wii. Thwimp can also view Mario Kart Wii's THP files, as well as convert them to everyday video files. It can crop the THP video files to a particular subvideo cell and time period, and then convert them to MP4 (H.264 codec) video files, to WAV files (for videos with audio), and padding to BMP files.
 
  
 
The THP video files for menus in Mario Kart Wii tend to be an array of multiple subvideo cells inside, with each cell playing back several other videos (multiplicities). As required by the file format specification, THP video files must have their dimensions be a multiple of 16px. Often times the size of the subvideo array will not be enough to meet the specification, so padding is added to the bottom of the THP video. This padding is not only used to meet the specification, but is used for control information. For example, some of the videos shown during menus will have a white rectangle move at integer positions at each multiplicity within the padding area. This white rectangle controls which row in a menu is highlighted during THP playback.
 
The THP video files for menus in Mario Kart Wii tend to be an array of multiple subvideo cells inside, with each cell playing back several other videos (multiplicities). As required by the file format specification, THP video files must have their dimensions be a multiple of 16px. Often times the size of the subvideo array will not be enough to meet the specification, so padding is added to the bottom of the THP video. This padding is not only used to meet the specification, but is used for control information. For example, some of the videos shown during menus will have a white rectangle move at integer positions at each multiplicity within the padding area. This white rectangle controls which row in a menu is highlighted during THP playback.
  
 
+
Thwimp can intelligently handle audio, the subvideo array, multiplicity, and padding/control information when encoding THP files to replace the ones in-game. It does this by accepting appropriately named, input MP4 video files for each subvideo cell in the array, and for each multiplicity. It will also accept a WAV audio file, and BMP image frames for each multiplicity's padding/control signal as needed. After reading the input files, Thwimp will intelligently process and splice all of the files together appropriately in order to create a high-quality, properly formatted THP video replacement file.
Thwimp can intelligently handle audio, the subvideo array, multiplicity, and padding/control information when encoding THP files to replace ones in-game. It does this by accepting appropriately named, input mp4 video files for each subvideo cell in the array, and for each multiplicity. It will also accept a WAV audio file, and BMP image frames for each multiplicity's padding/control signal as needed. After reading the input files, Thwimp will intelligently process and splice all of the files together appropriately in order to create a high-quality, properly formatted THP video replacement file!
 
 
 
  
 
== Main Features ==
 
== Main Features ==
 
+
* '''View the hard-coded stat information for each THP file in the original Mario Kart Wii game:'''
 
+
** Edit this application's data files in order to support THP files from<br>other Wii/GCN games that use THPs similarly to Mario Kart Wii (to an extent).
* '''View the hard-coded stat information for the each THP file in the original Mario Kart Wii game.'''
+
* '''Playback THP files from the original game.'''
** Edit this application's data files in order to support THP files from<br>other Wii/GCN games that use THPs similarly to Mario Kart Wii (to an extent)
+
* '''Convert THP files into normal video files:'''
 
+
** Rip a particular subvideo/multiplicity within the THP file:
 
+
*** Crop video to a particular size relative to a particular position.
* '''Playback THP files from the original game'''
+
*** Clip video to a particular frame range/multiplicity.
 
+
*** Rip each unique frame for padding from the multiplicities as BMP image files.
 
+
** Convert video stream in THP file to MP4 (H.264 encoded).
* '''Convert THP files into normal video files'''
+
** Convert audio stream in THP file to WAV file.
** Rip a particular subvideo/multiplicity within the THP file
+
* '''Encode new, replacement THP files:'''
*** Crop video to a particular size relative to a particular position
+
** Transform individual input files into a final THP video:
*** Clip video to a particular frame range/multiplicity
+
*** Select individual MP4 input video files for each subvideo cell/multiplicity.
*** Rip each unique frame for padding from the multiplicities as BMP image files
+
*** Input a WAV input file for sound.
** Convert video stream in THP file to MP4 (H.264 encoded)
+
*** Input unique BMP frames for each multiplicity for padding.
** Convert audio stream in THP file to WAV file
+
** Adjust the JPG compression quality for frames in the final THP file:
 
+
*** Use this to create a balance between quality and bandwidth speed, to prevent stuttering for THP playback on real hardware.
 
+
** Limit each subvideo cell for all multiplicities to an exact frame count:
* '''Encode new, replacement THP files'''
+
*** Used to truncate the subvideo length to an exact frame count, if some of the subvideos' length > target limit.
** Transform individual input files into a final THP video
 
*** Select individual MP4 input video files for each subvideo cell/multiplicity
 
*** Input a WAV input file for sound
 
*** Input unique BMP frames for each multiplicity for padding
 
** Adjust the JPG compression quality for frames in the final THP file
 
*** Use this to create a balance between quality and bandwidth speed, to prevent stuttering for THP playback on real hardware
 
** Limit each subvideo cell for all multiplicities to an exact frame count
 
*** Used to truncate the subvideo length to an exact frame count, if some of the subvideos' length > target limit
 
  
  
 
== Usage ==
 
== Usage ==
 
 
Please read the '''[https://github.com/Tamk1s/Thwimp/blob/master/README.md manual]''' for full usage of the application.
 
Please read the '''[https://github.com/Tamk1s/Thwimp/blob/master/README.md manual]''' for full usage of the application.
  
Line 98: Line 93:
 
* [https://www.irfanview.com/ IrfanView 32-bit]
 
* [https://www.irfanview.com/ IrfanView 32-bit]
 
* THPConv
 
* THPConv
 
  
 
== Media ==
 
== Media ==
Line 106: Line 100:
 
File:Thwimp_Playback_BCS.jpg|THP Playback of battle_course_select.thp
 
File:Thwimp_Playback_BCS.jpg|THP Playback of battle_course_select.thp
 
</gallery>
 
</gallery>
{{youtube-box||WMLOtY16AtA|v1.1 Update (new THP Viewer/Decoder features)|height=300}}
+
{{youtube-box|tutorial|WMLOtY16AtA|v1.1 Update (new THP Viewer/Decoder features)|height=300}}
{{youtube-box||IINyrm6pJBg|v1.0 Release/Tutorial|height=300}}
+
{{youtube-box|tutorial|IINyrm6pJBg|v1.0 Release/Tutorial|height=300}}
 
 
 
 
  
 
== Version History ==
 
== Version History ==
Line 124: Line 116:
 
| v1.1
 
| v1.1
 
| 2019-01-07
 
| 2019-01-07
|
+
| Update:
* 1st update
+
* Bug fixes:
** '''Bugfixes'''
+
** Fixed THP Encoding framerate bug.
*** Fixed THP Encoding framerate bug
+
** Fixed bug with ripping control signal frames from<br>battle_cup_select.thp being off by one multiplicity.
*** Fixed bug with ripping control signal frames from<br>battle_cup_select.thp being off by one multiplicity
+
* Enhancements:
** '''Enhancements'''
+
** Refactored THP Viewer/Ripper UX with the ability to rip individual subvideo cells/multiplicities.
*** Refactored THP Viewer/Ripper UX with the ability to rip individual subvideo cells/multiplicities.
+
* Added this CTWiiki page.
** Added this MKWiiki page
 
 
|}
 
|}
  
 
{{User-MrTamkis-Link}}
 
{{User-MrTamkis-Link}}
 
[[Category:Software]]
 
[[Category:Software]]

Revision as of 13:35, 8 January 2019

Thwimp
Thwimp Logo.png
Author: MrTamkis
Operating Systems: Windows
Programming language: Visual Basic
Software Type: Decoder and encoder
File Formats:
  • THP
  • MP4
  • WAV
  • BMP
  • JPG
Current Version: v1.1
Date of Release: 2019-01-07
Website: EagleSoft Ltd
Source Code: GitHub
User's Manual: GitHub Manual
Downloads: Thwimp

FFMPEG
IrfanView 32-bit
THPConv

Thwimp is a tool for handling THP files within Mario Kart Wii, especially those used in the menus.

Introduction

Thwimp is a Windows utility which allows users to easily view, rip and encode Nintendo THP video files for Mario Kart Wii (and for other GCN/Wii games, to an extent). Written in Visual Basic, the Thwimp application calls some FOSS and other command line tools (not included) "from arms length" via the Command Prompt to perform its tasks.

Specifically, Thwimp uses:

  • FFMPEG, for video processing.
  • FFPlay, for THP playback.
  • IrfanView, for image conversion.
  • THPConv (definitely not included), for encoding JPG frames + WAV files into THP videos.

Thwimp can show the hard-coded information about how each THP file is formatted in Mario Kart Wii. Thwimp can also view Mario Kart Wii's THP files, as well as convert them to everyday video files. It can crop the THP video files to a particular subvideo cell and time period, and then convert them to MP4 (H.264 codec) video files, to WAV files (for videos with audio), and padding to BMP files.

The THP video files for menus in Mario Kart Wii tend to be an array of multiple subvideo cells inside, with each cell playing back several other videos (multiplicities). As required by the file format specification, THP video files must have their dimensions be a multiple of 16px. Often times the size of the subvideo array will not be enough to meet the specification, so padding is added to the bottom of the THP video. This padding is not only used to meet the specification, but is used for control information. For example, some of the videos shown during menus will have a white rectangle move at integer positions at each multiplicity within the padding area. This white rectangle controls which row in a menu is highlighted during THP playback.

Thwimp can intelligently handle audio, the subvideo array, multiplicity, and padding/control information when encoding THP files to replace the ones in-game. It does this by accepting appropriately named, input MP4 video files for each subvideo cell in the array, and for each multiplicity. It will also accept a WAV audio file, and BMP image frames for each multiplicity's padding/control signal as needed. After reading the input files, Thwimp will intelligently process and splice all of the files together appropriately in order to create a high-quality, properly formatted THP video replacement file.

Main Features

  • View the hard-coded stat information for each THP file in the original Mario Kart Wii game:
    • Edit this application's data files in order to support THP files from
      other Wii/GCN games that use THPs similarly to Mario Kart Wii (to an extent).
  • Playback THP files from the original game.
  • Convert THP files into normal video files:
    • Rip a particular subvideo/multiplicity within the THP file:
      • Crop video to a particular size relative to a particular position.
      • Clip video to a particular frame range/multiplicity.
      • Rip each unique frame for padding from the multiplicities as BMP image files.
    • Convert video stream in THP file to MP4 (H.264 encoded).
    • Convert audio stream in THP file to WAV file.
  • Encode new, replacement THP files:
    • Transform individual input files into a final THP video:
      • Select individual MP4 input video files for each subvideo cell/multiplicity.
      • Input a WAV input file for sound.
      • Input unique BMP frames for each multiplicity for padding.
    • Adjust the JPG compression quality for frames in the final THP file:
      • Use this to create a balance between quality and bandwidth speed, to prevent stuttering for THP playback on real hardware.
    • Limit each subvideo cell for all multiplicities to an exact frame count:
      • Used to truncate the subvideo length to an exact frame count, if some of the subvideos' length > target limit.


Usage

Please read the manual for full usage of the application.

You will need the following applications installed, and point to their installation paths as necessary in the Options tab:

Media

v1.1 Update (new THP Viewer/Decoder features)
v1.0 Release/Tutorial

Version History

Version Date of release Information
v1.0 2018-10-24 First release
v1.1 2019-01-07 Update:
  • Bug fixes:
    • Fixed THP Encoding framerate bug.
    • Fixed bug with ripping control signal frames from
      battle_cup_select.thp being off by one multiplicity.
  • Enhancements:
    • Refactored THP Viewer/Ripper UX with the ability to rip individual subvideo cells/multiplicities.
  • Added this CTWiiki page.
By the same author: MrTamkis

Distributions:
Hover! Pack

Battle Arenas:
Hover! Maze 1Hover! Maze 2Hover! Maze 3Hover! CreditsMTM64 Arena Rumble

Software:
Thwimp