1. Hello Guest! Looking for Mods or help with Modding Mega Mix+ or Arcade Future Tone? There's a Discord for that: https://discord.gg/cvBVGDZ.
    Dismiss Notice

[2020] Create PMF Videos for PSP games

Discussion in 'General' started by Wyrdgirn, Dec 17, 2020.

  1. Wyrdgirn

    Wyrdgirn I'm a faithful lover of Megurine Luka!! :-3

    Joined:
    Jan 31, 2020
    Messages:
    83
    Likes Received:
    79
    Trophy Points:
    240
    Gender:
    Male
    Occupation:
    Improving my emulated emotions
    Location:
    AI of a biological supercomputer
    Home Page:
    https://github.com/Wyrdgirn
    #1 Wyrdgirn, Dec 17, 2020
    Last edited: Sep 21, 2023
    Has anyone ever translated a game and felt the need to edit the videos as well? well...

    I will assume that you know a little about the subject so it will be easy for you to do it, otherwise you will have to read carefully or you will not be able to create the PMF...

    This is Part 1 of the post, Part 2 is in the first comment ...​


    What do we need:

    • 7zip or WinRAR (they will already have one of those :P is only to decompress the necessary files, although it also serves to extract files from the ISO ...)
    • VGMToolbox ( https://www.mediafire.com/file/6xnb4cqwn318n8z/vgmtoolbox_bin_r1040.7z/file )
    • The video editor of your choice (Optional if you already have the edited video ...)
    • FFmpeg (To convert the videos, any video encoder will work but I recommend this one since it generates compatible files the first time, the others tend to fail and require configuration over and over again to get it to work... ffmpeg.org )
    • UMD Stream Composer (a little difficult to get since I think it is illegal to distribute it over the internet... I'll see what I can do for you ;D )
    • PMF Creater (I have modified it to correct one of its biggest flaws... The conversion speed. This version (v1.1b) is now able to convert .mps's to .pmf's in 2 seconds or less! >8O of course, the speed depends on your HDD or SSD :P https://www.mediafire.com/file/ghlr0r9evvm1lv7/PMFCreater.zip/file )


    The next thing is to get the necessary files to create the PMF, first you have to create a file with only the video in .avi format and using the mpeg4 codec and for the audio a .wav file with a sample rate of 44100Hz, if you have already created those files using a converter then scroll down to the next block (Part 2), if the files you created with the converter don't work for you or you haven't created them yet then read the following to create them using FFmpeg...​


    Well, having everything ready let's start at once, it is not as complicated as it seems... I think...:
    If what you want is to edit the PMF of a game, continue reading, if you already have the edited video then skip this...:

    1. First you must get the PMF files of the game, you will have to extract them from the ISO and save them in an empty folder, then keep reading...
    2. Open the VGMToolbox, now go to "Misc. tools -> Stream tools -> Video demultiplexer"
    3. In Format select PMF (PSP Movie Format) then drag and drop the PMF into the app and wait for the extraction to finish, then in the folder where your PMF is located you will have two files with the same name but with the .oma extension (the audio) , and .264 (the video)
    4. Press WINDOWS + R and in the window write "cmd" without quotes, press [Enter] or click on Ok to open the console
    5. In the console window type cd and leave a space, then drag and drop the folder where the ffmpeg.exe is located inside the console window, finally press [Enter]...
    6. Type ffmpeg -i and leave a space, then drag and drop the video file (.264) that you extracted with the VGMToolbox into the console, return to the console and leave a space and type -i and leave a space again, drag and drop the audio file (.oma) inside the console, go back there, leave a space and this time write -map 0 -map 1 -s 1440x816 and leave another space and drag and drop the PMF inside the console but change the extension to .mp4 (see the images below so you can see how it looks ...)
    7. Press [Enter] and a .mp4 file will be generated with triple the resolution, that way you can edit it and by taking it to its original resolution your modifications would not lose much quality...
    [​IMG]

    [​IMG]

    Preparing to convert to PMF:

    At this point you have already edited the video, right? Or maybe you already have the video ready with which you want to replace the original PMF, because whatever the case the format must be a known one (I recommend mp4 and mkv)

    1. Press WINDOWS + R and in the window write "cmd" without quotes, press [Enter] or click on OK to open the console
    2. In the console window type cd and leave a space, then drag and drop the folder where the ffmpeg.exe is located inside the console window, finally press [Enter]...
    3. Well, now I guess the ffmpeg you have will have the ffprobe right? then write ffprobe, leave a space and drag and drop the edited video to the console
    4. If you don't have the ffprobe then type ffmpeg -i, leave a space and drag and drop the edited video to the console, then press [Enter]
    5. Go to the end of the testament, you will notice that it shows the video and audio of the file, memorizes its ID, it's that #X:X, that's important
    6. [​IMG]
    7. Then it only remains to separate the files, for this do not close the console yet, write ffmpeg -i, leave a space and drag and drop the video into the console, then leave another space and write -map X:X -vf scale=480:272:flags=lanczos -vb 4M (the X:X is the ID of the video, in my case it would be -map 0:0 -vf scale=480:272:flags=lanczos -vb 4M), then leave a space and drag and drop the edited video into the console again but change its extension to .avi
    8. Press [Enter] and wait for it to finish, when it does, type ffmpeg -i leave a space and drag and drop the edited video, leave a space but now just type -ar 44100 leave another space and drag and drop the edited video again but change its extension to .wav and press [Enter]
    9. With this you already have the files ready for conversion to PMF, I recommend moving those files (.avi and .wav) to the root of your disk (C:\, D:\, etc...) to avoid problems
    10. If I have time I make a script or some frontend for the ffmpeg that does it all for you, what follows is a little easier, I promise XD

    [​IMG]

    [​IMG]

    [​IMG]
     
    steelpuxnastik likes this.
  2. Wyrdgirn

    Wyrdgirn I'm a faithful lover of Megurine Luka!! :-3

    Joined:
    Jan 31, 2020
    Messages:
    83
    Likes Received:
    79
    Trophy Points:
    240
    Gender:
    Male
    Occupation:
    Improving my emulated emotions
    Location:
    AI of a biological supercomputer
    Home Page:
    https://github.com/Wyrdgirn
    #2 Wyrdgirn, Dec 17, 2020
    Last edited: Oct 4, 2023
    Part 2:
    Converting to MPS:

    To create the PMF, you must first convert the videos to MPS and then with this file the PMF is generated

    1. Open the UMD Stream Composer and click on [New] at the top left
    2. In Clip name put the name of your video, the comment is optional
    3. In Project name put the name of your project (the one you like the most), the comment is optional
    4. Click on next and check the box PSP Movie Format (for game), in Max clip size put the maximum size you want your video to have (in megabytes), for example mine must have a maximum of 19 megas ...
    5. Click on Finish and now it only remains to import the files
    6. Click on Video Source, then Open and select the .avi file that you created before and then click OK
    7. Click on Audio Source, then Open and select the .wav file that you created before and then click OK
    8. Click on Video Enc setting and in the Average Bitrate box increase its value a little (for example, if it is 1000, start with 1100, 1110, etc...), click on OK and repeat this step until the weight of the file is the most as close as possible to the maximum size you want the video to be ...
    9. You have already done everything right? Well, press [Start] at the top left, then where it says Encode click and change to Encode + Multiplex, click [Start] and go see a movie (it takes a lot ('^^) )
    10. After having created the PMF go to your Documents folder and you will find the UmdStreamComposer folder, enter it and then in MuxWork\Name_of_your_Project and inside there are numbered folders, most likely yours is only 0001 of course that if you have only converted a single video , if you convert more then there will be other folders (0002, 0003...), enter the folder and you will see an MPS file, move it to an easy to locate path (your personal folder, the root of your disk, etc...)
    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]


    Creating the PMF:

    1. Open the PMF Creater and in Path of your MPS select the MPS, in Save as select the name and the path where you want to save your PMF, finally in Total time you must place the Minutes (M) and Seconds (S) that your video lasts, in my case it is 1M 30S
    2. Click on Convert and go for some French fries and a Coca-Cola, this takes a while: P
    3. It seems that the program stopped responding but it is actually converting the file, just let it do its work for a while and in the end you will have your PMF ready, this is fully compatible with the console, there is a method that is done with a script but only Record a 30-second header to the file, if you want to create a video of any length, the PMF Creater is your only option ...
    4. When the program says Done enjoy then your PMF will be ready for action =D
    [​IMG]


    I hope I have not confused them and I regret the testament but I am a little bad at explaining things ('^^), the video and audio files can be converted using a converter but these many times generate an incompatible file, so I never use them, as I said before, maybe I'll do something soon to help you prepare the videos for editing in addition to preparing them for the UMD Stream Composer, I don't promise but I'll try...

    If what you are going to make is an icon video, you must follow the tutorial but your video must be a maximum of 30 seconds at a resolution of 144x80, and when converting to PMF, check the "Make Icon" option in the PMF Creater.

    I don't think I forget anything... Well, without more to say we read soon!
    (Haha, I was not wrong this time XD XD)​
     
    steelpuxnastik likes this.
  3. plegenda

    plegenda Welcome to DIVA!

    Joined:
    Jul 25, 2021
    Messages:
    4
    Likes Received:
    2
    Trophy Points:
    35
    Hello Wyrdgirn!
    Lets say I just want to take an English Speakin PMF, and change its audio for its Japanese counterpart (video lenght on both is proven to be exactly the same)
    Could I skip some steps in the demultiplexing?
    For instance, I'm not "editing" the video, just changing the audio channel, so maybe not upscale/descale resolution, etc etc.
    If you have a chance let me know how that would work.

    (Context: I'm attempting to "undub" FFT WoTL. Japanese version has no voice acting at all, however they added VAs in the north american one. So I'm planning on removing them by using the jpn audio track. they have the exact same lenght)
     
    Wyrdgirn likes this.
  4. Wyrdgirn

    Wyrdgirn I'm a faithful lover of Megurine Luka!! :-3

    Joined:
    Jan 31, 2020
    Messages:
    83
    Likes Received:
    79
    Trophy Points:
    240
    Gender:
    Male
    Occupation:
    Improving my emulated emotions
    Location:
    AI of a biological supercomputer
    Home Page:
    https://github.com/Wyrdgirn

    Ok, in your case skip the Part 1 of the post and follow these steps:
    1. Open the VGMToolbox, now go to "Misc. tools -> Stream tools -> Video demultiplexer"
    2. In Format select PMF (PSP Movie Format), check Extract audio only, then drag the PMF with the audio you want to use into the app and wait for the extraction to finish, then in the folder where your PMF is located you will have a file with the same name but with the .oma extension (the audio)
    3. Press WINDOWS + R and in the window write "cmd" without quotes, press [Enter] or click on Ok to open the console
    4. In the console window type cd and leave a space, then drag and drop the folder where the ffmpeg.exe is located inside the console window, finally press [Enter]...
    5. Type ffmpeg -i and leave a space, then drag and drop the PMF file with the video you want to use, return to the console and leave a space and this time write -vb 4M and leave another space and drag and drop the PMF inside the console but change the extension to .avi, press [Enter] and wait for it to finish
    6. When it does, type ffmpeg -i leave a space and drag and drop the audio file what do you want to use, leave a space but now just type -ar 44100 leave another space and drag and drop the edited video again but change its extension to .wav and press [Enter] (skip this step if you have already converted the audio to .wav before)
    7. With this you already have the files ready for conversion to PMF, I recommend moving those files (.avi and .wav) to the root of your disk (C:\, D:\, etc...) to avoid problems
    8. Now continue with the Part 2...

    Note: If the UMDStream does not recognize the video, try to move it to a folder whose path does not have space, for example in my case it does not usually work in "C:\Users\Miku Koemi\video.avi" but works in "C:\Users\Miku\video.avi" or in "C:\video.avi"

    The important thing in your case would be to convert both files (video and audio) to .avi and .wav respectively and then multiplex them with the UMDStream to finally pass them to pmf...

    Cheers! =D
     
  5. plegenda

    plegenda Welcome to DIVA!

    Joined:
    Jul 25, 2021
    Messages:
    4
    Likes Received:
    2
    Trophy Points:
    35
    ok I think I'm up to something, so far:
    -I VGMToolBox Demultiplexer, I only extracted Video from the USA PMF, and Audio from the JPN PMF.
    -then I jumped to "create PMF" part of the guide using the .264 and .oma as files (instead of an edited mp4)
    -obviously for the Video part used the .264 with its ID #0.0 , and for audio used the .oma
    -it worked!

    the only thing thats bothering me right now is the average bitrate when using UMD Stream composer. my original PMF file was 7.82mb, so I used 548 avg bitrate to get that exact same number on the new one.
    However I did use 1100bit at one point, and ended with a 13.7mb file... when injected to the ISO it worked as well, so my question is:

    -How do I know what is the Max clip size of the videos in game? do I have a limit?
     
  6. plegenda

    plegenda Welcome to DIVA!

    Joined:
    Jul 25, 2021
    Messages:
    4
    Likes Received:
    2
    Trophy Points:
    35

    I saw this a tad late! xD

    Will def simplify the .264 file part that I used, for the direct PMF file as instructed once I begin transforming all the files.
    Thx for the reply, you are the best!
     
  7. Wyrdgirn

    Wyrdgirn I'm a faithful lover of Megurine Luka!! :-3

    Joined:
    Jan 31, 2020
    Messages:
    83
    Likes Received:
    79
    Trophy Points:
    240
    Gender:
    Male
    Occupation:
    Improving my emulated emotions
    Location:
    AI of a biological supercomputer
    Home Page:
    https://github.com/Wyrdgirn
    #7 Wyrdgirn, Jul 25, 2021
    Last edited: Oct 4, 2023
    The size of the final file (PMF) does not matter, but very low bitrates would cause quality losses, and very high bitrates would cause playback problems.

    In the size of the PMF there is no limit, you only have to adjust the bitrate to obtain the same size or less as the original PMF if you are going to inject it into the ISO via Hexadecimal, if you inject the file with an ISO editor so don't limit yourself, there is no limit because the editor would wrap the file data in the ISO header​

    Cheers! =D
     
  8. plegenda

    plegenda Welcome to DIVA!

    Joined:
    Jul 25, 2021
    Messages:
    4
    Likes Received:
    2
    Trophy Points:
    35

    at the end I did different bitrates of the same cutscene. Did 566 which gave me the exact same size of the Original file, and then I did 2000 which seemed like a big fancy number.
    compared them and realized that the quality didnt reaaaally improve. like, maybe if you go with a magnyfing glass and a neatpicky mindset, you'll find the a quality jump.
    So I stayed with 560-570ish to have almost the same sizes.

    So far is working great!

    Thanks Wyrdgirn! couldnt have done it without you!
     
    Wyrdgirn likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice