m35 / jpsxdec

jPSXdec: cross-platform PlayStation 1 audio and video converter
http://jpsxdec.blogspot.com/
469 stars 24 forks source link

Resident Evil 2 Video bug #32

Closed gledson999 closed 3 years ago

gledson999 commented 3 years ago

Environment

jPSXdec version: 1.04 rev 3987 (every version has same bug) Operating system: Windos 7

PlayStation Game (if applicable)

Name: Resident Evil 2 Dual Shock Version Region code (SLUS_007.48):

Description

Inserting png image in the subtitle STR video causes this glitch,

The CG scene freeze the entire video in some scene, an example is in helicopter scene in Leon B Scenario, this freeze in real hardware, XEBRA (Most accuracy Emulator like real hardware).

NOTE: The attachment has .log files when inserting, STR Vídeo that occour this bug and XEBRA save for use in Leon B Scenario.

The Bug: Load the Leon Disc in Leon B scenario using the Xebra save and go to stair in beginning and watch the helicopter scene.

error debug00.log replace.log R108L.zip BU00.zip

m35 commented 3 years ago

Thanks for reporting this issue. Unfortunately I won't be able to really look into it until January.

gledson999 commented 3 years ago

No problem, anything I am available to give more details or possibly help.

m35 commented 3 years ago

I see you attached R108L.STR that is identical to the video on the disc. Could you share the version of the video you modified?

gledson999 commented 3 years ago

Yeah, sure, sorry for mistake R108L_Edited.zip

m35 commented 3 years ago

I'm assuming you're extracting the R108L.STR file, modifying the frames with jPSXdec, the re-inserting the file back into the original disc image. Can you instead try replacing the frames directly on the original disc and see if that helps?

gledson999 commented 3 years ago

The same thing happens regardless of the method!

I'm sending the frame images for you, if you want to test ZMOVIE.zip

m35 commented 3 years ago

Thanks. I'm trying to find the issue with the jPSXdec encoded frames, but can't find anything yet. Maybe it's just frame 189 that's bad and the rest are fine? Could you try not replacing frame 189 but start replacing at frame 190?

<str-replace version="0.2">
    <!-- <replace frame="0189">F:\PLAYSTATION_1_ISO\RE2-Repatch\ZMOVIE\R108L\R108C0189.png</replace> -->
    <replace frame="0190">F:\PLAYSTATION_1_ISO\RE2-Repatch\ZMOVIE\R108L\R108C0190.png</replace>
    <replace frame="0191">F:\PLAYSTATION_1_ISO\RE2-Repatch\ZMOVIE\R108L\R108C0191.png</replace>
...

If frame 190 also causes an error, can you try skipping that and start at 191? Could you try that a few times and see if any frames are working right? It would be extremely helpful to know if it's a general issue, or an issue with only specific frames.

m35 commented 3 years ago

I think I found the issue. All the frames seem to have a max size of 8064 bytes.

image

I tweaked jPSXdec to limit frames to 8064 bytes and encoded a new version. Can you try if it works?

R108L_8064.zip

If that works, I'm left to figure out how to make jPSXdec detect this automatically...

gledson999 commented 3 years ago

Answering the previous questions, almost all frames are problematic, so no solution.

Answearing this question and this file that you sent me, I make a test and really you solved solve the issue successfully, but the quality was bad, but I believe that you purposely do this for testing purposes.

This image are from you R108L_8064.zip that you send image

m35 commented 3 years ago

but the quality was bad, but I believe that you purposely do this for testing purposes.

I'm not seeing a quality issue. Can you show me a comparison of the quality you expect?

gledson999 commented 3 years ago

but the quality was bad, but I believe that you purposely do this for testing purposes.

I'm not seeing a quality issue. Can you show me a comparison of the quality you expect?

Ah, it's nothing important, I just got confused

m35 commented 3 years ago

To support limiting the size of the encoded frame, I'm thinking of adding a new attribute to the xml, for example

<?xml version="1.0"?>
<str-replace version="0.3">
    <replace frame="0189" size-limit="original non-zero">C:\Temp\2020-12-09_18.51.30_rebug\ZMOVIE\R108L\R108C0189.png</replace>
...

That will check the number of non-zero bytes in the existing frame and only generate a new frame within that size limit. That should fix this issue with Resident Evil, and any other game that does this, without the user needing to know what that value is. It's something a user can try if a game doesn't like the frames jPSXdec generates by default.

m35 commented 3 years ago

@gledson999 Can you try this attached version of jPSXdec with the modified replace .xml file? jpsxdec_v1-04_replace-size-limit_rev4019_bin_src.zip videos_frames_replace_R108L.xml.zip If everything works right then I can make a proper release with the changes.

gledson999 commented 3 years ago

Right, I'll test now, thanks

gledson999 commented 3 years ago

Hi, I'm here again!

Good news, It worked perfectly, in my definitive test, I did it with all the videos of Claire and Leon’s Discss, they all worked perfectly.

This was the most brilliant solution I have ever seen, congratulations!

m35 commented 3 years ago

Thank you for thoroughly testing the change, that helps a lot :)

m35 commented 3 years ago

New release should include the change. Comment here if you have any issues. https://github.com/m35/jpsxdec/releases/tag/v1.05