• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

MeleeMedia - MTH, THP, and HPS conversion

Furil

Smash Apprentice
Joined
Jul 7, 2014
Messages
164
A little command line tool I put together that can convert to and from several of Melee's media files.

Requires .NET Framework 4.6.1

Download: https://github.com/Ploaj/MeleeMedia/releases/download/LatestCommit/MeleeMedia.zip

Code:
MeleeMedia.exe (input) (output)

Example: MeleeMedia.exe in.mp4 out.mth
Example: MeleeMedia.exe in.mp3 out.dps -loop 00:00:25.34325

Supported Formats:
Video - mth, mp4
Image - thp, png, jpeg, jpg
Audio Input - dsp, wav, hps, mp3, aiff, wma, m4a
Audio Output - dsp, wav, hps
Specify Loop "-loop [d.]hh:mm:ss[.fffffff]
If you encounter any bugs let me know <3
 

Sintendo64

Smash Rookie
Joined
Feb 14, 2008
Messages
14
I can't seem to get the audio to loop. Can you go over how logic of how to use the loop?
 

Sintendo64

Smash Rookie
Joined
Feb 14, 2008
Messages
14
Any tutorials on how to use that? Look amazing!

Not sure how to open or use it though.
 
Last edited:

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
It turns out there was a bug in parsing the arguments for the loop feature. I submitted a fix for it and Furil has already merged it. So the latest commit release (linked in the OP) should now automatically have the fix included. If for some reason it doesn't, I also uploaded a new build here.
 

Walbytamer11

Smash Apprentice
Joined
Jan 8, 2012
Messages
86
Location
Danbury, CT
It turns out there was a bug in parsing the arguments for the loop feature. I submitted a fix for it and Furil has already merged it. So the latest commit release (linked in the OP) should now automatically have the fix included. If for some reason it doesn't, I also uploaded a new build here.
Code:
PS D:\Folder of Folders\Games\Melee\Hacking Resources\MeleeMedia> .\MeleeMedia.exe in.mp4 out.mth

Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'AForge.Video.FFMPEG, Version=2.2.5.0, Culture=neutral, PublicKeyToken=03563089b1be05dd' or one of its dependencies. An attempt was made to load a program with an incorrect format.
   at MeleeMedia.Video.VideoConverter.MP4toMTH(String filePath)
   at MeleeMedia.Program.Main(String[] args) in D:\Tex\Tools\MeleeMedia\MeleeMedia\Program.cs:line 74
PS D:\Folder of Folders\Games\Melee\Hacking Resources\MeleeMedia> Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)\p{L}'} | Select PSChildName, version

PSChildName                      Version
-----------                      -------
v2.0.50727                       2.0.50727.4927
v3.0                             3.0.30729.4926
Windows Communication Foundation 3.0.4506.4926
Windows Presentation Foundation  3.0.6920.4902
v3.5                             3.5.30729.4926
Client                           4.8.04084
Full                             4.8.04084
Client                           4.0.0.0


PS D:\Folder of Folders\Games\Melee\Hacking Resources\MeleeMedia>
Where in.mp4 is in the MeleeMedia folder.
Running Windows 10 Home.
 

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
Code:
PS D:\Folder of Folders\Games\Melee\Hacking Resources\MeleeMedia> .\MeleeMedia.exe in.mp4 out.mth

Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'AForge.Video.FFMPEG, Version=2.2.5.0, Culture=neutral, PublicKeyToken=03563089b1be05dd' or one of its dependencies. An attempt was made to load a program with an incorrect format.
   at MeleeMedia.Video.VideoConverter.MP4toMTH(String filePath)
   at MeleeMedia.Program.Main(String[] args) in D:\Tex\Tools\MeleeMedia\MeleeMedia\Program.cs:line 74
PS D:\Folder of Folders\Games\Melee\Hacking Resources\MeleeMedia> Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)\p{L}'} | Select PSChildName, version

PSChildName                      Version
-----------                      -------
v2.0.50727                       2.0.50727.4927
v3.0                             3.0.30729.4926
Windows Communication Foundation 3.0.4506.4926
Windows Presentation Foundation  3.0.6920.4902
v3.5                             3.5.30729.4926
Client                           4.8.04084
Full                             4.8.04084
Client                           4.0.0.0


PS D:\Folder of Folders\Games\Melee\Hacking Resources\MeleeMedia>
Where in.mp4 is in the MeleeMedia folder.
Running Windows 10 Home.
Do you have the .Net Framework installed? This uses v4.6.1, which you can download from Microsoft here.
 

Walbytamer11

Smash Apprentice
Joined
Jan 8, 2012
Messages
86
Location
Danbury, CT

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
Ploaj has made some updates to the tool and a new build is now available on the releases page, which includes some fixes for mth generation. So I would definitely give that a try. Also, with this new build, you should now be using .Net Framework v4.7.2.
 

Walbytamer11

Smash Apprentice
Joined
Jan 8, 2012
Messages
86
Location
Danbury, CT
I ran the latest from "releases" and was able to produce an .mth.
Timestamp: 2021-12-24T01:15:30.0000000Z

PS D:\...\MeleeMedia> .\MeleeMediaCLI.exe in.mp4 out.mth
[mov,mp4,m4a,3gp,3g2,mj2 @ 01372E20] multiple edit list entries, a/v desync might occur, patch welcome


Followup, is there a way to also replace the accompanying sound file? Still hearing the default music overtop my new mth.
 

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,175
Location
Sacramento, CA
Yeah, these are the audio files for the videos (excluding the MvEnd videos):

MvHowto.mth -> howto.hps
MvOmake15.mth -> swm_15min.hps
MvOpen.mth -> opening.hps

And of course, HPS can be converted via MeleeMedia as well.
 
Top Bottom