P4GPC Potential Video Slowdown Fix

Describe your problem in as much detail as you can. Other users might help.
Post Reply
rwkhwk
Posts: 5
Joined: Sun Jun 14, 2020 11:56 pm
Has liked: 4 posts
Been liked: 5 posts

Edit: This method doesn't work, but look below for other potential fixes

I'll get right into it.

P4GPC videos are WMVs renamed with a .USM file extension, encoded with WMV8. My thinking here is that because WMV7 is less CPU-intensive than WMV8, re-encoding these videos with WMV7 might have a positive effect on the video slowdowns that some people are seeing.

So, I unpacked movie00002.pac, re-encoded each of those videos with WMV7, and repacked them. I've verified that the modified videos play in-game, but I never had the slowdown problem to begin with so I need someone to test that part for me.

If you're having the video slowdown problem and are interested in testing, I have the modified movie00002.pac here: https://drive.google.com/file/d/1143VZ9 ... sp=sharing

If you need instructions on how to replace this file, see this doc: https://docs.google.com/document/d/1dgq ... sp=sharing

movie00002.pac contains the opening animations, so you should see a difference off the bat. I just need to know if you see a difference, better or worse. All feedback is welcome, even if it's to tell me I'm an idiot and going about this the wrong way!
Last edited by rwkhwk on Mon Jun 15, 2020 1:33 pm, edited 1 time in total.
User avatar
ShrineFox
Site Admin
Posts: 290
Joined: Mon Oct 07, 2019 3:19 am
Has liked: 277 posts
Been liked: 115 posts

Nice idea, thanks for taking the time to try it out and share it! I'll be sure to spread the word to anyone experiencing the issue.
In the meantime, I've seen people having issues re-encoding videos themselves, any tips on that?
rwkhwk
Posts: 5
Joined: Sun Jun 14, 2020 11:56 pm
Has liked: 4 posts
Been liked: 5 posts

Hey, thanks Shrine! Appreciate you spreading the word

For the re-encoding process I'm importing each video into a Premiere/After Effects project, sending them to the Adobe Media Encoder queue one at a time, then batch exporting that way. Pretty darn clunky, but Handbrake doesn't do WMV.

As for export settings, here's a screenshot but the default Windows Media format settings in AME will work just fine. However for these WMV7 test files I've changed the Video Codec to "Windows Media Video V7". Once it's exported, make sure to change .WMV to .USM of course. I'm not sure how others are repacking the .PACs, but I'm using NR1_Packer. I'm happy to whip up a quick tutorial video if there's enough interest
User avatar
TheGershon
Posts: 1
Joined: Mon Jun 15, 2020 2:45 am
Been liked: 2 posts

Just gave this a shot, but unfortunately I see no difference on my machine.

And just to confirm that I installed it right -
Image

EDIT: Actually, upon comparing the two again I noticed that this does help a bit, but definitely doesn't fix the problem. The stuttering is just a little bit improved.
AngelicDemon
Posts: 9
Joined: Wed Feb 19, 2020 12:19 am
Has liked: 15 posts
Been liked: 2 posts

I'm actually actively trying to fix the slowdown myself via instruction. Someone made a guide about/for altering the game and one of the two examples is fixing the stuttering.

Personally, just doing this for the OP alone, while it helped a little, as it was before altering the OP movie, even afterwards, I couldn't even run the file itself outside the game. I've had these video slowdown problems with two other games, and both were resolvable.

They both came down to videos having too high of bitrates, and which could also be the case for this as well. I'm no personal professional with these things either, it's just info I personally stumbled across for this game that also happens to relate to the past 2 games I had the problem with.

EDIT: I'm here to say after my own personal efforts that while trying this again but a bit more differently to try to batch multiple movie files, they're DEFINITELY a lot more do-able sometimes, while still being laggy/stuttery in-game, but as I said, the quality drops HARD. I definitely encourage someone else who better knows what they're doing to see what they can do.
rwkhwk
Posts: 5
Joined: Sun Jun 14, 2020 11:56 pm
Has liked: 4 posts
Been liked: 5 posts

