THPConv: Difference between revisions

From Super Mario Galaxy wiki
Jump to navigation Jump to search
(more dead links time)
 
(re-write THPConv page (Wii SDK))
Line 1: Line 1:
[[Category:Tools]]
[[Category:Tools]]{{SDK Reference}}
{{SDK Reference}}
'''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 =
<hr style="background-color:transparent;">
== Creating a THP ==
{| class="wikitable"
! 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 || rowspan="3" | - || rowspan="3" | 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)
{| class="wikitable"
! 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''
|-
|}


'''THPConv.exe''' is a prebuilt Win32 console application that Nintendo provides in the Wii and GCN SDKs. It is used to convert sequential JPEG images into a THP video format (with an option to include audio into it from a WAV audio file) and to include/replace audio of an existent THP video. It needs the '''dsptool.dll''' file to work.
There is a similar program called '''THPConvD.exe''' included alonside '''THPConv.exe''' and according to the Wii SDK docs:
<blockquote><i>there is no difference in how the two behave. Normally you should use THPConv.exe. THPConvD.exe remains in order to maintain compatibility with past systems.</i></blockquote>
So you may use either '''THPConv.exe''' or '''THPConvD.exe''' to make/edit THP files (be sure to have the respective '''dsptoolD.dll''' for '''THPConvD.exe''').
Linux users can use [https://www.winehq.org/ Wine] to run both program.
<br>
<h1><b>Converting Sequential JPEG files to THP Movie Data</b></h1>
<hr style="background-color:transparent;">
<h2><b>Description</b></h2>
<hr style="background-color:transparent;">
The following describes how to use the <code>THPConv</code> tool to convert '''Sequential JPEG files''' to '''THP movie data''':
<pre>THPConv.exe -j &lt;*.jpg&gt; -d &lt;outputfile&gt; [-&lt;option&gt; &lt;argument&gt;]</pre>
Options Description:
<hr style="background-color:transparent;">
<table border="1" cellpadding="3" cellspacing="0">
    <tr align="center">
<th width="50" bgcolor="#C0C0C0">Option</th>
<th width="100" bgcolor="#C0C0C0">Argument</th>
<th bgcolor="#C0C0C0">Description</th>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-j</th>
<td align="center" width="100" bgcolor="#E6E6FA">&lt;*.jpg&gt;</td>
<td>Specifies the input files (sequential JPEG files). Wildcard characters ("*") can be used. This argument must <strong>always be specified</strong>.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-d</th>
<td align="center" width="100" bgcolor="#E6E6FA">&lt;outputfile&gt;</td>
<td>Specifies the output file (THP file). This argument must <strong>always be specified</strong>.</td>
    </tr>
</table>
<br>
<table border="1" cellpadding="3" cellspacing="0">
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-s</th>
<td align="center" width="100" bgcolor="#E6E6FA">&lt;wavefile&gt;<br>&lt;wavefile&gt;<br>......</td>
<td>Specifies the audio file (WAV file) that will be converted to THP audio data. When specifying more than one file for the argument, data is allocated to audio tracks in the order it is specified.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-r</th>
<td align="center" width="100" bgcolor="#E6E6FA">&lt;framerate&gt;</td>
<td>Specifies the movie's frame rate. Frame rates from 1.0 to 59.94 can be specified. If nothing is specified, the default value (29.97) is used.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-o</th>
      <td align="center" width="100" bgcolor="#E6E6FA">-</td>
<td>THP movie data can internally store offsets to each frame data as a table. If this argument is specified, the <code>THPConv</code> tool will create an offset table in the THP data. If this argument is not specified, the THP movie data, no offset table will be created in the THP movie data.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-non</th>
      <td align="center" width="100" bgcolor="#E6E6FA" rowspan="3">-</td>
<td rowspan="3">Specifies the THP video data format. When interlace starts the video data from an odd numbered field, specify <b>-odd</b>. When interlace starts from an even numbered field, specify <b>-even</b>. If this argument is not specified, the THP video data format is automatically set to non-interlaced (<b>-non</b>).</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-odd</th>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-even</th>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-v</th>
      <td align="center" width="100" bgcolor="#E6E6FA">-</td>
<td>Turns on Verbose mode.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-h</th>
      <td align="center" width="100" bgcolor="#E6E6FA">-</td>
<td>Displays the option list.</td>
    </tr>
</table>
<br>
<h2><b>Example</b></h2>
<hr style="background-color:transparent;">
<pre>THPConv.exe -j test*.jpg -d output.thp</pre>
<p>When this example is executed from a command line, the sequential JPEG files in the current directory (test001.jpg, test002.jpg, test003.jpg, etc.) are converted to THP video data and collected into a single THP movie data file (output.thp). No WAV audio is specified so the THP video will be just video without audio.</p>
<br>
<h2><b>Notes</b></h2>
<hr style="background-color:transparent;">
<p><b>NOTE 1:</b> When converting sequential JPEG files to THP movie data, the names of the specified input files must have the extension ".jpg" or ".jpeg".</p>
<p><b>NOTE 2:</b> Unlike the Nintendo GameCube, audio data is output at the set playback frequency (of 48,000 Hz or 32,000 Hz) on the Wii.</p>
<br>
<h1><b>Changing THP Audio Data in THP Movie Data</b></h1>
<hr style="background-color:transparent;">
Note that some of the commands options above are the same here. (being those '''-s''', '''-d''', '''-r''', '''-o''', '''-non''', '''-even''', '''-odd''', '''-v''', '''-h''')
<br>
<h2><b>Description</b></h2>
<hr style="background-color:transparent;">
<p>Below are the instructions for using the <code>THPConv</code> tool to change the THP audio data in '''THP Movie Data'''.</p>
<pre>THPConv.exe -c &lt;inputfile&gt; -s &lt;wavefile&gt; &lt;wavefile&gt;... -d &lt;outputfile&gt; [-&lt;option&gt; &lt;argument&gt;]</pre>
Options Description
<hr style="background-color:transparent;">
<table border="1" cellpadding="3" cellspacing="0">
    <tr align="center">
<th width="50" bgcolor="#C0C0C0">option</th>
<th width="100" bgcolor="#C0C0C0">argument</th>
<th bgcolor="#C0C0C0">Description</th>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-c</th>
<td align="center" width="100" bgcolor="#E6E6FA">&lt;inputfile&gt;</td>
<td>Specifies the input file (THP file). This argument must <strong>always be specified</strong>.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-s</th>
<td align="center" width="100" bgcolor="#E6E6FA">&lt;wavefile&gt;<br>&lt;wavefile&gt;<br>......</td>
<td>Specifies the replacing sound file ('''WAV file'''). <br>When specifying more than one file for the argument, data is allocated to audio tracks in the order it is specified. If a THP file format that does not support multitracks is input, the output file will be in a format that supports multitracks.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-d</th>
<td align="center" width="100" bgcolor="#E6E6FA">&lt;outputfile&gt;</td>
<td>Specifies the output file (THP file). If this argument is not given, the <code>THPConv</code> tool will <strong>overwrite the input file.</strong></td>
    </tr>
</table>
<br>
<table border="1" cellpadding="3" cellspacing="0">
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-r</th>
<td align="center" width="100" bgcolor="#E6E6FA">&lt;framerate&gt;</td>
<td>Specifies the movie's frame rate. Frame rates from 1.0 to 59.94 can be specified. If nothing is specified, the default value (29.97) is used.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-o</th>
      <td align="center" width="100" bgcolor="#E6E6FA">-</td>
<td>THP movie data can internally store offsets to each frame data as a table. If this argument is specified, the <code>THPConv</code> tool will create an offset table in the THP data. If this argument is not specified, the THP movie data, no offset table will be created in the THP movie data.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-non</th>
      <td align="center" width="100" bgcolor="#E6E6FA" rowspan="3">-</td>
<td rowspan="3">Specifies the THP video data format. When interlace starts the video data from an odd numbered field, specify <b>-odd</b>. When interlace starts from an even numbered field, specify <b>-even</b>. If this argument is not specified, the THP video data format will be automatically set to non-interlaced (<b>-non</b>).</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-odd</th>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-even</th>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-trk</th>
<td align="center" width="100" bgcolor="#E6E6FA">&lt;track No.&gt;<br>&lt;wavefile&gt;</td>
<td>If you only want to replace a single audio track dataset, use this option instead of <b>-s</b>. The first argument is the audio track number to replace (0-), the second argument is the sound file (WAV file) that will make the replacement. Using this option invalidates the <b>-r</b>, <b>-o</b>, <b>-non</b>, <b>-odd</b>, and <b>-even</b> options. This option can only be used with the THP file formats that support multitracks.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-v</th>
      <td align="center" width="100" bgcolor="#E6E6FA">-</td>
<td>Turns on Verbose mode.</td>
    </tr>
    <tr>
<th align="center" width="50" bgcolor="#FFFFCC">-h</th>
      <td align="center" width="100" bgcolor="#E6E6FA">-</td>
<td>Displays the option list.</td>
    </tr>
</table>
<br>
<h2><b>Notes</b></h2>
<hr style="background-color:transparent;">
<p><b>NOTE 1:</b> When the <code>THPConv</code> tool replaces audio data in existing THP movie data, the old THP audio data is deleted. Once the THP audio data is deleted, it cannot be restored. If no output file is specified when the audio data is replaced, the <code>THPConv</code> tool will overwrite the THP movie data. When replacing the audio data, be sure to create a backup file or to specify an output file; this will prevent accidental deletion of your data.</p>
<p><b>NOTE 2:</b> If the replacement WAV file has a longer playback time than the THP movie data, the section of the replacement WAV file that is longer than the THP movie data will not be converted. If the playback time of the THP movie data is longer than the wave file, the remaining section will be silent.</p>
<p><b>NOTE 3:</b> If the THP movie data specified as the input data does not contain audio data, this operation will add THP audio data to the specified file.</p>
<p><b>NOTE 4:</b> If you want the THP movie data to contain more than one audio track dataset, make sure that the channel counts and playback frequencies for all audio track datasets are the same.</p>
<p><b>NOTE 5:</b> Unlike the Nintendo GameCube, audio data on the Wii console is output at a set playback frequency (48,000 Hz or 32,000 Hz).</p>
<br>
<h1><b>Compatible file formats for THPConv</b></h1>
<hr style="background-color:transparent;">
<h2><b>Sequential JPEG File Format</b></h2>
<hr style="background-color:transparent;">
<h3><b>Description</b></h3>
<hr>
<hr style="background-color:transparent;">
<p>The <code>THPConv</code> tool can convert a group of sequential JPEG files having sequence numbers at the end of their filenames (indicating the playback order) to THP movie data. When interleaving audio data in sequential JPEG files, you must either specify the WAV files by using the <b>-s</b> option at the time the sequential JPEG files are converted, or add the WAV files after conversion. <br> The following restrictions apply to groups of sequential JPEG files that can be handled with the <code>THPConv</code> tool.</p>
<blockquote>
<table border="0">
    <tr align="left">
      <th width="10" valign="top">-</th>
<th>All JPEG files to be collected into a single THP movie dataset must have the same number of pixels in the horizontal and vertical directions.</th>   
    </tr>
    <tr align="left">
      <th width="10" valign="top">-</th>
<th> The group of sequential JPEG files must have sequence numbers (corresponding to frame numbers) appended to the end of their filenames.</th>   
    </tr>
    <tr align="left">
      <th width="10" valign="top">-</th>
<th> The number of the JPEG file corresponding to the initial frame of the THP movie data can be any number. However, the numbers of all files thereafter must be sequential.</th>   
    </tr>
    <tr align="left">
      <th width="10" valign="top">-</th>
<th> Please add leading zeros to the frame numbers appended to the filenames so that they all match the number of digits in the last frame.</th>   
    </tr>
</table>
</blockquote>
<p>The following restrictions apply to each file in a group of sequential JPEG files.</p>
<blockquote>
<table border="0">
    <tr align="left">
      <th width="10" valign="top">-</th>
<th>Only the JPEG baseline DCT format is supported.</th>   
    </tr>
    <tr align="left">
      <th width="10" valign="top">-</th>
<th>Only sequential encoding is supported.</th>   
    </tr>
    <tr align="left">
      <th width="10" valign="top">-</th>
<th>Only supports a sample rate of 4:2:0.</th>   
    </tr>
    <tr align="left">
      <th width="10" valign="top">-</th>
<th>The pixel counts in both the horizontal and vertical directions must be a multiple of 16.</th>   
    </tr>
    <tr align="left">
      <th width="10" valign="top">-</th>
<th>The maximum pixel count in the horizontal direction is 672 dots. There is no restriction on the pixel count in the vertical direction.</th>   
    </tr>
</table>
</blockquote>
<p>If the sequential JPEG files do not meet these requirements, the <code>THPConv</code> tool will output an error and stop processing.</p>
<br>
<h3><b>Example</b></h3>
<hr>
<hr style="background-color:transparent;">
<p>To create four seconds of THP movie data at 30 FPS from sequential JPEG files, the numbers of the sequential JPEG files (testxxx.jpg) should look like the following:</p>
<blockquote>
<table border="0">
    <tr align="center">
<td align="center" width="80">Frame</td>
      <td align="right" width="60"> 1 : </td>
<td width="180">test001.jpg</td>
    </tr>
    <tr align="center">
<td align="center" width="80">Frame</td>
      <td align="right" width="60"> 2 : </td>
<td width="180">test002.jpg</td>
    </tr>
    <tr align="center">
<td align="center" width="80">Frame</td>
      <td align="right" width="60"> 3 : </td>
<td width="180">test003.jpg</td>
    </tr>
    <tr align="center">
      <td align="center" width="80"> …</td>
      <td align="right" width="60"> … : </td>
      <td width="180"> …</td>
    </tr>
    <tr align="center">
<td align="center" width="80">Frame</td>
      <td align="right" width="60">51 : </td>
<td width="180">test051.jpg</td>
    </tr>
    <tr align="center">
<td align="center" width="80">Frame</td>
      <td align="right" width="60">52 : </td>
<td width="180">test052.jpg</td>
    </tr>
    <tr align="center">
      <td align="center" width="80"> …</td>
      <td align="right" width="60"> … : </td>
      <td width="180"> …</td>
    </tr>
    <tr align="center">
<td align="center" width="80">Frame</td>
      <td align="right" width="60">118 : </td>
<td width="180">test118.jpg</td>
    </tr>
    <tr align="center">
<td align="center" width="80">Frame</td>
      <td align="right" width="60">119 : </td>
<td width="180">test119.jpg</td>
    </tr>
    <tr align="center">
<td align="center" width="80">Frame</td>
      <td align="right" width="60">120 : </td>
<td width="180">test120.jpg</td>
    </tr>
</table>
</blockquote>
<br>
<h2><b>WAV file format</b></h2>
<hr style="background-color:transparent;">
<h3><b>Description</b></h3>
<hr>
<hr style="background-color:transparent;">
<p>The <code>THPConv</code> tool can convert a general WAV file to THP audio data and interleave it with THP movie data. The following restrictions apply to WAV files that can be converted by the <code>THPConv</code> tool.</p>
<blockquote>
- <b>They must be non-compressed 16-bit PCM data.</b><br>
- <b>Monaural (one channel) and stereo (two channels) are supported.</b>
</blockquote>
<p>If the wav file does not meet these requirements, the <code>THPConv</code> tool will output an error and stop processing.</p>
<br>
<h3><b>Notes</b></h3>
<hr>
<hr style="background-color:transparent;">
<p>
<strong><b>NOTE 1:</b></strong> Unlike the Nintendo GameCube, audio data is output at the set playback frequency (of 48,000 Hz or 32,000 Hz) on the Wii.
</p>
<p>
<b>NOTE 2: </b> WAV files having a playback frequency other than 48,000Hz or 32,000Hz can be specified in <code>THPConv</code>. When playing THP movie data created with such WAV files, use <code>THPPlayerStrmAX</code>.<br><br>Even if you created THP movie data specifying wav files with a playback frequency of 48,000Hz or 32,000Hz, if the playback frequency setting on the Wii is different, use <code>THPPlayerStrmAX</code>.
</p>
<p>
<b>NOTE 3:</b> If you want the THP movie data to contain more than one audio data set, make sure the channel counts and playback frequencies for all data sets are the same.
</p>
<br>
<!--
= Creating a THP video for SMG =
= Creating a THP video for SMG =
''THPConv.exe is originally a Windows binary, but a port to Linux exits. You can find it [https://github.com/MasterofGalaxies/THPConv here]''
''THPConv.exe is originally a Windows binary, but a port to Linux exits. You can find it [https://github.com/MasterofGalaxies/THPConv here]''
Line 51: Line 404:
# 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)
# 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)
# Attempt replacing one of the THP Videos in [[File_system#MovieData|MovieData]] and see if it works.
# Attempt replacing one of the THP Videos in [[File_system#MovieData|MovieData]] and see if it works.
-->

Revision as of 23:58, 29 April 2023

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

THPConv.exe is a prebuilt Win32 console application that Nintendo provides in the Wii and GCN SDKs. It is used to convert sequential JPEG images into a THP video format (with an option to include audio into it from a WAV audio file) and to include/replace audio of an existent THP video. It needs the dsptool.dll file to work.

There is a similar program called THPConvD.exe included alonside THPConv.exe and according to the Wii SDK docs:

there is no difference in how the two behave. Normally you should use THPConv.exe. THPConvD.exe remains in order to maintain compatibility with past systems.

So you may use either THPConv.exe or THPConvD.exe to make/edit THP files (be sure to have the respective dsptoolD.dll for THPConvD.exe).

Linux users can use Wine to run both program.


Converting Sequential JPEG files to THP Movie Data


Description


The following describes how to use the THPConv tool to convert Sequential JPEG files to THP movie data:

THPConv.exe -j <*.jpg> -d <outputfile> [-<option> <argument>]

Options Description:


Option Argument Description
-j <*.jpg> Specifies the input files (sequential JPEG files). Wildcard characters ("*") can be used. This argument must always be specified.
-d <outputfile> Specifies the output file (THP file). This argument must always be specified.


-s <wavefile>
<wavefile>
......
Specifies the audio file (WAV file) that will be converted to THP audio data. When specifying more than one file for the argument, data is allocated to audio tracks in the order it is specified.
-r <framerate> Specifies the movie's frame rate. Frame rates from 1.0 to 59.94 can be specified. If nothing is specified, the default value (29.97) is used.
-o - THP movie data can internally store offsets to each frame data as a table. If this argument is specified, the THPConv tool will create an offset table in the THP data. If this argument is not specified, the THP movie data, no offset table will be created in the THP movie data.
-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. If this argument is not specified, the THP video data format is automatically set to non-interlaced (-non).
-odd
-even
-v - Turns on Verbose mode.
-h - Displays the option list.


Example


THPConv.exe -j test*.jpg -d output.thp

When this example is executed from a command line, the sequential JPEG files in the current directory (test001.jpg, test002.jpg, test003.jpg, etc.) are converted to THP video data and collected into a single THP movie data file (output.thp). No WAV audio is specified so the THP video will be just video without audio.


Notes


NOTE 1: When converting sequential JPEG files to THP movie data, the names of the specified input files must have the extension ".jpg" or ".jpeg".

NOTE 2: Unlike the Nintendo GameCube, audio data is output at the set playback frequency (of 48,000 Hz or 32,000 Hz) on the Wii.


Changing THP Audio Data in THP Movie Data


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


Description


Below are the instructions for using the THPConv tool to change the THP audio data in THP Movie Data.

THPConv.exe -c <inputfile> -s <wavefile> <wavefile>... -d <outputfile> [-<option> <argument>]

Options Description


option argument Description
-c <inputfile> Specifies the input file (THP file). This argument must always be specified.
-s <wavefile>
<wavefile>
......
Specifies the replacing sound file (WAV file).
When specifying more than one file for the argument, data is allocated to audio tracks in the order it is specified. If a THP file format that does not support multitracks is input, the output file will be in a format that supports multitracks.
-d <outputfile> Specifies the output file (THP file). If this argument is not given, the THPConv tool will overwrite the input file.


-r <framerate> Specifies the movie's frame rate. Frame rates from 1.0 to 59.94 can be specified. If nothing is specified, the default value (29.97) is used.
-o - THP movie data can internally store offsets to each frame data as a table. If this argument is specified, the THPConv tool will create an offset table in the THP data. If this argument is not specified, the THP movie data, no offset table will be created in the THP movie data.
-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. If this argument is not specified, the THP video data format will be automatically set to non-interlaced (-non).
-odd
-even
-trk <track No.>
<wavefile>
If you only want to replace a single audio track dataset, use this option instead of -s. The first argument is the audio track number to replace (0-), the second argument is the sound file (WAV file) that will make the replacement. Using this option invalidates the -r, -o, -non, -odd, and -even options. This option can only be used with the THP file formats that support multitracks.
-v - Turns on Verbose mode.
-h - Displays the option list.


Notes


NOTE 1: When the THPConv tool replaces audio data in existing THP movie data, the old THP audio data is deleted. Once the THP audio data is deleted, it cannot be restored. If no output file is specified when the audio data is replaced, the THPConv tool will overwrite the THP movie data. When replacing the audio data, be sure to create a backup file or to specify an output file; this will prevent accidental deletion of your data.

NOTE 2: If the replacement WAV file has a longer playback time than the THP movie data, the section of the replacement WAV file that is longer than the THP movie data will not be converted. If the playback time of the THP movie data is longer than the wave file, the remaining section will be silent.

NOTE 3: If the THP movie data specified as the input data does not contain audio data, this operation will add THP audio data to the specified file.

NOTE 4: If you want the THP movie data to contain more than one audio track dataset, make sure that the channel counts and playback frequencies for all audio track datasets are the same.

NOTE 5: Unlike the Nintendo GameCube, audio data on the Wii console is output at a set playback frequency (48,000 Hz or 32,000 Hz).


Compatible file formats for THPConv


Sequential JPEG File Format


Description



The THPConv tool can convert a group of sequential JPEG files having sequence numbers at the end of their filenames (indicating the playback order) to THP movie data. When interleaving audio data in sequential JPEG files, you must either specify the WAV files by using the -s option at the time the sequential JPEG files are converted, or add the WAV files after conversion.
The following restrictions apply to groups of sequential JPEG files that can be handled with the THPConv tool.

- All JPEG files to be collected into a single THP movie dataset must have the same number of pixels in the horizontal and vertical directions.
- The group of sequential JPEG files must have sequence numbers (corresponding to frame numbers) appended to the end of their filenames.
- The number of the JPEG file corresponding to the initial frame of the THP movie data can be any number. However, the numbers of all files thereafter must be sequential.
- Please add leading zeros to the frame numbers appended to the filenames so that they all match the number of digits in the last frame.

The following restrictions apply to each file in a group of sequential JPEG files.

- Only the JPEG baseline DCT format is supported.
- Only sequential encoding is supported.
- Only supports a sample rate of 4:2:0.
- The pixel counts in both the horizontal and vertical directions must be a multiple of 16.
- The maximum pixel count in the horizontal direction is 672 dots. There is no restriction on the pixel count in the vertical direction.

If the sequential JPEG files do not meet these requirements, the THPConv tool will output an error and stop processing.


Example



To create four seconds of THP movie data at 30 FPS from sequential JPEG files, the numbers of the sequential JPEG files (testxxx.jpg) should look like the following:

Frame 1 : test001.jpg
Frame 2 : test002.jpg
Frame 3 : test003.jpg
… :
Frame 51 : test051.jpg
Frame 52 : test052.jpg
… :
Frame 118 : test118.jpg
Frame 119 : test119.jpg
Frame 120 : test120.jpg


WAV file format


Description



The THPConv tool can convert a general WAV file to THP audio data and interleave it with THP movie data. The following restrictions apply to WAV files that can be converted by the THPConv tool.

- They must be non-compressed 16-bit PCM data.
- Monaural (one channel) and stereo (two channels) are supported.

If the wav file does not meet these requirements, the THPConv tool will output an error and stop processing.


Notes



NOTE 1: Unlike the Nintendo GameCube, audio data is output at the set playback frequency (of 48,000 Hz or 32,000 Hz) on the Wii.

NOTE 2: WAV files having a playback frequency other than 48,000Hz or 32,000Hz can be specified in THPConv. When playing THP movie data created with such WAV files, use THPPlayerStrmAX.

Even if you created THP movie data specifying wav files with a playback frequency of 48,000Hz or 32,000Hz, if the playback frequency setting on the Wii is different, use THPPlayerStrmAX.

NOTE 3: If you want the THP movie data to contain more than one audio data set, make sure the channel counts and playback frequencies for all data sets are the same.