Replacing FMVs in PSX games

Discussion in 'Sony Programming and Development' started by Abe J, Jul 17, 2017.

  1. Abe J

    Abe J Newly Registered

    Joined:
    Jul 17, 2017
    Messages:
    4
    Likes Received:
    0
    Hey, ive been working on a fanmod for LSD Dream Emulator, and replacing textures is well very simple..
    But does anyone know how to replace the video files/STR files? I use CDmage to inject the files, preserves the LBAs, encode with MC32 and use JPSXDEC to check the headers. The files dont read as 15fps, and has errors. Importing the files with CDmage say RIFF/XA error.

    Has anyone ever successfully replaced a FMV? I couldn't find any documentation, anyone care to help?

    Thanks.
     
  2. IlDucci

    IlDucci Site Supporter 2015

    Joined:
    Aug 24, 2011
    Messages:
    47
    Likes Received:
    14
    I've done a few frame replacements with jPSXdec, modifying the disc image directly rather than importing modified STRs. You should check jPSXdec's own documentation about PNG->MJPEG replacement.
     
  3. Abe J

    Abe J Newly Registered

    Joined:
    Jul 17, 2017
    Messages:
    4
    Likes Received:
    0
    thanks for the lead
     
  4. IlDucci

    IlDucci Site Supporter 2015

    Joined:
    Aug 24, 2011
    Messages:
    47
    Likes Received:
    14
    I'll reply to your PM with this quick rundown as this will interest a lot of other folks.

    Well, first things first: What you can NOT do with jPSXdec is making videos that have more or less frames than the original ones. What you CAN do, however, is swapping existing frames and audio streams. It's not a perfect method (The main downside is that the video quality is dependant of the original quality, so it might get too blocky). If you want to do full video swaps, I cannot help you.

    I'll give you the quick rundown, but you'll find the detailed information in the PDF file that's with the tool.

    You first need to identify the ID number of the video stream and audio stream you want to modify (Not the file, but the video/audio streams that are in a drop down box next to the files). Then, you need to make a XML file that contains the frames that need to be replaced and the filenames of the PNG/BMP files that contain the new frames (They must have the same resolution as the original video). It's something like this:

    Code:
    <?xml version="1.0">
    <str-replace version "0.1">
        <replace frame="1">frame0000.bmp</frame>
        <replace frame="2">frame0001.bmp</frame>
    (Etc.)
    </str-replace>
    Finally, you have to put those frames into the disc image. The following command WILL overwrite your disc image without any possibility of undoing the work, so keep a copy of the original:

    Code:
    java.exe -jar jpsxdec.jar -x INDEXOFDISCIMAGE.idx -i IDOFVIDEOSTREAM(NUM) -replaceframes XMLFILE.xml
    The audio part is simpler, you just need a WAV with the proper sample rate and channel format, then it's just popping this command (Again, this WILL overwrite your disc image contents):
    Code:
    java.exe -jar jpsxdec.jar -x INDEXOFDISCIMAGE.idx -i IDOFAUDIOSTREAM(NUM) -replacexa AUDIOFILE.wav
     
  5. Abe J

    Abe J Newly Registered

    Joined:
    Jul 17, 2017
    Messages:
    4
    Likes Received:
    0
    To point out, when it comes to editing textures, TIMviewer + CDmage is perfect for this. the BMP's it converts from the TIM files preserves the colour palette so the playstation wont have a problem. I did find some transparency problems with some textures, but i am unsure about that again. Considering the nature of the game im modifying it could actually be more of a feature than a bug.

    Also, in regards to dream emulator, the textures are stored in TIX files, like an archive. TIMviewer will scan and export the pack and recompile preserving where they went in the pack, lba's or so forth. Other games might use a similar design with different extensions.

    Also thanks for simplifying it, if you can replace more than one frame you can replace them all, right? Only one way to find out.
    Being a mac user im more familiar with quicktime 7, and can export any video to 15fps then export to an image sequence.

    As an advice for mac users..

    converting any footage with 'iffmpeg', an updated ffmpeg will make any video prores. you can then chuck it in final cut pro 7, and replace the timeline with videos you have converted with jpsxdec frame perfect.. im sure this whole method will be simplified for anyone to tinker their games, once i get to the bottom of it at least. Windows users im sure theres an easy counterpart with premiere pro.

    Also if youre the breed of mac users TIMviewer will only work in parallels desktop not a wine bottle. i use winxp. Editing in osx with photoshop contains the colour palettes.
     
  6. Abe J

    Abe J Newly Registered

    Joined:
    Jul 17, 2017
    Messages:
    4
    Likes Received:
    0
    To clarify there is everything you need to mod all the textures and fmvs in here. You can replace TIM files and so on with jpsxdec also, but it wont extract them from archives, and using CDmage to inject over the finished TIM file is easier as its a GUI not a command line.

    Further tips..

    Jpsxdec can check the resolution of every STR file, they are always 15fps, with editing videos for replacement.
    When loading frames into the ISO with jpsxdec, you have to keep them in the folder of jpsxdec yourself. The iso is used in reference to where the index for it was generated inside jpsxdec.
    Pre-build an xml sheet with "frame001,002,003.." and go video by video when patching your iso.
    I like to keep the index, xml sheet and iso all in the same folder with jpsxdec, with the frames to be added. You know where everything is and its easier to workflow.
    Umm always use photoshop. Its been proved for centuries..
    Have fun and jack up your old playstation games?
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page