Thanks for testing, Gershon and Angelic!

Angelic, I had a look at that Steam Community page to see what they're doing differently. Looks like I re-encoded at 10Mbps as opposed to the recommended 8Mbps. While Windows shows the original video files at 122kbps, they're actually ~33Mbps so I can see how that'd cause some slowdown.

In any case, if anyone can verify that the FFMPEG method is a viable fix I'd be glad to re-encode and upload all the video files using that method for folks with less powerful computers (if it hasn't been done already)

I also saw this post mentioning that P4GPC isn't Large Address Aware. Their solution might be worth a shot
AngelicDemon
Posts: 9
Joined: Wed Feb 19, 2020 12:19 am
Has liked: 15 posts
Been liked: 2 posts

rwkhwk wrote: Mon Jun 15, 2020 1:32 pm Thanks for testing, Gershon and Angelic!

Angelic, I had a look at that Steam Community page to see what they're doing differently. Looks like I re-encoded at 10Mbps as opposed to the recommended 8Mbps. While Windows shows the original video files at 122kbps, they're actually ~33Mbps so I can see how that'd cause some slowdown.

In any case, if anyone can verify that the FFMPEG method is a viable fix I'd be glad to re-encode and upload all the video files using that method for folks with less powerful computers (if it hasn't been done already)
With the 4GB patch applied, and trying this method again, it's again, improvement? (Since you made this post, they actually bumped it up to 10M themselves, which is what yielded me this result) But it's not all gone still, and is very much still noticeable, so I went back to dig up the OP movie file of the last game that gave me this problem, and ran it through FFMPEG for info on the bitrate and whatever else it may say.

The other game's OP movie is 7M (7,239 kb/s), while P4G's OP movie is 30M (30,940 kb/s) as the guide mentions. Even with the bitrate taken down to match the other OP movie, the problem STILL remains persistent. All I can do is post the FFMPEG info/analysis results between movies to see if anyone can figure out what's up by any chance if it's encoding related or something.

(Also EDIT: I've literally gone down as far as 2M via the FFMPEG method. Even THIS low, while this was the smoothest (naturally with the heavy sacrifice of quality), it still got worse again towards the end of the OP movie. I'm not sure what to say and or make of this anymore honestly, as I'm thinking that I'm way over my own head in this at this point now..)
Persona 4 Golden OP Movie
Input #0, asf, from 'p4ctop3_e.usm.wmv':
Metadata:

date : 2019-09-25T13:35:41+09:00
encoder : Lavf58.33.100
Duration: 00:01:34.08, start: 0.000000, bitrate: 30940 kb/s
Stream #0:0: Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 1920x1080, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:2: Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, stereo, fltp, 128 kb/s
Other OP Movie
Input #0, ogg, from 'OP2.ogv':
Duration: 00:02:12.93, start: 0.000000, bitrate: 7239 kb/s
Stream #0:0: Data: none
Stream #0:1: Video: theora, yuv420p, 1920x1080, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
Metadata:

DATE : 2018-09-15T11:25:47.00141
ENCODER : ffmpeg2theora-0.29-9-gbff0c7c
SOURCE_OSHASH : ed50ea5273d91e9b

Stream #0:2: Audio: vorbis, 48000 Hz, stereo, fltp, 192 kb/s
Metadata:

DATE : 2018-09-15T11:25:47.00141
ENCODER : ffmpeg2theora-0.29-9-gbff0c7c
SOURCE_OSHASH : ed50ea5273d91e9b
rwkhwk
Posts: 5
Joined: Sun Jun 14, 2020 11:56 pm
Has liked: 4 posts
Been liked: 5 posts

Thanks again for your work on this, Angelic!

At this point I'm just about ready to say that this isn't (solely) an encoding problem, but a problem with how the game handles video/video decoding. Pretty funny to see that Atlus tried this themselves, though. And very strange that your barebones encoding still chugs at the end...

