Skip to content

Instantly share code, notes, and snippets.

@rlaphoenix
Created April 17, 2023 15:36
Show Gist options
  • Save rlaphoenix/26d529b92656d2be850953e4c5593159 to your computer and use it in GitHub Desktop.
Save rlaphoenix/26d529b92656d2be850953e4c5593159 to your computer and use it in GitHub Desktop.
Extracting and converting movie videos from GameCube and Wii Discs

Extracting and converting movies from GameCube/Wii Discs

Preliminary notes

If you have a .ciso file, use nkit to convert it to .iso.

Stage 1 - Extracting the movie file(s)

The following are the file types you aim to extract, and what we will be converting to another format. Different Discs use different formats. So keep an eye out for any of these formats.

  • THP: The most common format. It's basically just Motion JPEG with a custom header.
  • SFD: The second-most common format, also used by Xbox.
  • Other formats are not specifically covered here but you should be able to get the drift.

Use GCIT to open the .iso and then extract the files by using File -> Extract -> GCReEx format.
Open the /local folder and look for any movie files. If you find some, you can go to the next stage.

Looking deeper

If the movie file you want to get is not directly within the disc ISO, then it could be within a file of the ISO, e.g., a TGC, GCM, FSYS, or such.

TGC files

TGC files are essentially a container format for ISOs as GCM files. So just extract the GCM, extract files from the GCM, and search again. If you see a MovieSfdPlayer.tgc file, then that is what will most likely have the movie file you are after.

  1. Extract the GCM from the TGC file using TGCtoGCM, i.e., TGCtoGCM.exe file.tgc file.gcm.
  2. Use GCIT to open the .gcm and then extract the files by using File -> Extract -> GCReEx format.
  3. You can now repeat this Stage's steps to look for further movie files, which may require extracting more TGC files.

FSYS files

Some games have FSYS files which themselves contain THP files. E.g., Pokemon Colosseum XD. Simply run the Java program XD THP Tool.jar and have it extract the FSYS files to THP files.

Stage 2 - Converting the movie file(s)

You now have the movie THP or SFD file. From here you can convert using FFMPEG as it has native support for these file types. If you want a lossless encode you can encode to ProRes (file size will be massive) or just encode at a high bitrate for a near-lossless encode.

ffmpeg -i movie_tpc_logo.thp -c:v prores_ks -profile:v 5 -vendor apl0 -bits_per_mb 8000 -c:a pcm_s16le movie_tpc_logo.mov

Do note that if the TPH is interlaced, then further work is required to deinterlace it. You could use FFMPEG's deinterlacer, but I recommend using L-SMASH-Works with VapourSynth or AviSynth (or StaxRip, Hybrid) to run the QTGMC deinterlacer on it. You can directly load the THP and SFD files with L-SMASH-Works as well, just like FFMPEG can.

Downloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment