Post subject: PSXjin re-recording
Joined: 6/19/2014
Posts: 14
Could someone explain me how to re-record? I have created a record. It playbacks fine. I tried to uncheck the option of read only and the message was data + write but after the movie finished the playback there was no recording. Alternatively, I have also tried loading the save state from said movie and starting recording a new file from the current state but all that shows up is a blank pre-rendered background (of the game - Resident Evil) with everything else missing (like character models).
Skilled player (1650)
Joined: 7/25/2007
Posts: 299
Location: UK
OK, so you've created the first part of a movie. If you load that movie, it'll show you everything that you've recorded. If during this playback, you load one of your savestates, it'll function as a DVD's title select, and simply jump to that point in the movie and resume playing from there. If instead of viewing you want to resume recording from a particular point, then first you'll need to deselect 'read only' (either before loading, or from the menu during playback), and then load your desired savestate. Loading a savestate when in Read+Write mode is what causes you to resume recording from that point, rather than needing to wait for your whole movie play through.
Joined: 6/19/2014
Posts: 14
For some odd reason this didn't work out. I tried something similar instead. I playbacked the movie, then got to the part where I wanted to resume my recording, did a fresh save state, changed to read + write and then loaded. And it worked! Weird. Only problem I have is that now I need to playback the whole thing before continuing but I'm going to try extending the movie, loading a save state a few seconds before the end of the movie, save state over it and then load again to start recording. I just hope this doesn't desync the video as I've heard about that happening before. One more question. Is the game supposed to be speed-up when you're playbacking it (or even when just playing it)? The sound is sync perfectly despite the game being on crack.
Skilled player (1650)
Joined: 7/25/2007
Posts: 299
Location: UK
I believe I said that, loading a savestate in Read+Write mode is how you resume recording from that point. Naturally, if you don't have a suitable point to record from, you need to create one first. This would be done by viewing the movie in Read-Only mode, and creating one at the appropriate moment; as you apparently did. Strangely enough you don't have to view the entire movie just to get to very the end section. As explained before, when in Read-Only mode you should be able to load any nearby savestate to basically fast forward to that point. EG load a savestate which was at the start of the level/area (which you should have if using them wisely), and you only need to watch from that point on. When near the bit you want, then use Pause+Frame Advance to get to the exact bit, then make a savestate. Then just un-check Read Only mode, and load said savestate to resume recording. Finally, games are not supposed to randomly accelerate, perhaps you are pressing the either + or the TAB button? That fast-forwards the emulator, even though the sound emulation doesn't quite keep up when doing so, hence the inconsistency you reported.
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
Actually, there are games that PCSX and PSXjin fails to use framelimit on. Everything is still deterministic, it will just run at the speed your computer generates, even if that is higher than 50/60 fps.
Joined: 6/19/2014
Posts: 14
Thank you for clarifying that. I now understand the use of load states and how they are supposed to be spread apart for better playback re-playability. I thought that all you had to do was load the state after switching from read only to read + write which did not record, hence my confusion. I have tested the speed of PSXjin vs. pSX fin 1.13 and it turns out I was mistaken. The games are playing at the same speed. Which is weird, for some odd reason PSXjin seems faster. Perhaps it's something to do with the textures. I have another question. I'm currently working on a TAS on Resident Evil's Director. I'm at STAGE 3 (returning to the Mansion) but after rewatching my two previous boss fights against the Yawn [STAGE 1 and early STAGE 3], I'd like to redo them. Is it possible to do this without erasing all of my progress? Or would I need to redo those parts separately and then add them (after erasing the original) to the final recording?
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
It depends on the games RNG, but you could create a copy of the movie you want to edit, fix the mistakes in the copy, and then add the rest of the input from the original movie using a hex editor. If it will work or not is decided by how the game works, it may desync because events happen differently due to reaching places earlier etc.
Joined: 6/19/2014
Posts: 14
I believe that might work considering that what happens in both of these boss fights will not change the outcome for what I'm doing. If you have the time and patience, could you walk me through the process, please? The TAS is nearly finished. Which speaking of, brings me to the next point. I did a bit of testing and when I recorded a portion of the TAS using Lagarith Lossless I noticed that the quality was slightly degraded - in particular the colors. Is it because the in-game playback feature uses some filters or is it because of my choice of the codec? If the former, I assume that nothing can be done but if the latter, what would be the best codec to get the best quality possible? And what codec would you suggest for YouTube upload?
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
I was writing a how to on how to edit movie files using HxD when I opened a PSXjin movie file, and lucky you, PSXjin movie files are text-based. You should be able to use notepad. Unless you ticked "Binary format" when you created the movie. Regarding dumping, I think most encoders use the Camstudio lossless codec. But if you submit here and the TAS gets accepted, it will be encoded by an encoder-member for you. You are welcome to provide a temp-encode if you feel like it, but it's not necessary. Temp-encodes can basically be of any quality. But if you want to make a quality encode (for any reason), have a look in the Encoders corner, should be a lot of information there on dumping and encoding.
Joined: 6/19/2014
Posts: 14
Thankfully, I did not use binary format. I opened my PSXjin movie file in notepad like you said and I lines of text like this: I assume each different part is a segment of the video. How do I determine which part corresponds to what I want to edit and how do I change it? And thank you for that information regarding the codecs. I'll definitely check out that section to find out what suits me more. I could submit my TAS here but it will not be a speed-run so I'm not sure if it will get accepted. It's a Knife Only All Clear No Damage - a study of the mechanics and design of Resident Evil's Director Cut. It's mostly informative and educational for players of the series who have probably never seen many things depicted in it. Some things are within the reach of human ability (and that was one of the reasons why I choose speed 50% for navigation and combat, speed 36% for inventory and puzzles and speed 25%/16% for storage and item checking/combination) but some things require an insane amount of precision and luck so they are unlikely to be performed by a human playing on normal conditions.
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
One line represents one frame of input. You might have an easier time editing the files using a program like Notepad++ which can display line numbers. So the way to find the right place to start copying frames from one file to another is to find the frame-number (using the emulator for example) in the movie your editing from where you want to add input from the other file. Use the same procedure on the other file to figure out the frame-number to start copy from. Remember to consider the lines that make up the header data when you "convert" the frame numbers to line-numbers, I forgot once and it took a while to figure out why it didn't behave like I expected. We also accept rule-restrictions and superplays, it's not all speedruns. (Examples: SNES Family Feud and N64 Super Mario 64 "70 stars, no BLJ") If it's optimized enough (not using frame advance suggests that it unfortunately may not be) and an interesting concept, it could very well be accepted if it's considered entertaining.
Joined: 6/19/2014
Posts: 14
I downloaded NotePad++ and opened the PSXjin movie file there. Are the lines to the left the ones you are talking about? Let's see if I understand the process correctly. First I need to create a backup file of my PSXjin movie which contains all of my progress. Then, go to the part with the boss fight which I wish to remake and record and overwrite the original file. Now I have two files. The starting point of the part I want to replace should be the same for both of them since they are identical - and I'll be using the door loading animations before the boss fight as a reference. Let's call it the first frame and pretend it's frame 101102 for both files. The second frame (the part which ends the remade segment) that I'll pick up from the original file and the new file will obviously be different because the segments will have different lengths. This means that I need to find the exact frame (using frame advance) where both files can be matched (such as the door loading animation on the way back I previously used for reference point). If, say, it's frame 110120 in the original file but frame 110000 in the new file, I'll copy everything from 101102 to 110000 from the new file over 101102 to 110120 to the original file. Is this correct? Unfortunately I could not do full optimization for three reasons: 1. Because this will be a lengthy challenge. I have looked at the final timer (from an incomplete play) and my guess is somewhere near the 2:2X:XX mark. Assuming there's 60 frames per second (which I think is the case here) that's roughly 504000 frames. 2. Because Resident Evil is a 3D game that relies on pre-rendered backgrounds making it very difficult to establish what the best frame alinement to navigate through sections in as little time as possible. Plus I'd have to account for different enemy RNGs in combat for the least time possible. It's possible, but it would take months or maybe even years (depending on time available and interest) to get it done and I'm not willing to invest that much time in it. 3. Because time is not the core factor of this playthrough. I did my best to navigate in the least time consuming way possible (several attempts until I was satisfied with it) and changed the speed to drastic lows for inventory navigation, item storage and puzzles but this is all about the challenge itself and the combat against the enemies. The purpose is to see how the enemy behaves to different situations, what patterns the A.I. is coded and programmed with and what the player can do without compromising its safety. It's a design study, like previously mentioned. I find it an interesting idea since no one has actually attempted anything like this and I did have some similar requests after I presented my rudimentary TAS of Extreme Battle LV.3 in RE2DS of No Weapon & No Damage (that one done only with savestates & loadstates during door loading animations - although with the clear purpose of showing that the challenge was actually possible despite how strikingly difficult it is). I'll upload it to YouTube nonetheless, but I'd be more than happy to see it on TASVideos too.
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
Alyzeej wrote:
I downloaded NotePad++ and opened the PSXjin movie file there. Are the lines to the left the ones you are talking about? [image]
Yeah, remember to check at the top how many lines the header is (the stuff before the first frame of input). If the header is 20 lines, then frame 1 is on row 21 instead of 1.
Alyzeej wrote:
Let's see if I understand the process correctly. First I need to create a backup file of my PSXjin movie which contains all of my progress. Then, go to the part with the boss fight which I wish to remake and record and overwrite the original file. Now I have two files. The starting point of the part I want to replace should be the same for both of them since they are identical - and I'll be using the door loading animations before the boss fight as a reference. Let's call it the first frame and pretend it's frame 101102 for both files. The second frame (the part which ends the remade segment) that I'll pick up from the original file and the new file will obviously be different because the segments will have different lengths. This means that I need to find the exact frame (using frame advance) where both files can be matched (such as the door loading animation on the way back I previously used for reference point). If, say, it's frame 110120 in the original file but frame 110000 in the new file, I'll copy everything from 101102 to 110000 from the new file over 101102 to 110120 to the original file. Is this correct?
It's better to copy everything after frame 110120 in the original over to the new file. That way you have a movie guaranteed to play back in-case the edit would desync. Otherwise you got it correct. Obviously use names for the files so you can tell them apart. Regarding optimization, if you deem it optimized enough you could always try to submit it, but it may end up rejected if it's considered too in-optimal. Submission is no requirement though, it's entirely up to you to choose if you want to or not.
Joined: 6/19/2014
Posts: 14
Warepire wrote:
Yeah, remember to check at the top how many lines the header is (the stuff before the first frame of input). If the header is 20 lines, then frame 1 is on row 21 instead of 1.
Could you exemplify, please? This part is a bit confusing since I can't find something in my movie file like that (or I'm not seeing it at all).
Warepire wrote:
It's better to copy everything after frame 110120 in the original over to the new file. That way you have a movie guaranteed to play back in-case the edit would desync. Otherwise you got it correct. Obviously use names for the files so you can tell them apart.
Thank you, I'll bear that in mind in when I edit the file.
Warepire wrote:
Regarding optimization, if you deem it optimized enough you could always try to submit it, but it may end up rejected if it's considered too in-optimal. Submission is no requirement though, it's entirely up to you to choose if you want to or not.
Regardless, I'll be sure to post a link here for you to watch. It's the least I can do for all the help you provided me.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Alyzeej wrote:
Warepire wrote:
Yeah, remember to check at the top how many lines the header is (the stuff before the first frame of input). If the header is 20 lines, then frame 1 is on row 21 instead of 1.
Could you exemplify, please? This part is a bit confusing since I can't find something in my movie file like that (or I'm not seeing it at all).
The first line. Note that you can press the "Word Wrap" button in the toolbar to dynamically wrap long lines so that they're completely on screen, but this doesn't affect the line numbers.
Joined: 6/19/2014
Posts: 14
I applied word wrap to NotePad++ and this is what I got: Since the header is 2 lines does this mean that frame 1 is on row 3?
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
No.
Joined: 6/19/2014
Posts: 14
I see, so frame 1 is row 2. Headers can have more than one line number?
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
psxjin movie files in text format only have one line, afaik.
Joined: 6/19/2014
Posts: 14
Alright, I have chosen the start frame and the end frame of the original file. This is the first frame when the door animation shows. However, the previous frame is highlighted in red. Should I choose that frame instead?
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
That it's highlighted in red means it's a lag-frame, nothing else.
Joined: 6/19/2014
Posts: 14
Bad news. After doing some testing I've asserted that it's impossible to copy paste the inputs in order to get the new segment. At first, I thought that I had desync'd but after some further testing (going as much as -2, -1, 1 and 2 frames) I decided to juxtapose two moments 300 frames into the room where things were going off the rails and I got this: Seems like the problem is the enemy rng has completely changed, despite every action being exactly the same save for the actual boss fight. Unless there is some way to copy paste the rng values, I don't think this method will work. I would like to hear some suggestions but I have currently a plan if all fails. It's not what I'd like, as it will not be the proper way of doing things but I think it might work for the intended purpose. I have already registered the frame count difference between the newly recorded fight and the previous one. I will do the same with one I still have to record. I can then add the values of the both frame counts so I can find out how many more additional (or most likely subtractive) frames it has. Afterwards, I will make another recording where I clear all the enemies and make another count. Let's say that there a total less 2000 frames from the newly recorded boss fights and the part where I clear all the enemies and return is 3000 frames. I can then, in the original movie file, skip clearing all the enemies and return in exactly 1000 frames (gaining the 2000 frames from the boss fights by not clearing all the enemies) so that the timer aligns to the expected time from the new boss fights. Unfortunately this means that I need 4 different files (the original file, the file with new boss fight 1 & 2 and the file where I clear all the enemies) and will need to break apart the whole thing into 7 different appends before creating the finished video (I fear keyframes in VirtualDub might make my work harder but if it's anything like FRAPs encoding it should be fine since every frame is a keyframe - I imagine this is where the codec chosen comes into play). What do you guys think?
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
It's possible the RNG gets re-seeded with something like "time elapsed", or the RNG is affected by time and old actions in other ways that makes it undeterministic for copy-pasting frames :( That's unfortunate. I am not familiar with the inner workings of Resident Evil, so I can't say exactly why the RNG is undeterministic. There are 3 ways to go now: a) Continue copy-pasting and re-TAS more sections to re-manipulate the RNG whenever it desyncs. b) Restart the TAS from where you left off after the improvement c) Ignore the improvement
Joined: 6/19/2014
Posts: 14
I just did another test and it failed. I tried to resynch the copy-paste and line up the missing frames with dead time until the input and frame count matched up perfectly with the part that was desynch to find out if it were the time elapsed that messed with the rng. Didn't work and the enemy is still behaving differently. Seems like I'll have no choice but to do this the "lazy" way. I could redo all the TAS but the problem is that I have so many awesome fights recorded that I doubt I could recreate them entirely (some enemies don't always react the same way after you knife them), more now knowing that the rng is erratic and unpredictable. I don't think I'll be able to submit the record like I'd like to. I'm too perfectionist to let those two flawed and uninteresting boss fights slide and I still have to adjust the timer by not killing 3 enemies so the original movie file will not correspond to the finished video. I could submit the 4 different movie files and explain in detail how the video was put together but I imagine this is too much of an hassle for encoders to handle. If they're still up for it, I'll be more than happy to submit it and provide a lengthy explanation. Nonetheless, and because you guys have been helpful and awesome, I'll be sure to post a link if it does not get accepted.
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
For submission everything has to be one continuous file.