THPConv

From Super Mario Galaxy wiki
Revision as of 19:28, 14 August 2022 by Lord-Giganticus (talk | contribs) (more dead links time)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This page contains content/info from the Revolution SDK. This is to be considered 100% true.

THPConv.exe is a prebuilt program Nintendo provides in the Wii and GCN SDKs. It's used to take static jpg frames and wav audio in order to make a THP video.

Command Options

Creating a THP

option argument Description
-j *.jpg The input files (sequential jpg files) Wildcard characters (*) are allowed. Required Command
-d outfile The output file. Required Command
-s wavefile(s) The .wav files to pack into the THP video. (Must be non-compressed 16-bit PCM data, mono and stereo is supported)
-r framerate The framerate to use. If not defined, defaults to 29.97 (Allowed range is from 1.0 to 59.97)
-o - THP movie data can internally store offsets to each frame data as a table.
-non - Specifies the THP video data format. When interlace starts the video data from an odd numbered field, specify -odd. When interlace starts from an even numbered field, specify -even. Defaults to -non
-odd
-even
-v - Enable Verbosity.
-h - Displays the option list

Replacing the audio of a THP video

Note that some of the commands options above are the same here. (Being -r, -o, -non, -even, -odd, -v, -h)

option argument Description
-c file The input thp video. Required Command and not allowed to be used with -j
-s wavefile(s) Same as above. This option or the -trk option is required when using -c
-d outputfile The output file. If the file is the same THPConv.exe will OVERWRITE the file
-trk track number, wavfile If you only want to replace a single audio track dataset, use this option instead of -s. Invalidates the -r, -o, -non, -odd, and -even options

Creating a THP video for SMG

THPConv.exe is originally a Windows binary, but a port to Linux exits. You can find it here

  1. Run the following in a shell program: ffmpeg -i Input.mp4 -r 59.94 -vf scale=640:368 temp\frame%03d.jpg (Replace Input.mp4 and temp with what you want)
  2. If you are going to make the video have audio run this: ffmpeg -i Input.mp4 -r 59.94 -f u16be audio.wav (Replace Input.mp4 and audio.wav with what you want)
  3. Then, run this if you are not making a video with audio: THPConv.exe -j temp\*.jpg -r 59.94 -d output.thp (Replace temp and output.thp with what you want)
  4. If you DO want audio, run this instead: THPConv.exe -j temp\*.jpg -r 59.94 -s audio.wav -d output.thp (Replace temp, audio.wav, and output.thp with what you want)
  5. Attempt replacing one of the THP Videos in MovieData and see if it works.