Home Gallery Resources The Team Rules chat Login Register
Pages: [1]
Author Topic: [GUIDE][EXTERNAL] How to make THP files (Brawl's movie files)  (Read 460 times)
0 Members and 1 Guest are viewing this topic.
Minabsapi
Newbie Kitten
*
Offline Offline

Posts: 5


Crazy Noisy Bizarre Meow

  • Awards Tutorial Writer

  • View Profile Awards
    « on: August 02, 2019, 03:25:48 PM »


    Hey everyone, since I can't find such tutorial here, I'm linking a tutorial I found on SmashBoards about editing Brawl movie files, with the extension .thp
    Special thanks to ChuteTheMessenger who brought us this tutorial !
    Link to the original thread: https://smashboards.com/threads/to-making-thps-brawls-movie-files.271087/

    Quote
    Guide To Making THP's​

    [collapse=IMPORTANT! How to contribute new information/corrections to this thread:]
    Hey all. I haven't been hacking Brawl for a while, and I'm generally pretty busy with my studies. As a result, I have neither the time nor the familiarity with hacking any longer to intepret your posts and format them into my OP. Please do the following to ensure that your contributions are recognized and utilized:

    1) Format the information exactly as how you would like it to appear on the tutorial. Keep your information condensed and informative, clear and relevant. Submit the post either to me by PM or just straight into this thread, either in code tags so that I can easily copy it, or clearly indicated in your post so that I can pull it into the OP with the quote function.

    2) Tell me where I should insert your post in the OP. Reference specific locations, like section numbers and titles and whatnot, or just a snatch of text following or preceeding the spot where your post would make the most sense contextually.
    [/collapse]

    [collapse=Foreword / What is a THP?:]
    THP is a video file format used in many of Nintendo's games, namely Gamecube games and Super Smash Bros Brawl.

    All of Brawl's cutscenes, whether it's Brawl's opening or one of its Subspace Emissary custscenes, are THP files. This guide will detail how to produce your own THP files and use them to replace cutscenes in Brawl.
    [/collapse]

    [collapse=What you'll need:]
    SUPER converter (freeware): Get it here (the download link is all the way at bottom of the page.)
    [collapse=Note on converters and SUPER]
    Alternatively, you can use any video converter you'd like, as long it can convert to a series of images, but SUPER has a load of convenient functions, and is free.

    *It's also worth noting that SUPER can convert from THP to any video file it supports. Just drag and drop or browse for any THP file (custom or Nintendo made) and specify an output file, and then hit convert. Thanks to Nerd for discovering this.
    [/collapse]

    THPConv.exe and DSPTool.dll

    Your video file(s) you want to convert.

    [collapse=IMPORTANT NOTE ON THP LENGTH]*Important- DO NOT replace a video in Brawl with a video that is longer than the original , or else it will freeze. Some people have reported that going over the original length by a few seconds is ok, but I'd advise you to play it safe. To check a video's length, play it on your computer with thpplay, and it will show you the length of the video in seconds on the top. Brawl's opening video is 119.75 seconds.
    On the other hand, if the video is shorter than the original, once it reaches the end the video will hang, but you can hit start and go to the Brawl main menu.[/collapse]

    Riivolution or some program (like WiiScrubber) to replace the files in your brawl iso. (Use only WiiScrubber 1.21, it's the slowest but will make sure there are no errors when replacing the file in the iso)

    *PW's File Patch code (a.k.a the SD Card Loader) does not work with THP's

    THP Player for windows (thpplay) - To play a THP, drag it and drop it onto the .exe, or set THP files to open with it.

    Free Youtube Downloader- *optional* This is a free program to download videos from youtube to your hard drive. There are similar programs like this all over the net.

    THP GUI- *optional* A fantastic, easy-to-use tool tbtechwiz wrote to automate the usage of THPConv (great for those unfamiliar with CMD!).

    [collapse=THP GUI Features/Notes]
    --OPEN WITH command--
    1)you can drop a wav onto the icon and the GUI will auto-copy it to the folder with the JPEGs when it opens up

    2) (ONLY FOR SUPER CONVERTER USERS): you can put your "sound.wav" file into the folder with the jpegs (DONT BURY THE FOLDER SO FAR FROM THE DRIVE'S ROOT OR IT WONT WORK), and simply drag the folder to the GUI icon, then when the program launches, it will start the THP conversion automatically with NO input needed

    --options--
    1) Auto-delete: you can now toggle this, after THPConv finishes (or closes and fails), the program will clear out all the JPEGs and the wav from the folder.

    2) defined directory: you can set where the final product is spit out to

    3) Auto-preview:you can toggle this, when on, THPPlay is launched with the finished THP after conversion is done

    the options can be accessed via the wrench icon in the HELP/about section

    --safety nets--
    since you will have FAILURE if you have spaces in your THP name in THPConv, spaces in the output name will be auto-fixed by replacing them with underscores
    [/collapse]
    [/collapse]

    [collapse=Additional Useful Links]
    The original guide to making THP’s by NWAA
    [TuT].THP Dateien erstellen (German guide to making THP's by Michi)
    xmanfit0's Brawl Vault
    Nerd with An Afro's Brawl Vault
    [/collapse]

    [collapse=Alternate Method Using Sony Vegas (Thanks to tbtechwiz!)]
    first things first, I have This file Open:



    I have placed markers in this project file, which mark the time restraints of said THP clip

    These Time restraints are:
    >OPmovie visual start is at 6.240s
    >OPMovie length is 01:59.686
    >E3 length is 02:31.451
    >How to Play length is 01:14.041

    I won't label the rest because the ones listed are the only ones I know to be most targeted towards. *now, you can drop your video in the timeline, while keeping in mind that if you are targeting the OPMovie, that the Green area Marks the point in time that the video doesn't play while the sound from the hack DOES play, otherwise, resize the clip's right end so that it snaps to the marker with the label of your target THP (or end at the listed time if you are doing this from scratch).
    If you are targeting the OPMovie, if you want to do the intro like I did, you can place the audio from brawl's intro over the first few seconds, keep in mind to save a few KBs of filesize, to NOT place any video clip over the green area if you are hacking the intro


    SKIP THIS STEP IF YOU ARE USING THE FILE INCLUDED WITH THIS GUIDE
    and you are pretty much done, now you just need to set the project settings.

    click circled button in the video preview section

    set the:
    Video size 720x480
    Field order None (Progressive Scan)
    Pixel aspect ratio 1.2121 (NTSC DV Widescreen)
    Framerate 29.970
    Pixel format 32-bit floating point (Full range)
    Full res. rendering quality Best
    Deinterlace method:
    None (If you have no interlaced video in the project)
    Interpolate fields (if you have at LEAST one interlaced video in the project)

    Now uncheck the adjust source media to match project settings box


    Now you can render as


    render the video AS:
    MPEG2 with: (Click custom)
    720x480 resolution
    29.970 FPS
    4:3 aspect ratio
    progressive scan (field order)
    HIGH QUALITY (slider)
    Constant bitrate @ 8,000,000

    *note, as to WHY you are to render the widescreen project as 4:3 in this step is to stretch it to 4:3 to meet the THPconv's frame size limit, and because brawl letterboxes the THP when the wii is outputting 4:3 and not widescreen, the letterboxing of your THP in brawl will go away if you set brawl or the wii to widescreen mode, if you have a 4:3 native video you want to put in brawl, you may want to put some decorative pillarboxing so it doesn't look ugly in brawl, or have to look "stretched" to widescreen



    NOW, drop the finished video in a new instance of vegas, and set the project settings to:

    Video size 672x480**
    Pixel aspect ratio 1.0 (square)
    Field order None (Progressive Scan)
    Full res. rendering quality Best
    no deinterlacing

    ** this setting may be different depending on your preference or if you are sizing the frames for NTSC or PAL. the frame size for NTSC is 576 x 416 and the frame size for PAL might be 640x464

    THEN

    Render AS:

    1.wav @ 32Khz (or 41KHz if you want)

    THEN

    image sequence (JPEG) [FORMAT] (sony vegas will render them with the name format "(name)_######.jpg")
    (MAKE SURE YOU ARE RENDERING TO AN EMPTY FOLDER, the next step will rename everything in your said destination, the said wav file is ok)

    *the above step allows you to skip the need to do a 3rd render with SUPER, saving a bit of time when using my method, however, the name will NOT meet the format for THPConv, we will take care of that quickly with the next step

    **SAVE YOUR FILES IN A DESIGNATED FOLDER!, it will output a bajillion JPEGs


    (LAG WILL HAPPEN IF YOU KEEP THE FOLDER YOU ARE SAVING TO OPEN)

    Then use StereoPhotomaker to do a batch rename, leaving the prefix letters empty and using 5 * *0s *(and the suffix as ".JPG")
    DEH example is below (see bottom of the pic)



    click rename ALL *(this will save alot of time than doing it with super)

    *The multi-renamer program can't rename over 5000 files at a time (on Windows XP SP3 at least).

    then use THPConv to finalize the THP project

    If you are unfamiliar with CMD or want to use a GUI, you can use My THP GUI to perform the conversion.
    [collapse=THP GUI Features/Notes]
    --OPEN WITH command--
    1)you can drop a wav onto the icon and the GUI will auto-copy it to the folder with the JPEGs when it opens up

    2) (ONLY FOR SUPER CONVERTER USERS): you can put your "sound.wav" file into the folder with the jpegs (DONT BURY THE FOLDER SO FAR FROM THE DRIVE'S ROOT OR IT WONT WORK), and simply drag the folder to the GUI icon, then when the program launches, it will start the THP conversion automatically with NO input needed

    --options--
    1) Auto-delete: you can now toggle this, after THPConv finishes (or closes and fails), the program will clear out all the JPEGs and the wav from the folder.

    2) defined directory: you can set where the final product is spit out to

    3) Auto-preview:you can toggle this, when on, THPPlay is launched with the finished THP after conversion is done

    the options can be accessed via the wrench icon in the HELP/about section

    --safety nets--
    since you will have FAILURE if you have spaces in your THP name in THPConv, spaces in the output name will be auto-fixed by replacing them with underscores
    [/collapse]

    [/collapse]
    ^If you choose to use tbtechwiz's alternate method using Sony Vegas, skip straight to step 3 below after finishing his instructions.

    Before starting: Open SUPER and set Output folder

    The first thing you'll want to do, if this is your first run of SUPER, is to set up where SUPER will save converted files.

    Simply right click anywhere in the GUI and select "Output File Saving Management" and select where you want the encoded files to be saved.

    *Optional* It is a good idea to set your output files to a folder near C:\ or wherever your hard drive root is. Using THPConv in a folder that is buried very deep in a folder tree might give you errors.

    [collapse=Click "Show" to see screenshot]
    [/collapse]

    Step 1: Getting the audio from the video.

    Open the video file you want to convert in SUPER by either dragging and dropping a file or right clicking and selecting "Add Multimedia File(s)" from the menu.

    Select "WAV (Audio Only)" from the Output Container tab on the top left. The settings here don't really matter too much, just select 2 channels and 32000 hz from the options below. It is important, however, that in the Output Audio Codec tab on the top right you must select "WAV-(pcm 16 little-endian)"

    Click on "Encode (Active Files)" near the bottom of the GUI. *If you cannot see the bottom of the GUI, you have to set your screen resolution to 1024 x 768 or larger.* For the sake of simplicity, you may want to rename the encoded file to something like "Sound.wav".

    *Optional* If the sound is too quiet, you can use a sound editor like Audacity and amplify the .wav by several decibels. This will make the sound louder.

    [collapse=Click "Show" to see screenshot]
    [/IMG][/collapse]

    Step 2: Converting the video to a series of JPG's.

    In the bottom portion of SUPER where the file queue is displayed, the video you selected in step one will be unchecked (if it was encoded in the last step without any problems). Click on the empty check box to check it again.

    Select "Sequence of Images" from the Output Container Tab. For the Output Video Codec, select JPG.

    Now here you'll have to pay close attention to the settings. *Important- In the "video scale size", the width/height of the video both have to be multiples of 16, or else the THP will not be able to be created*

    In this tutorial I have picked 640:480 for my video. *Even though I used 640x480 in this tutorial, this is not the optimal size. Expand the note below for information on the ideal THP size.

    [collapse=Important Note on Setting the Proper THP Resolution]
    -The native resolution of an NTSC brawl THP is 576 x 416. If you play NTSC Brawl, set 576 x 416 to be your output resolution.

    -The native resolution for a PAL brawl THP may be 640x464. See notes on the PAL version by Yuna at the bottom of this tutorial.
    If you play PAL Brawl, set 640x464 to be your output resolution.

    Yuna said:
    You don't have to set the resolution of your replacement video to be the same as the video you're replacing as long as you don't exceed the maximum resolution of Brawl, which might be 640 or 672 (the maximum resolution for of the "Naruto: Clash of Ninja Revolution" series). Personally, I use 640.

    I've been using 640x352 for years without problems (because the videos I replace the opening with are 16:9). Why not use a resolution of 640x464 (Brawl's native PAL resolution) and just add black bars? Because that would bloat the file size and worsen the picture quality.

    So, use whatever resolution you want as long as you don't exceed those of the native video's.
    [/collapse]

    Please refer to the notes above to set the right size for your THP so that it fits correctly on your television screen during playback.

    SUPER will allow you to set a custom video scale size when you click "More" twice on the Video Scale Size box until the 3 custom scale size boxes appear.

    *If unsightly white spots/graphical glitches occur in the outputted JPG's, choose "NoChange". This might fix the problem.

    Now double click the filename of the video file near the bottom of the GUI so that the SUPER "Multimedia Analysis Box Appears" What you're looking for is the FPS (frames per second of the video)
    [collapse=Multimedia Analysis Box]
    [/collapse]

    In the example, the FPS is 30. So in the Frame/Sec option part, you can pick either 30 or 29.97. (By default, THPConv makes THP's in 29.97, but there really won't be that much of a difference between 30 and 29.97) The Bitrate and Misc options don't really matter too much, you can leave those as default. Here's an example of what all the options will look like once selected:

    [collapse=Click "Show" to see screenshot]
    [/collapse]

    Click on Encode. When SUPER finishes encoding your file, there will be several thousand JPG's in a folder called "JPG" inside whatever folder you set SUPER to save to. Put your wav sound in here, as well as THPConv.exe and DSPTool.dll

    Step 3: Using THPConv to create THP's

    Open up the folder where you have saved all the jpgs, your sound, and THPConv and DSPTool.

    [collapse=Important Notes on the Following Process]
    *Double clicking THPConv will result in FAELURE. Do not double click it, it won’t work. You will need to use the Command Prompt*

    *Optional* If you are not familiar with the Command Prompt, feel free to use this GUI for THPConv that I`ve written in AutoIT. All instructions and help are in the actual GUI and included readme file.

    *If you get any errors, try running cmd as admin, especially if your jpg's are located in a folder with a read-only attribute.*
    [/collapse]

    Check the number of digits in your jpg's. SUPER should have outputted the jpg's in 5 digits (unless you have 100000 frames or more, which is unlikely unless you have like a 8 minute video at 60 fps, or 16 minute video at 30 FPS). For example, if there are 3000 total frames, SUPER will have outputted the JPG's from 00001.JPG all the way to 03000.JPG. The number of digits is important.

    [collapse=Click "Show" to see folder example]
    [/collapse]

    *The rest of Step 3 is manual CMD work that can be avoided by using GUI for THPConv. I will leave the instructions for the manual process here just in case:

    (Manual Process)
    Now start windows command prompt, and use the cd command to navigate to the directory where you saved all your stuff. (Or if you're lazy, just copy cmd.exe into the directory, and then double click it to start cmd in that directory.)

    Type in "THPConv" into the command prompt and hit enter. If you're in the right directory, a list of commands will pop up. Take a few minutes to read through them and see what they do. This is the command you will need:

    THPConv -j [number of *'s here = digits in your JPG's].jpg -d [What you want to be the finished THP name].thp -s [your sound file].wav

    To clarify, you literally put "*****.jpg" into the command prompt. You do not put any numbers. You just need to put in asterisks (*) equal to the number of digits in your jpg's.

    *When working with cmd, try not to use too much spaces or symbols like "!@#$%^&*()" when putting in filenames, because errors can occur if these symbols are used.

    For the example below, the command typed into CMD would be as follows: "THPConv -j *****.jpg ThisIsPatrick.thp -s Sound.wav"

    As a default, THPConv makes THP's in 29.97 FPS. If in Step 2 you encoded the file to any other FPS than 30 or 29.97, you will need to specify this, or else there may be video/audio desyncing in the finished THP. To change the framerate, simply add
    "-r [framerate]"
    to the end of the command. However, THPConv does not support encoding in a perfect 60 FPS, it is limited to 59.94. So if you want to encode to 60 FPS, put "-r 59.94" at the end of the command. After entering your command, hit Enter.

    [collapse=Click "Show" to see screenshot]
    [/collapse]

    Step 4: Preview THP/Insert into Brawl

    A convenient THP viewer for Windows can be found here. You can use it to preview your THP file.

    THP's ARE NOT supported by the File Patch Code (a.k.a the SD Loader). They will never be, because PW left the Brawl Hacking community long ago.

    You can either use Riivolution to replace a THP in brawl, or you can just insert it into the .iso using WiiScrubber.

    [collapse=Click "Show" to see the THP player in action]
    [/collapse]

    *If you replace Brawl's opening, the first few seconds of the original Brawl opening will play before suddenly transitioning to the custom video. The reason is explained by standardtoaster:*

    Note: there's many links that couldn't be rendered in this tutorial, so I greatly encourage you to go to the original post !
    Logged

    avensis
    Newbie Kitten
    *
    Offline Offline

    Posts: 1


    View Profile Awards
    « Reply #1 on: September 04, 2019, 03:22:57 PM »


    Thank you for sharing it's very interesting.

    UC Browser SHAREit MX Player

    « Last Edit: September 11, 2019, 11:34:05 AM by avensis » Logged

    Pages: [1]
    Print
    Jump to: