1. Hello Guest! Did you know that we're also on Discord? You can join us here: https://discord.gg/vxqdaG4.
    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:
    68
    Likes Received:
    77
    Trophy Points:
    215
    Gender:
    Male
    Occupation:
    Improving my emulated emotions
    Location:
    AI of a biological supercomputer
    Home Page:
    https://divafanproject.blogspot.com
    #1 Wyrdgirn, Dec 17, 2020
    Last edited: Jul 25, 2021
    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 Creator (PMF Creater in Italian, a little difficult to get too but... I'll solve your life for this time :P https://www.mediafire.com/file/sx22ck1y0vxnb5j/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:
    68
    Likes Received:
    77
    Trophy Points:
    215
    Gender:
    Male
    Occupation:
    Improving my emulated emotions
    Location:
    AI of a biological supercomputer
    Home Page:
    https://divafanproject.blogspot.com
    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...

    In the following link you can find the Bonus videos in Spanish of the Project DIVA Extend, thus verifying that the method is fully functional, you can apply it to a clean ISO of the Project DIVA Extend or to the ISO patched with the translation that you will find there (in this case first you need to apply the translation and then the videos, it doesn't work the other way around), another thing, the PSP users can't apply the translation, this still doesn't work there, they can only apply the patch with the videos, then they open the game and in the home screen (where it says Press start button...) they wait a while without touching anything and they will see the Opening or, extract the videos from the ISO and see it using the PMF Player...

    https://divafanproject.blogspot.com/2020/02/parche-espanol-project-diva-extend.html


    [​IMG]

    [​IMG]


    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. Wyrdgirn

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

    Joined:
    Jan 31, 2020
    Messages:
    68
    Likes Received:
    77
    Trophy Points:
    215
    Gender:
    Male
    Occupation:
    Improving my emulated emotions
    Location:
    AI of a biological supercomputer
    Home Page:
    https://divafanproject.blogspot.com
    #3 Wyrdgirn, Dec 17, 2020
    Last edited: Jan 15, 2021
    The post has been translated from Spanish, if you find any errors please let me know :)

    It took me a few months to edit the videos and after each draft I improved on the subject until I remade some scenes like the Bonus01 Musical Festival, etc... If you have a translation of these videos in English you can send them to [email protected] to add them to the videos of the English patch that is in development, your name will appear in the patch credits, the song lyrics are also welcome (I am makes it a bit difficult to make sense of it after translating it since my English is a bit limited ('^^) )
     
    steelpuxnastik likes this.
  4. 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.
  5. Wyrdgirn

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

    Joined:
    Jan 31, 2020
    Messages:
    68
    Likes Received:
    77
    Trophy Points:
    215
    Gender:
    Male
    Occupation:
    Improving my emulated emotions
    Location:
    AI of a biological supercomputer
    Home Page:
    https://divafanproject.blogspot.com

    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
     
  6. 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?
     
  7. 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!
     
  8. Wyrdgirn

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

    Joined:
    Jan 31, 2020
    Messages:
    68
    Likes Received:
    77
    Trophy Points:
    215
    Gender:
    Male
    Occupation:
    Improving my emulated emotions
    Location:
    AI of a biological supercomputer
    Home Page:
    https://divafanproject.blogspot.com
    The size of the final file (PMF) does not matter, the important thing is not to abuse the bitrates to avoid problems and incompatibilities

    In the size of the PMF there is no limit, you only have to adjust the bitrate to obtain the same size as the original PMF if you are going to inject it into the ISO via Hexadecimal (that is, without changing the size of the file in the ISO header), 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

    I suppose you want to read a little about why not abuse the bitrate, in that case open the spoiler...


    Increasing the bitrate a lot will only make the video frames (or the frames of the audiotrack) weigh much more, in this case I recommend adding the bitrate of video and audio, divide them by 8 to convert them to kilobytes and make sure that the result is not greater than the maximum speed at which the system accesses the memory or disk where the file will be stored, an example:

    The speed of an audio CD is 150 Kilobytes, wav audios have a bitrate of approx. 1.411 kilobits per second, divided by 8 is approx. 176 kilobytes per second, if the bitrate becomes slow the audio would be choppy because the reading speed decreases and all the data cannot be read in time, producing cuts, the same it happens with DVD's and many other systems, that's why you should not abuse bitrates, but in your case there is no need to exceed 1800 kilobits of bitrate in the video of a PMF for PSP ;D

    Anyway, the total size of the PMF depends on its creator and the way you inject it into the game file (in this case it's the ISO...), if you use an
    ISO editor, the size of the PMF doesn't matter, but don't overdo it, eh?

    The idea of not exceeding the access limit to the disk or memory is to avoid cuts when playing the file, just as it happens with a dirty or scratched CD or DVD

    Although you also have to take into account the limits of the equipment where it will be played, many codecs are not capable of quickly decoding videos with a very large bitrate, in these cases you would only get slow playback or that the codec skips frames to try to synchronize it with the audio Not to mention that sometimes it can end in an error that indicates that the video is incompatible or in a crash when trying to play it due to an framebuffer overloaded, that is why you should not abuse the bitrates

    Hehe, the testament ends here XD



    Cheers! =D
     
  9. 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