PCSX2 ShadowPlay footage: Variable framerate to CFR with time adjustment

Random chit-chat and anything that doesn't belong elsewhere
Post Reply
Zel
Posts: 2
Joined: Wed Oct 28, 2015 10:08 am

PCSX2 ShadowPlay footage: Variable framerate to CFR with time adjustment

Post by Zel »

So I'm playing Shadow of the Colossus on a ps2 emulator so I can upload a nice 4K 60 FPS video. Problem is when you lag in game, it looks bad. However I believe that shadowplay with it's VFR will record an accurate framerate as to what the current framerate is so if it's below 60, if just for a moment, the framerate in the shadow play file reflects this. Now the reason this is relevant is that when you play a PS2 game, the framerate is 60FPS and should it fall below that the game will lag accordingly as the game logic is tied to the framerate. So if the game runs at 30FPS, the game is running at half speed.

So while I'm playing, sometimes the game will lag and thus not be 60FPS. I was wondering if there was a way with handbrake to compile a VFR video into a constant framerate video with respect to Framerate=Time.

In other words, lets say I have a 10 second VFR video. From 0 to 4 it plays 60FPS, from 6 to 10 it plays 60FPS, but from 4 to 6 it plays at 30FPS. What'd I'd like to do is re-encode the video into a 9 second video. The 2 seconds from 4 to 6 get sped up into 1 second that's 60 frames.

This would accomplish the my goal of making my footage "run at 100% gamespeed" even though it was lagging.

Can handbrake do this? If not does anybody know something that can?
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: PCSX2 ShadowPlay footage: Variable framerate to CFR with time adjustment

Post by mduell »

HB won't do this, but you could with other tools like avisynth. What you want to do is export the video as a series of still images, then tell avisynth to assemble those stills as a 60 fps video.

You didn't mention audio, so I assume there isn't any, but if there is, that will be a pile of tears to speed up and pitch-correct the slow video portions.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: PCSX2 ShadowPlay footage: Variable framerate to CFR with time adjustment

Post by BradleyS »

Possibly the coolest idea I've seen on this forum since 2007 or so. 8)
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: PCSX2 ShadowPlay footage: Variable framerate to CFR with time adjustment

Post by BradleyS »

I second @mduell's suggestion, but after asking the libav developers I have an alternative that can do it in one go. If you're comfortable using the command line, avconv (libav) can do this on the fly with the setpts filter.

Note this example:

Code: Select all

# Fixed rate 25 fps
setpts=N/(25*TB)
Set up the filter on the command line and change 25 to 60, and you should be in business.
Zel
Posts: 2
Joined: Wed Oct 28, 2015 10:08 am

Re: PCSX2 ShadowPlay footage: Variable framerate to CFR with time adjustment

Post by Zel »

Not sure if I'm following. I downloaded avisynth and put that code into HB's x264 Encoder options. Video clip was 37 seconds in and 37 seconds out. Laggy bit was still there. Neither avis nor libav are standalone programs? And yes audio is important, at least to the final product.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: PCSX2 ShadowPlay footage: Variable framerate to CFR with time adjustment

Post by s55 »

HandBrake does not use avisynth. It's a different app.
You can't use its commands with handbrake
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: PCSX2 ShadowPlay footage: Variable framerate to CFR with time adjustment

Post by BradleyS »

AviSynth is a standalone application.

avconv is a standalone application that only runs on the command line (no graphical interface). It's complicated if you aren't familiar with command line interfaces.

Since neither of applications are related to HandBrake, you should ask them for help via their support channels, or somewhere like http://forum.doom9.org/
Post Reply