Looking deeper at that Special K thread I posted, it seems like that 4GB patch might not work in some (or all) cases. Tbh it's unclear who really knows what they're talking about in that thread lol

Out of curiosity, what are your system specs? Namely, I'm interested in your processor model, amount of memory (RAM), and GPU model/VRAM. You can find these by pressing the Windows key + R, then typing dxdiag in the Run box and hitting OK

Once dxdiag is open, the System tab will show CPU/Memory info, outlined here

The Display 1 tab will show GPU and VRAM info, see this image

From here you can see that my processor is an i7-5820K with 12 cores (12 CPUs), I have ~48GB of RAM, and a GTX 1070 with 8GB of VRAM.

Finally, if you're still interested in troubleshooting at this point, this ZIP file contains both the original and re-encoded versions of the OP animation. I'd be curious to see if your computer can play the video files outside of the game without chugging.
AngelicDemon
Posts: 9
Joined: Wed Feb 19, 2020 12:19 am
Has liked: 15 posts
Been liked: 2 posts

My specs aren't anything special, not even remotely for gaming someone else has told me, but they work great for the games I've been wanting to play that I pretty much couldn't before.

As for the videos you've sent me, I have two different non-default media players. MPC-H and VLC.

Upon getting this laptop, I pretty much only got MPC-H since some reason it felt more optimal to me than VLC, and I tried ot run the untouched OP with it, and it wouldn't show any visuals nor play a hint of audio unless I directly clicked into a part of it, and a visual would appear and freeze, along with a half-second's amount of hearing audio before also disappearing, but the timeline proceeds as though it's playing anyways.

This had me confused until I tried getting VLC since I heard having it open while playing some reason fixes the videos, which didn't work for me. But what DID surprise me is that VLC plays the untouched original OP with no problem. All of this gets stranger though because my own re-encoded OP movies using the FFMPEG method would still have the same problem, but play in-game regardless, albeit with issues still. But your re-encoded OP plays just fine in MPC-H, so I'm honestly not sure what any of it means.

The original OP works in-game, but not outside with MPC, but it does work outside with VLC.
Your re-encoded OP works with MPC-H without issue, and same with VLC.
My own re-encoded OP doesn't work with MPC-H, but does with VLC.

EDIT: As crazy as it sounds, while there's yet again still some problems as has been so far? Your re-encoded OP was close to the best result I could've managed while maxing out settings (at a resolution of 1366x768, FPS varying with VSync on and off with the 4GB patch)

EDIT 2: I tried all of theses circumstances again with Special K, and I can't tell if it just worsened again or got better, but I'm thinking worse surprisingly.

Last EDIT for now: After experimenting even more with things like dxvk and preventing steam overlays from appearing, I can't really tell if I've made any progress today or not whatsoever, other than if anything, dxvk is probably helping with the main game due to draw call stuff that I've heard about numerous times already, but for all I can tell, nothing regarding the cutscenes.

I really hope this can be resolved via mods in the case that ATLUS doesn't do anything. I keep hesitating and being reluctant to start actually playing this due to wanting to fix the cutscenes first, and if there's REALLY no other way other than hoping ATLUS themselves pull through, THEN I'll probably just suck it up and play as is.

ACTUAL last EDIT: Okay, this is STILL unbelievable to me, but somehow updating my drivers, complete with a restart.. 99.9% of cutscene issues just.. Eliminated like it was never a problem. There will OCCASIONALLY be a tiny hiccup here and or there, but literally with the original movie00002, with the other ones untouched to begin with, the movies are as good as fine now. STILL doesn't play in MPC-H, but it's actually functioning in-game now.. I don't know what to think anymore..
Post Reply
cron

Created by ShrineFox. Maintained 2020 - 2024.
Support | Privacy | Terms
This site is NOT affiliated, associated, authorized, endorsed by, or in any way officially connected with Atlus Co., Ltd, Atlus U.S.A., Inc. or Sega Games Co., Ltd, or any of its subsidiaries or its affiliates.