@@ -8,7 +8,7 @@ By [Tamkis/EagleSoft Ltd.](http://www.eaglesoftltd.com)
88
99[ MKWiiki article] ( http://wiki.tockdom.com/wiki/Thwimp )
1010
11- [ Video of latest version ] ( about:blank )
11+ [ Video playlist ] ( https://www.youtube.com/playlist?list=PL3N-ZrZe1CWKxEOHgq64HNUm0rHZEQx3X )
1212
1313## Table of contents
1414
@@ -225,7 +225,7 @@ Before doing **anything** in the utility, goto the "Options" tab of the applicat
225225 - Use this to check for newer releases
226226- Cmdline
227227 - Opens up another form, displaying the current CLI syntax
228- - 
228+ - 
229229
230230### Using the THP tab:
231231
@@ -459,50 +459,156 @@ In order to reduce lagging from too much bandwidth, use the **JPG Quality** fiel
459459
460460## 4. How to use it (CLI)
461461
462- ** PLACEHOLDER**
463- ![ CLI] ( https://raw.githubusercontent.com/Tamk1s/Thwimp/master/readme/CLI.png )
464-
462+ Please refer to ** section #3 (How to use it (GUI))** for basics on how to use Thwimp.
463+
464+ ** The CLI has the same main actions as with GUI mode:**
465+ - View
466+ - Rip
467+ - Encode THP files
468+ - Help
469+ - Displays the same CLI arguments as from the Cmdline button from the Options tab
470+
471+ ![ CLI.png] ( https://raw.githubusercontent.com/Tamk1s/Thwimp/master/readme/CLI.png )
472+
473+ The main difference with CLI mode vs. GUI mode is with how some actions are accessed. The options and wanted Thwimp data fileset are set by loading in an INI settings file (via /s switch, e.g. /s="C:\Folder\Thwimp.ini"), and a THP file is selected by an ID vs. the THP combo box (via /t=NNN ID switch, e.g. "/t=001"). (This ID can be found on the label when in GUI mode). For the THP Viewer/Ripper, a subvideo and multiplicity preset is selected by a string (via /p switch, e.g. "/p=A2_1", to use subvideo cell A2, 1st multiplicity), ** or** by manually setting the crop values in a csv list of values (via /c switch, e.g. "/c=0,0,320,240,1,600", to crop a 320x240 px video from the top left corner orgin, from time frame 1 to 600).
474+
475+ For ** Rip** and ** Encode** actions, instead of using a File dialog box to select the output folder and filename, it is just set by the /o output folder switch. The output folder switch is required for rip mode, optional for encode (it will place output files in the input folder with no switch). Simiarly, ** Encode** mode needs the /i input folder switch to define where the input files for encoding are located. All path switches ** should** enclose the path in "quotes", in order to handle paths with spaces in them!
476+
477+ For ** Encode** action, the Trunc Frame and digits can be set by the /f switch as csv list, with the digits optional. (E.g. "/f=600,3" for 600 frames, 3 digits; or just "/f=600" for 600 frames and auto-calculated digits.) The JPG Quality setting is set by the /q switch, and is a value between 1-100 (e.g. "/q=85" for JPG Quality of 85%).
478+
479+ When running in CLI mode, it is ** highly recommended** to enable Full Log option for the Thwimp INI settings file loaded! This will show all logging, progress bar information, msgboxes, and stdout from the FOSS co-utilities, all within the command prompt. Any errors or successful operations that occur will close Thwimp CLI mode and restore control back to the user.
480+
481+ ** Examples calls for Thwimp CLI mode:**
482+ - ** Example scenario assumptions**
483+ - For the /s INI setting file, these examples will assume the default Thwimp data fileset for MKWii is loaded
484+ - Also assume that all paths are set correctly for the FOSS co-utilities in the INI file
485+ - The command prompt's current directory is set to the Thwimp executable
486+
487+ - ** Examples**
488+ - **Encoding**
489+ - thwimp.exe /me /s="E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini" /t=002 /f=480,3 /q=85 /i="C:\Users\Anthony\Downloads\Output\TEST"
490+ - Loads Thwimp.ini settings from the Thwimp executable folder
491+ - Handles encoding a new file for ID=002 ("\battle\battle_retro.thp" video)
492+ - Trunc frame to 480 frames, digits to 3
493+ - JPG Quality to 85%
494+ - Input files for encoding located at "C:\Users\Anthony\Downloads\Output\TEST"
495+
496+ - thwimp.exe /me /s="E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini" /t=002 /f=480 /q=85 /i="C:\Users\Anthony\Downloads\Output\TEST"
497+ - Same as above, but for /f switch, only Trunc Frames of 480 set, and digits auto-calculated
498+
499+
500+ - **Viewing**
501+ - thwimp.exe /mv /s=E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini /t=001 /p=A2_2 /n=1
502+ - Loads Thwimp.ini settings from the Thwimp executable folder
503+ - Handles viewing THP file for ID=001 ("\battle\battle_cup_select.thp" video)
504+ - View preset subvideo cell A2, multiplicity 2
505+ - DirectSound enabled
506+
507+ - thwimp.exe /mv /s=E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini /t=001 /p=All_0 /n=1
508+ - Loads Thwimp.ini settings from the Thwimp executable folder
509+ - Handles viewing THP file for ID=001 ("\battle\battle_cup_select.thp" video)
510+ - View special preset All, multiplicity 0 (entire video)
511+ - DirectSound enabled
512+
513+ - thwimp.exe /mv /s=E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini /t=001 /p=Dum_2 /n=1
514+ - Loads Thwimp.ini settings from the Thwimp executable folder
515+ - Handles viewing THP file for ID=001 ("\battle\battle_cup_select.thp" video)
516+ - View special preset Dum, multiplicity 2
517+ - DirectSound enabled
518+
519+ - thwimp.exe /mv /s=E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini /t=001 /c=0,0,336,250,1,600 /n=1
520+ - Loads Thwimp.ini settings from the Thwimp executable folder
521+ - Handles viewing THP file for ID=001 ("\battle\battle_cup_select.thp" video)
522+ - View the area defined by following crop settings
523+ - Point at X-Pos = 0, Y-Pos = 0 (top left corner)
524+ - Physical video viewport of 336x250 px from that point
525+ - Time segment from frame 1 to frame 600
526+ - DirectSound enabled
527+
528+
529+ - **Ripping**
530+ - thwimp.exe /mr /s=E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini /t=001 /p=A2_2 /n=1 /o="C:\Users\Anthony\Downloads\Output\TEST\Battle_Cup_Select_A2_2.mp4"
531+ - Loads Thwimp.ini settings from the Thwimp executable folder
532+ - Handles ripping assets from THP file for ID=001 ("\battle\battle_cup_select.thp" video)
533+ - Rip the area at preset subvideo A2, multiplicity 2
534+ - DirectSound enabled
535+ - Output file to Battle_Cup_Select_A2_2.mp4
536+
537+ - thwimp.exe /mr /s=E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini /t=001 /p=All_0 /n=1 /o="C:\Users\Anthony\Downloads\Output\TEST\Battle_Cup_Select.mp4"
538+ - Loads Thwimp.ini settings from the Thwimp executable folder
539+ - Handles ripping assets from THP file for ID=001 ("\battle\battle_cup_select.thp" video)
540+ - Rip the area at special preset All, multiplicity 0 (so entire video as one video)
541+ - DirectSound enabled
542+ - Output file to Battle_Cup_Select.mp4
543+
544+ - thwimp.exe /mr /s=E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini /t=001 /p=Dum_0 /n=1 /o="C:\Users\Anthony\Downloads\Output\TEST\Dummy.mp4"
545+ - Loads Thwimp.ini settings from the Thwimp executable folder
546+ - Handles ripping assets from THP file for ID=001 ("\battle\battle_cup_select.thp" video)
547+ - DirectSound enabled
548+ - Create a video (Dummy.mp4) just for the entire Dummy padding section, rip each unique frame as BMP Frames (Dummy_1.bmp to Dummy_4.bmp)
549+
550+ - thwimp.exe /mr /s=E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini /t=001 /c=0,0,336,250,1,600 /n=1 /o="C:\Users\Anthony\Downloads\Output\TEST\Battle_Cup_Select_A1_1.mp4"
551+ - Loads Thwimp.ini settings from the Thwimp executable folder
552+ - Handles ripping assets from THP file for ID=001 ("\battle\battle_cup_select.thp" video)
553+ - Rip the area defined by following crop settings
554+ - Point at X-Pos = 0, Y-Pos = 0 (top left corner)
555+ - Physical video viewport of 336x250 px from that point
556+ - Time segment from frame 1 to frame 600
557+ - DirectSound enabled
558+ - Output file to Battle_Cup_Select_A1_1.mp4
559+
560+ - thwimp.exe /mr /s=E:\GC_Wii\Hacking\Tools\Video\Thwimp\Thwimp\bin\Release\thwimp.ini /t=027 /p=A1_1 /n=1 /o="C:\Users\Anthony\Downloads\Output\TEST\Title_A1_1.mp4"
561+ - Loads Thwimp.ini settings from the Thwimp executable folder
562+ - Handles ripping assets from THP file for ID=027 ("\title\title.thp" video)
563+ - Rip the area at preset subvideo A1, multiplicity 1.
564+ - DirectSound enabled
565+ - Output files
566+ - Video to Title_A1_1.mp4
567+ - Audio to Title_A1_1.wav
465568## 5. Customization
466- The data for each THP from the original MKWii game is hard-coded and read from external files. These 4 , parallel data files can be edited to improve the accuracy of the database, or could be completely modified for use in other GameCube/Wii games which use THP videos similarly. These file should always be placed right by the Thwimp executable; otherwise Thwimp may brick. Poor Thwimp! These files can use certain special values as separators/dummy entries. The 4 parallel files are FileListing.txt, FileData.txt, FileDesc.txt, and FileCDesc.txt.
569+ The data for each THP from the original MKWii game is hard-coded and read from external files. These 5 , parallel data files can be edited to improve the accuracy of the database, give metadata information about the fileset, or could be completely modified for use in other GameCube/Wii games which use THP videos similarly. The default fileset should be placed in the Thwimp executable's directory, while those for other games should be placed into their own directory. Upon loading Thwimp, the wanted fileset is loaded by pointing it to its directory from the Data File Dir path option (or directly from the INI settings file). These files can use certain special values as separators/dummy entries. The 5 parallel files are FileListing.txt, FileData.txt, FileDesc.txt, FileCDesc.txt, and FileSet.txt
467570
468571![ Data Files] ( https://raw.githubusercontent.com/Tamk1s/Thwimp/master/readme/DataFiles.png )
469572
470573** Image file data:**
471574
472575- ** FileListing.txt**
473- - Each line is a relative path from THP Root folder pointing to THP files
474- - This is the list of files shown in the "THP Files" drop down box in "THP" tab
475- - Dummy entries should be listed as "============================="
576+ - Each line is a relative path from the THP Root folder pointing to THP files
577+ - This is the list of files shown in the "THP Files" drop down box in "THP" tab
578+ - Dummy entries/separators should be listed as "============================="
579+ - 0th entry **must** be a dummy entry
476580
477581- ** FileData.txt**
478582 - Each line has a list of values for all of the data for each THP file in FileListing.txt
479583 - Data fills in all of the numeric fields under the "THP Info" group box
480584 - Each entry in each line should be separate by commas (",")
481585 - Each line should end with a semicolon (";")
482586 - Lines used for dummy entries should be all zeroes (0s)
483- - Data for each line (see "THP Info" in Section 3.)
587+
588+ - **Data for each line (see _"THP Info" in Section 3_)**
484589 - Width (Total dims)
485590 - Height (Total dims)
486- - R
487- - C
488- - Subv
489- - Multi
490- - Tot. Subv
491- - Subv Width
492- - Subv Height
493- - Pad Width
494- - Pad Height
495- - Subv (mult) frames
496- - Total frames
497- - FPS
498- - Ctrl?
499- - Audio?
500- - Stereo?
501- - Freq (Hz)
502- - Corresponding Visual Basic data type for each entry
503- - [UShort](https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/ushort-data-type)
591+ - R (Array)
592+ - C (Array)
593+ - Subv (Array)
594+ - Multi (Subvideo Info)
595+ - Tot. Subv (Subvideo Info)
596+ - Subv Width (Subv dims)
597+ - Subv Height (Subv dims)
598+ - Pad Width (Subv dims)
599+ - Pad Height (Subv dims)
600+ - Subv (mult) frames (# of frames)
601+ - Total frames (# of frames)
602+ - FPS (Control)
603+ - Ctrl? (Control)
604+ - Audio? (Audio)
605+ - Stereo? (Audio)
606+ - Freq (Hz) (Audio)
607+
608+ - **Corresponding Visual Basic data type for each entry**
609+ - **[UShort](https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/ushort-data-type)**
504610 - UShort
505- - [Byte](https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/byte-data-type)
611+ - ** [Byte](https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/byte-data-type)**
506612 - Byte
507613 - Byte
508614 - Byte
@@ -513,17 +619,85 @@ The data for each THP from the original MKWii game is hard-coded and read from e
513619 - UShort
514620 - UShort
515621 - UShort
516- - [Single](https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/single-data-type)
517- - Byte as Boolean Bit (0=false, 1=true)
622+ - **[Single](https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/single-data-type)**
623+ - This is parsed with invariant (EN-US) culture, and is expected to be in the format of ww.dd (dot character for fractional separator)
624+ - w = whole part
625+ - d = decimal part
626+ - **Byte as Boolean Bit (0=false, 1=true)**
518627 - Byte as Boolean Bit
519628 - Byte as Boolean Bit
520629 - UShort
521630
522631 - **FileDesc.txt and FileCDesc.txt**
523632 - Former used as a text file describing the usage/formatting of each THP video
524- - Latter used as a text file describing the usage/formatting of the control signal in the padding
633+ - Latter used as a text file describing the usage/formatting of the control signal in the padding
634+ - Each line is a [String](https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/string-data-type) data type
525635 - Both should use "n/a" if unused/for dummy entries
526- - Text must be single-line for each THP file in order to be in parallel with FileListing.txt
636+ - Text must be single-line for each THP file, in order to be in parallel with FileListing.txt
637+
638+ - **FileSet.txt**
639+ - Contains metadata to display in the Options tab, gives basic information about this fileset
640+ - **Data for each line**
641+ - Game
642+ - Description
643+ - Author
644+ - Version
645+ - Date
646+ - **Corresponding Visual Basic data type for each entry**
647+ - [String](https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/data-types/string-data-type)
648+ - String
649+ - String
650+ - String
651+ - String
652+
653+ ** Song.wav**
654+
655+ If the "Elevator Music" option is set, Twhimp will playback a wav file (looped) during the long THP encoding process. This is used to indicate to the user that the encoding procedure is still running, and that it has ended when it stops. This file must be placed in the Thwimp exectuable's directory, and should be loopable.
656+
657+ ** INI Settings file**
658+
659+ Options can be saved/loaded from/into the application, using the "Load/Save Settings" buttons within the Options Tab. When saving, Thwimp will generate a valid INI settings file that it will understand.
660+
661+ ![ INI.png] ( https://raw.githubusercontent.com/Tamk1s/Thwimp/master/readme/INI.png )
662+
663+ ** Thwimp INI file format:**
664+ - ** Basic info**
665+ - INI file starts with a magic header, also indicating the version of Thwimp that generated it
666+ - All other entries define options data
667+ - Data entry format
668+ - String marker
669+ - Assignment operator " = "
670+ - Data
671+ - Paths are always **absolute** paths
672+ - Rest of data are **bits (0=false, 1=true)** for checkboxes
673+ - ** Header info**
674+ - File **must** start with valid header!
675+ - Consists of string [Thwimp.ini v(version number)]
676+ Version number should be in the format a.b.c.d
677+ - Version will be used in the future for backwards compatibility/legacy purposes, if INI format changes
678+ - ** Data**
679+ - Markers and their usage (**must** be in this order)
680+ - THPRoot
681+ - Path to THP root directory
682+ - FFMpegDir
683+ - Directory to FFMPEG\bin installation folder (with FFMPEG.exe and FFPLAY.exe)
684+ - FFplay_wdir
685+ - Working directory FFPlay
686+ - irfanview
687+ - Path to Irfanview executable (i_view32.exe)
688+ - thpconv
689+ - Path to THPConv.exe executable
690+ - dataDir
691+ - Path to folder with the game's fileset data defintiion files
692+ - If path is to default fileset (in Thwimp executable's directory), then use 0 instead
693+ - audio
694+ - Audio checkbox option (bit)
695+ - audio_bgm
696+ - Elevator music checkbox option (bit)
697+ - log_msgBox
698+ - Less MsgBox checkbox option (bit)
699+ - log_Full
700+ - Full Log checkbox option (bit)
527701
528702## 6. Change Log
529703 - ** v1.2: 2nd revision, bugfixes, enhancements, CLI support (08/01/20)**
@@ -725,36 +899,47 @@ Development of the 1st release was from October 19-23, 2018. It was based on my
725899
726900## 7. Known Issues
727901 - Encoded THP videos may lag or stutter on real hardware (especially when streaming modded files from SD card via Riivolution)
728- - Read "Streaming bandwidth notes" subsection in Section 3 ( How to use it) about this issue.
902+ - Read ** "Streaming bandwidth notes" subsection** in ** Section 3 How to use it** about this issue.
729903
730904## 8. Credits:
731905
732- - The creators of FFMPEG and FFPlay,
733- - A complete, cross-platform solution to record, convert and stream audio and video.
734- - [ FFMPEG.org webpage] ( https://www.ffmpeg.org/ )
735-
736- - Irfan Škiljan, the creator of IrfanView,
737- - An image viewer, editor, organizer and converter program for Microsoft Windows
738- - [ Irfanview webpage] ( https://www.irfanview.com/ )
739-
740- - "Diddy Kong" the creator of THPGUI (from the Super Smash Bros. Brawl forums)
741- - [Do a Google Search](http://www.google.com)
742-
743- - Tock, Wiimm, the MKWii modding community, et. al.
744- - For all of their technical information and for the MKWiiki
745- - [MKWiiki](http://wiki.tockdom.com/wiki/Main_Page)
746-
747- - The Paper NES Guy (DeviantArt)
748- - [ Thwimp artwork] ( https://www.deviantart.com/the-papernes-guy/art/Thwomps-Thwomps-Thwomps-186879685 )
749- - Asneter (DeviantArt)
750- - [ Filmstrip art] ( https://www.deviantart.com/asneter/art/Filmstrip-stock-349762273 )
751- - Flipfloppery (DeviantArt)
752- - [ Lakitu art] ( https://www.deviantart.com/flipfloppery/art/Piras-kart-445108302 )
753- - ariarts258 (DeviantArt)
754- - [ MKWii Riding art] ( https://www.deviantart.com/ariarts258/art/mario-kart-wii-244952252 )
755-
756- - Nintendo
757- - Nintendo Wii
758- - Mario Kart Wii
759- - Super Mario franchise
760- - Etc.
906+ - ** Special thanks (v1.2 Beta Testers, error reporters, etc)**
907+ - Application would still be broken and usuable from v1.1 version without their helpful error reports!
908+ - [H1KOUSEN](https://www.youtube.com/channel/UC_a_CsLJGAcUHKUFoIhukwQ/videos)
909+ - For pointing out that v1.1 was broken and unusable
910+ - Lead to discovery and fixing of [issue #5](https://github.com/Tamk1s/Thwimp/issues/5) and [Issue #6](https://github.com/Tamk1s/Thwimp/issues/6)
911+ - [Moukrea](https://github.com/Moukrea)
912+ - For discovering and reorting [Issue #11](https://github.com/Tamk1s/Thwimp/issues/11) when parsing strings as single in a foreign culture
913+
914+ - ** Co-utilities**
915+ - The creators of FFMPEG and FFPlay,
916+ - A complete, cross-platform solution to record, convert and stream audio and video.
917+ - [ FFMPEG.org webpage] ( https://www.ffmpeg.org/ )
918+
919+ - Irfan Škiljan, the creator of IrfanView,
920+ - An image viewer, editor, organizer and converter program for Microsoft Windows
921+ - [ Irfanview webpage] ( https://www.irfanview.com/ )
922+
923+ - "Diddy Kong" the creator of THPGUI (from the Super Smash Bros. Brawl forums)
924+ - [ Do a Google Search] ( http://www.google.com )
925+
926+ - ** Artwork assets**
927+ - The Paper NES Guy (DeviantArt)
928+ - [ Thwimp artwork] ( https://www.deviantart.com/the-papernes-guy/art/Thwomps-Thwomps-Thwomps-186879685 )
929+ - Asneter (DeviantArt)
930+ - [ Filmstrip art] ( https://www.deviantart.com/asneter/art/Filmstrip-stock-349762273 )
931+ - Flipfloppery (DeviantArt)
932+ - [ Lakitu art] ( https://www.deviantart.com/flipfloppery/art/Piras-kart-445108302 )
933+ - ariarts258 (DeviantArt)
934+ - [ MKWii Riding art] ( https://www.deviantart.com/ariarts258/art/mario-kart-wii-244952252 )
935+
936+ - ** General**
937+ - Tock, Wiimm, the MKWii modding community, et. al.
938+ - For all of their technical information and for the MKWiiki
939+ - [MKWiiki](http://wiki.tockdom.com/wiki/Main_Page)
940+
941+ - Nintendo
942+ - Nintendo Wii
943+ - Mario Kart Wii
944+ - Super Mario franchise
945+ - Etc.
0 commit comments