Qhimm.com Forums

Miscellaneous Forums => Archive => Topic started by: Hellbringer616 on 2009-11-14 16:36:20

Title: FF7 PSX videos
Post by: Hellbringer616 on 2009-11-14 16:36:20
I'm working on converting the higher quality PSX videos to the PC version though i'm running into a snag, they all need to be 15 FPS last i knew, But i am getting 11 - 13 FPS depending on the video... will this impact on FF7 PC or not?

Nevermind guess some videos are 15 FPS
Title: Re: FF7 PSX videos
Post by: willis936 on 2009-11-14 20:02:08
I pray Halkun is game with this.  It is technically the same game so he's not really "ripping" material off other sources.
And the potential payoff could be awesome.  Can you confirm the PSX videos are higher quality?  Do you have side by side screens?
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2009-11-14 20:03:42
No but i'll try and take one, when i figure out how, And i thought it was okay since it was FF7 related, If not then i am very very sorry i didn't think about the fact it is from the PSX version it would matter. Halkun if this is against the rules i'm sorry and just delete this thread.

EDIT: here you go and image to compare left is PSX right is PC
(http://i34.tinypic.com/vy7f6d.png)

Both images were taken at 2 times the normal size as at default the images are tiny, But you can still see a difference

Link for bigger view: http://i34.tinypic.com/vy7f6d.png
Title: Re: FF7 PSX videos
Post by: willis936 on 2009-11-14 21:27:35
Holy Jesus!

I'm very excited about this!
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2009-11-14 22:17:05
i'm hoping i can find a good video resizer, But all the ones i find that are halfway decent are a couple hundred..
Title: Re: FF7 PSX videos
Post by: drfeelgud88 on 2009-11-15 03:54:37
Wow, this sounds like a fantastic idea! Will be keeping an eye on this!  :wink:
Title: Re: FF7 PSX videos
Post by: m35 on 2009-11-15 07:19:32
Which video converter are you using? Not all of them are equal (http://jpsxdec.blogspot.com/2009/10/psx-video-converter-deathmatch.html) it seems. What output format are you targeting? Do you want to use the same codec the game uses, or use an alternative codec?

Quote
i'm hoping i can find a good video resizer, But all the ones i find that are halfway decent are a couple hundred..

I suspect ffmpeg has the ability to do resizing as well as any professional tool--albeit a little less user-friendly ;)
Title: Re: FF7 PSX videos
Post by: Grimmy on 2009-11-15 15:38:47
For all your video resizing/encoding I suggest using super.

 http://www.erightsoft.com/SUPER.html  (http://www.erightsoft.com/SUPER.html)

You can also use Prism, Any Video Converter, or VDub.

Generally when exporting AVI the XVID codec is the best.

If you are going to be applying filters then VDub is your best bet. It comes with around 50 filters that will work wonders for small blurry videos.
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2009-11-15 21:35:46
i am using jpsxdec the recommended best.

And i'll check out vdub, i was looking at video enhancer, But last i knew that didn't work to well..

I also am exporting in loseless uncompressed .avi format, then i will convert to a good codec when i finish enhancing them
Title: Re: FF7 PSX videos
Post by: Kranmer on 2009-11-17 07:55:06
well seifer and me a while ago went into this looking ar the better quality pictures on the PSX and also that the PSX videos had higher sound quality in the video's (the ones that had sound anyway). I tried lots of methods of resizing the video's but i personally found that photoshop did a better job (granted photoshop takes forever but the outputed picture is slightly better) then any of the resizing video programs i tried although siefer personally prefered Video enhancer (i only tried the trail of this since i wasnt gonna buy a program just for enhancing videos then never use it again) i also tried Vreveal which gave pretty decent quality output but i still found photoshop slightly better.
Also what size are you planning to resizing the videos to ? is it just double size or are you planning to go higher ?
also in a few topics in the past we have looked at different codecs to find which one worked best (although the topics are old and i havent tested Aali's newest driver to find out of H264 works yet) but the codec i found that worked best was H263+ but since this was a bit obscure for some people i ended up using xvid to make it easyer for other people.
http://forums.qhimm.com/index.php?topic=8962
http://forums.qhimm.com/index.php?topic=8980
http://forums.qhimm.com/index.php?topic=8553

Also it should be noted the sound in the PSX videos is different to the PC ones. if you look at the opening you will notice the PSX video does not play the music like the PC opening (i believe this is because the BGM is kept in a different file on the PSX videos so when you convert STR it doesnt convert the BMG as well)
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2009-11-17 12:49:59
video enhancer causes my video driver to go crazy and crash so thats out, How would you improve a video with photoshop?
Title: Re: FF7 PSX videos
Post by: Kranmer on 2009-11-17 22:18:08
ah well there is 2 ways to do it with photoshop.
Method1 is to use CS3 or higher and import a uncompressed AVI of 500 frames (so if the video is longer you would have to split it up into groups of 500) and process it but i found this to be way to difficult so i decided against it.

Method 2 (i used this method but it does take a while to do) Extracting all video into a picture format so each frame is extracted as 1 image (so for example if you have a 1923 frame video it would extract that to 1923 PNG files or JPEG etc)
To do this i first converted the original PSX video into uncompressed AVI then extracted the frames to PNG using RadTools (freeware) then i was left with the pictures which i then batch processed with whatever filters i thought looked good in photoshop then used Radtools to put all the images back into video.
But since this method took a long time to do i often just left it on when i went out or slept (but it could be the reason it takes so long for me is proberly because my setup is kind of old nowerdays).
Title: Re: FF7 PSX videos
Post by: lansing on 2009-11-19 06:55:20
photoshop is not for handling of videos, in addition, the resizing filters that it uses are simple bilinear or bicubic (VirtualDub has this filter as its internal resizer too).

hellbringer616, if you're really into video editing, you should spend a couple of days looking into AviSynth, it has a large base of filters which are suitable for many purposes.  For resizing filters, the best I can think of is NNEDI2 (http://forum.doom9.org/showthread.php?t=147695)


For a quick general usage in your case:

Code: [Select]
AviSource("your source file.avi")
nnedi2_rpow2(rfactor=2,cshift="spline36resize",fwidth=x,fheight=y)  #this is the resizing filter, x and y are your final width and height of the video
Title: Re: FF7 PSX videos
Post by: Micky on 2009-11-19 18:47:59
For resizing filters, the best I can think of is NNEDI2 (http://forum.doom9.org/showthread.php?t=147695)
I played around with that code a few years ago and it produced stunning results on static images compared to the classic bilinear/bicubic filters. Though there were a few artefacts around animated/moving areas, so it'll be interesting to see how it looks applied to an AVI. The problems were caused when changes inside the window around a pixel were modifying the interpolation values. Though that could've been fixed with intelligent masking.
Title: Re: FF7 PSX videos
Post by: Timber on 2010-02-13 18:44:58
I'm would love to have the higher quality videos
Are you still working on these hellbringer?
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-02-13 19:47:36
Yes and no. I am currently very pressed for time at the moment, and my good video editing computer is down at the moment. I am also looking for better mastering software, But with no luck...

If you wish you can have somewhat higher quality videos by taking your PSX disc of FF7 (if you have one) and rip the videos from there.
Title: Re: FF7 PSX videos
Post by: Cyberman on 2010-02-13 23:15:19
Yes and no. I am currently very pressed for time at the moment, and my good video editing computer is down at the moment. I am also looking for better mastering software, But with no luck...

If you wish you can have somewhat higher quality videos by taking your PSX disc of FF7 (if you have one) and rip the videos from there.
Combine AVI synh and Virtual Dub and you have some of the most functional editing software on the internet.  First you need to decode the video obviously into something AVI synth will like (YUV12?) and then have AVI synth apply the image processing algorythm you use. AVI synth is purely a cli program just to warn you. STill it is extremely powerful and you can create quite sophisticated filter systems with it (as well as add hard subtitles to video etc.)
Title: Re: FF7 PSX videos
Post by: m35 on 2010-02-15 05:01:54
Update on using jPSXdec rip the videos.

A new version has been released (http://kenai.com/projects/jpsxdec). This version has slightly more accurate frame rate detection, but still needs more work in that area. It can also extract to the fourcc YV12 codec. In theory this should be the absolute best quality you can get, but the brightness/contrast somehow are different from the uncompressed rgb codec. So the equations need to be double-checked, and possibly also an investigation if some gamma correction is unintentionally happening somewhere.
Title: Re: FF7 PSX videos
Post by: titeguy3 on 2010-02-15 05:37:32
Hey guys, I know this sounds far fetched and somewhat moronic of an idea and feel free to shoot it down, but...

How about an emulator? If you've got the original FF7 Game disc, just pop it into your PC and run it with a good PSX emulator. The emulator can upscale the video, apply smoothing filters *and* give the original audio, all you have to do is use a video recording software like Camtasia Recorder (or Snag-it, the freeware version), to capture the video in full frames off your display, then convert it to XVID or what-have-you.

Of course, this is all assuming that the emulator can run the FMV's at peak quality, which I'm not even sure that the original Playstation did, but hell, it's just an idea that occurred to me.

If it looks better it looks better, right?
Title: Re: FF7 PSX videos
Post by: Timber on 2010-02-15 06:10:52
Hey guys, I know this sounds far fetched and somewhat moronic of an idea and feel free to shoot it down, but...

How about an emulator? If you've got the original FF7 Game disc, just pop it into your PC and run it with a good PSX emulator. The emulator can upscale the video, apply smoothing filters *and* give the original audio, all you have to do is use a video recording software like Camtasia Recorder (or Snag-it, the freeware version), to capture the video in full frames off your display, then convert it to XVID or what-have-you.

Of course, this is all assuming that the emulator can run the FMV's at peak quality, which I'm not even sure that the original Playstation did, but hell, it's just an idea that occurred to me.

If it looks better it looks better, right?

That actually sounds like a pretty good idea, using ePSXe and FRAPS would probably do the trick.
I lost my PSX copy of FF7 quite a while ago though.

Anyone wonna try this? Wouldn't be too hard.

EDIT: Just realised this won't work so well with all videos, because of characters on screen and music playing.
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-02-15 15:27:33
emulators upscale? I never really noticed. I just rip the original file off my PSX disc and got the above result (ripped in lossless of course. 800mb of video. 11 files :P )
Title: Re: FF7 PSX videos
Post by: m35 on 2010-02-15 16:10:53
There are several things to consider with the conversion of PSX movies.

1) PSX video converter
The PlayStation could run in two graphics modes: 24-bit or 15-bit. Most games (including FF7) used 15-bit. So all the movies are displayed with that lesser color depth. Additionally, the PlayStation (and all emulators) use very fast video decoding methods that sacrifice quality for speed. Using any of the direct converters out there will definitely produce better results than capturing the video in play.

The PlayStation movie data is stored on the disc in a (slightly unique) YUV format. jPSXdec is the only converter that takes advantage of this and performs the least amount of operations on the data by outputting YUV directly (all other converters add the additional operation of converting to rgb). Ultimately we need the data in a YUV colorspace anyway. YUV may also let other video processors perform magical mathematical operations on it in ways that can't be done on just rgb. (I just need to figure out why the colors are coming out differently ;)

2) framerate
Due to limitations of the video formats on PlayStation discs, frame rates often fluxuate slightly during play. This fluctuation didn't exist in the original movies rendered by Square. So which is more accurate: the movies Square made, or the movies you actually watch when playing the game?

For FF7 specifically, I'm pretty sure all the movies originally had a half-NTSC rate of 15000/1001. However only the videos with sound were played back (approximately) at that rate (and probably only because the audio would get out of sync otherwise). Videos without sound were played back at exactly 15 fps.

Note that an upcoming option in jPSXdec will let you output exactly how it is rendered on the PlayStation (or at least my best guess ;).

3) how the audio & video sync
Also due to the PlayStation limitations, audio and video may not have synced up exactly how the original master did. I'm curious now how the PC FF7 videos sync the audio and video. That might give some insight as to how we might want them to sync as well.

4) scaling algorithm
Not very familiar with these technologies, but it sounds like NNEDI2 may be the way to go. I also wonder if there are any other filters worth running the videos through (an example (http://hr.deadgods.net/hr/kareha.pl/1203204157/) of what filters can do to improve quality).

5) final format
h.264 is pretty much the best quality codec available these days (just ask google to compare xvid and h.264).

6) how to encode
I'm not familiar with any other free h.264 encoders other than ffmpeg. Even the SUPER converter is actually using ffmpeg under the hood (it just provides a pretty interface). The hard part is experimenting with various qscales and/or bitrates to determine the best quality:size ratio.
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-02-16 03:48:30
h.264 isn't supported by Aali's driver i believe.. (sadly :( )
As for you image. i can do that. But i'm trying to make it look less like crap at super high resolutions. (which if we remake a lot of the backgrounds will make my life A LOT easier) But thanks for the info. maybe i'll get off my lazy butt and get to work XD
Title: Re: FF7 PSX videos
Post by: Timber on 2010-02-16 05:45:55
emulators upscale? I never really noticed. I just rip the original file off my PSX disc and got the above result (ripped in lossless of course. 800mb of video. 11 files :P )

Out of curiosity, do the lossless videos work in ff7?
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-02-16 15:38:53
no idea. you'd have to ask ali that one. but I was using losses until I finished residing/filtering them then I was playing to switch to a high quality code
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-02-16 16:30:06
well h264 lossless doesnt work but there are other codecs that are lossless that do work (but to be honest most of them give a huge output file for very small video like for example when i used a PNG lossless video codec i ended up with a 2GB opening) like SNOW or WMV lossless and hell of alot of uncompressed lossless codecs (just google them if your interested in those).
I also tried using a emulator for the videos before but it was hell of alot more work to try and capture them then it was to just rip them from the PSX CD's since you dont just capture them you have to have the extact right amount of frames and even if you use a frame limiter in the emulator the length of the video still seems very slightly different which then means you have to either miss frames out or add some to get the desired amount. And then there was like you said the problem of the characters being on screen while videos are playing. But this method i supose could be usefull for the sound since the PSX videos have some sound but not music (this is shown in the opening since the train still makes noise but no opening music),
When i did the opening with siefer we just remuxed music into the video's so we could use 48hz music from various websites.
Title: Re: FF7 PSX videos
Post by: Cyberman on 2010-02-17 23:44:47
PS1 videos are at different framerates. The video data is encoded into the files on the PS1 disk. The key part that many miss is that the PS1 video files cannot be read directly using windows from the original CD. You have to extract the original data from the ISO image. After that you have to parse the video/audio data. The video data is actually designed on 2K sector sizes but the audio data uses 2304 sector sizes. They used the CDI standard (Mode 2) for the interleaving of the data basically. You can split the data streams if you know that much.

What to do with the video streams would be the next 'issue'. As essentially you need to decode the video (which has a specific matrix to transform the motion JPEG DCT data) and then the audio is ADPCM (standard PS1 stereo fortunately). Once you have 'real' raw data. THEN You can do something with it.

I suggest looking around for AVI synth filters (if you can find then) and use AVI synth instead of those clunky GUI based tools.  AVI synth allows you to do some extremely complex filtering without fiddling with YAGI (Yet Another GUI Interface).  However AVI synth is not easy stuff, then again redoing the entire video sequence is not something you can do easily either.

Now if you wanted to go insane you could use the video information as key data points and reproduce the base data used to generate the original video. Even more complex and difficult work. SOME of the video's have mixed in character animation, that can give information on surface locations etc, as the characters are moving on a 3d surface.  In any case no matter what you do to render new video won't be an easy task.

If you have blender skills you could look at blender as your CGI tool for redone video I suppose.

Cyb

Title: Re: FF7 PSX videos
Post by: Timu Sumisu on 2010-02-19 14:12:35
as team avalanche slowly starts on remaking the prerendered backgrounds, once we have enough we'll probably be rerendering certain cutscenes, but in the meantime, it'd b fun to figure this all out.
Title: Re: FF7 PSX videos
Post by: titeguy3 on 2010-02-19 15:44:39
as team avalanche slowly starts on remaking the prerendered backgrounds, once we have enough we'll probably be rerendering certain cutscenes, but in the meantime, it'd b fun to figure this all out.

I wonder which is more daunting of a task... remaking the prerendered backrounds, or remastering every FMV, frame-by-frame...?
according to my calculations, there's a total of 47,040 frames. Of course, doing it frame-by-frame would be a *really* inefficient way of doing it...

At any rate, I'm looking forward to progress on this!  ;)
Title: Re: FF7 PSX videos
Post by: Cyberman on 2010-02-20 00:17:17
If the FMV's have characters in them then finding the location of things is easier (as they have a sort of walk mesh)

The background images ALL have walk meshes, I suggest working from that perspective. It is entirely feasible to create 3d content that is rendered to the FF7 data format for backgrounds for each scene. It might be slow and complex but you can then make the output content on any scale. I use POV for a lot of stuff like that. I gave up using Open GL because I would get caught up in the OpenGL idiosyncrasis instead of working on creating the 3d data sets to be viewed. The later is what I wanted to do not learn open GL. However OpenGL turned out to be too much fun (go figure). Erstwhile reality is I just need to extract data to mesh data for POV. 

Back to the Avalanche project, good fortune.

Redoing the movies is possible, if you have the background scene for the first background in the game done in 3d then you have a good portion of the opening movie done.
Things you would need to make are the Shinra building (needed for a bunch of backgrounds) the reactors (you need those for a few of your backgrounds anyhow). Bascially as you make data sets and styles they can be reused in animated parts just as easily. Hand drawn although potentially easier is not scalable like 3d data.

if you aren't sure what I'm talking about try povray.org (http://www.povray.org/). Lots of good stuff you can do with it.

Cyb
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-04 09:24:49
H264 now supported on 0.7.4,
0.7.4 has broken movies but H264 video are supported.
So i tried the movie plugin from 0.7.4 on 0.7.3 and it gives H264 video support on 0.7.3.
so anyone who wants to use h264 video just install 0.7.3 then download 0.7.4 and extract just the
/plugins/movies/ffmpeg_movies.fgp
and overwrite the old one from 0.7.3 and your done.
Title: Re: FF7 PSX videos
Post by: Timu Sumisu on 2010-03-05 14:14:08
as team avalanche slowly starts on remaking the prerendered backgrounds, once we have enough we'll probably be rerendering certain cutscenes, but in the meantime, it'd b fun to figure this all out.

I wonder which is more daunting of a task... remaking the prerendered backrounds, or remastering every FMV, frame-by-frame...?
according to my calculations, there's a total of 47,040 frames. Of course, doing it frame-by-frame would be a *really* inefficient way of doing it...

At any rate, I'm looking forward to progress on this!  ;)

Well, as we're progressing, its turning out to not be /that/ hard to make backgrounds, though it is time consuming. After the scene i'm working on now, i'm going to work on the bombing mission segment, which as Cyberman said, comprises a great deal of the opening cinematic. That coupled with shinra hq, and we'll have most of the resources we need to render the first few cinematics. as to camera angles... once you have the keyframes down there isnt much else to do. insert particle effects and lighting! :P
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-10 19:36:08
Im about to rip my PSX videos using PSXMC.  Then throw them into Sony Vegas and see what the best quality I can get with a 3x higher res is.   Hopefully the new movie plugin supports h.264 AAC as an mp4.

960x720 sounds good right?

I might check out AVIsynth if I cant get anything good going
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-03-10 20:24:11
Output at whatever 3 times the resolution is. i think 1280 x 876 or something like that is the "native" at 3 or 4 times
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-10 20:31:00
I was sort of hoping for a general consensus on the resolution.  3x is 960x720  4x is 1280x960.


4x then?  It makes no difference to me, my computer is fairly high end.
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-03-10 20:38:46
i dunno what average is, I play at 1440x1080 (5x) so the closer to that the better haha, i think 3x is average, or 4x
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-10 20:44:32
obsesbear i have tried a mp4 created with meGUI and it had a few audio problems but the video was fine but that was only with that program so please let me know how it goes with "Sony Vegas".

well the native PSX video resolution is 320x224 so
1x320x224
2x640x448
3x960x672
4x1280x896
5x1600x1120
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-10 20:52:48
obsesbear i have tried a mp4 created with meGUI and it had a few audio problems but the video was fine but that was only with that program so please let me know how it goes with "Sony Vegas".

well the native PSX video resolution is 320x224 so
1x320x224
2x640x448
3x960x672
4x1280x896
5x1600x1120

Oh yeah, I keep forgetting it's 224 and not 240.

If it doesn't work I can always convert the mp4 over to avi in SUPER... right?  That should work.  Ill post back results.  Still ripping all the videos right now
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-10 20:57:52
yes i already tried that with super and it does work. Just stream copy video and audio into AVI, and if you still have problems just stream video and reencode audio into AAC main (for some reason AAC LC gave me problems but then again this could be a unique problem to me)
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-10 21:06:25
yes i already tried that with super and it does work. Just stream copy video and audio into AVI, and if you still have problems just stream video and reencode audio into AAC main (for some reason AAC LC gave me problems but then again this could be a unique problem to me)
Saw your post in Custom Driver... why don't you ask seifer to come back over here.  I mean, if he's already doing this... I see no need to waste my time on it.  If memory serves me correctly, he was quite the perfectionist and will have all of these done in no time.
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-10 21:14:20
well first even if i did invite seifer back i doubt he would come, And second i dont really see why 2 people cant work on this and seifer is doing 1280x896 and he is using video enhancer to resize the videos but this also makes them quite big and you said you was planning on doing it at around 3x which will make them smaller in res but also in filesize and memory usage (some people with old PC's can't handle 1280x896 so smaller might be better for them as well), And third Seifer is like you said a perfectionist which is a good thing but it also means he will take his time making sure its perfect before he releases which would proberly take a long time and he is also working on lots of other projects which will proberly also slow down his progress on this.
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-10 21:36:09
Ill post one up hopefully by tonight


EDIT

Having trouble converting all of them for some reason... almost half fail.
Title: Re: FF7 PSX videos
Post by: titeguy3 on 2010-03-11 01:47:53
well the native PSX video resolution is 320x224

so THATS why the PC port has a line of nothingness along the bottom!!
Title: Re: FF7 PSX videos
Post by: InuRa on 2010-03-11 02:19:48
My guessing is that 2x: 640x448 will have the best results.
The scaling+sharpening wont look bad and with modern codecs it will be possible to keep the files around the same size as the original ones.

A lossless codec is not exactly needed, probably something like xvid with 10% loss will make it look as good as the lossless one to the eye\human perception.

Next thing to do... ask Aali to please try and see if he can center the videos on the screen\window, so that the "bar of nothingness" is split into two making it look even better! :D
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-11 02:52:06
Going with 960x720.

I'm trying to rip the sephiroth scene from Advent Children Complete, I'm just having a lot of trouble doing so.
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-03-11 03:02:12
960x672 you mean? or can it play fullscreen without it sucking?
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-11 03:13:32
960x672 you mean? or can it play fullscreen without it sucking?
I don't know.  I'm hoping that if I make it a 4:3 that it won't leave the black bars at the top and bottom.
Title: Re: FF7 PSX videos
Post by: Covarr on 2010-03-11 05:58:05
That'll wreck the alignment in cases where the 3D engine is overlaid above the FMV, such as the intro where it zooms in on the shinra guards, or the Junon elevator.
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-11 06:00:15
Well it's a good thing I've made almost no progress ripping this Sephiroth scene then.  Also, it's 2am now so I'm giving up for now and going to sleep
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-12 01:57:20
Double Post.   1280x896 should be fine.  I wanted to do about 720 height but 672 seems too low.   The first 2 second video should be done shortly.
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-03-12 02:10:24
upload to youtube and or post screens when finished? :D
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-12 02:47:19


Don't try applying it in game though.. or if you do want to, use SUPER, change it to AVI / H264 / MP3, 7008 for the bitrate, and change the resolution to 960x896 and 15fps and it will play just fine.  Now to ask Aali if he can implement a way for videos with higher FPS than 15... the difference in quality is highly noticeable.


EDIT
Removed bad downloads
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-12 15:26:25
@obesebear Nice video's.
it is possible to get 23.97fps on a xvid video but currently seems impossible in H264. (although this also only seems to apply upto 3x, After 3x it seems to do the same as h264)
here is your flame video in 960x672, Xvid 2quantizer, your source audio and working in-game.
http://www.mediafire.com/?wtwm5luyyjh
(just rename it to make it work in-game)
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-12 18:40:10
That's a pretty good quality, I just want it a little more high res you know? 

What's nice is the one that I made 1280X896, I was able to force to be 16:9 so it keeps it fullscreen on my computer  :)   No black bars at all.   But if there's nothing Aali can do about the higher resolution and fps, we can definitely go with xvid at 3x and 23.97.  It looks much better than the trashy 15fps!


Any tips you might have for making the existing videos look better?
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-03-12 19:40:49
Other then filters and using the PSX ones, not really >:(
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-12 19:43:11
There's about half a billion filters though, that's the problem.  I'm almost tempted to just let Seifer finish his work on this at his forums, and I'll just work on the Advent Children Complete videos.
Title: Re: FF7 PSX videos
Post by: Hellbringer616 on 2010-03-12 20:03:43
you mean he's actually working still?
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-12 20:14:49
http://break-off.co.uk/viewtopic.php?f=47&t=841&sid=b107ec5cca90dea6512e4f1fccec2b0c&start=25 (http://break-off.co.uk/viewtopic.php?f=47&t=841&sid=b107ec5cca90dea6512e4f1fccec2b0c&start=25)

By the way.  I remembered that Crisis Core has the NIVLSFS video too, so I instead muxed together that audio with the video from ACC.  It sounds much better now.  Still waiting on Aali about the fps though.

I'd like to do the Crisis Core videos too, but I still have no idea what I'm doing with the filters.

Kranmer, can you find out exactly what Seifer/Daniel is doing to enhance them?  You can also let him know his buddy Hermoor has been allowed to stay here, so maybe he will decide to reregister.
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-12 21:49:33
well the video i uploaded was meant to be just to show that 23.98fps works i wasn't meaning it to be anything else,
And that was as high res as i could get, for some reason if i go upto even 1024 it starts to drop FPS and audio.
Well from what i remember Seifer was using VideoEnhancer on the original PSX movie to upscale it then processing it with Sony Vegas and apply whatever filter in vegas that he though was nessacery for that movie (for example he used a gaussian blur on the opening but not on the other scenes).
I on the otherhand i used photoshop and a smart blur filter and batch processed all the frames of the video, But this didnt really pan out since it took hours to do even a small video.
I will experiment more with the flame video to see if i can get it to run at a higher res while keeping FPS but so far i am not having much luck,
I have tried
MeGUI,Super,VirtualDub,VLC,Vreveal,Any Video Converter Free,avanti,ffe,TMPGEnc 2.5 Free
and a bunch of others but they all seem to encounter the same FPS drops when the video is over 960x672 in size,
i wonder if this is a restriction on Aali's driver or on the player he has implimented or maybe i am just doing somthing wrong.
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-12 21:53:13
I'm fairly sure it is something to do with the player he is using.  I believe he mentioned before that he is using one that is a little older.  If he can't fix it though, going the route of smaller videos with more fps is the best option.  At least the video won't be jumpy.






Sorry for lack of any update today.  I've been doing my best to get any applicable Crisis Core videos.  Hopefully I'll be done weeding through them by tonight.
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-12 23:53:37
just been testing different codecs and they all seem to have the same problem or a worse problem.
But i have noticed that a uncompressed AVI will play perfectly at any FPS and any res but the only drawback with this is the huge filesize (for example i converted your flame video into uncompressed AVI, 1280x896, 23.976fps and it played fine but the size of the video was 743MB)
so i supose if its for personal use and if you have alot of HDD space you could use this method.
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-12 23:55:05
(for example i converted your flame video into uncompressed AVI, 1280x896, 23.976fps and it played fine but the size of the video was 743MB)
Lol.  Well that would work all well and good for me :)  But I would ideally like to distribute these when I'm finished.
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-12 23:59:17
lol yeah. i am looking into uncompressed codecs now to see if they make any filesize difference but i am not holding much hope for this method, especially since like you say it would be hard as hell to distribute. (although it may be possible if you distribute the small file in H264 format with a batch convertor so that it will be decompressed to a uncompressed AVI but this would still be a pain for ppl with small HDD's)
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-13 00:08:43
Since VLC can easily play these formats (and from what I remember it uses ffmpeg and mencoder, etc)  I think it is possible for Aali to make some kind of alteration to his driver to allow seamless integration of these videos.

Until I hear from him I will continue experimenting to see what works best.
Title: Re: FF7 PSX videos
Post by: Aali on 2010-03-14 17:20:21
The video plugin is very inefficient in general, anything that doesn't output clean BGRA (read: any modern video codec) will go through a very slow conversion process, without any kind of hardware acceleration. The next version of the driver will notify you when you play something that needs to be converted and the format it's using and if I deem that the codec is important enough I will implement a fast path for that format.
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-14 18:54:01
So, to put that in laymans terms, it would be best use a lossless format, like the 750mb video kranmer made?

If you can add a fast path for h264 (x264 especially), I think that's all that would be needed for us to have videos that are small in size but high in quality.   Why does the driver play lower resolutions fine (at 23.97fps), but once it gets to 1280x896 begin stuttering?
Title: Re: FF7 PSX videos
Post by: Aali on 2010-03-14 19:04:34
It would be best to wait for the next version of the driver and make awesome FMVs in a good "master" format in the meantime :P
I will add a fast path for h264 since it uses the most common YUV format which will make it and many other codecs A LOT faster if you have shader support (without shaders you are more or less fucked when it comes to OpenGL and video decoding).

Anything that makes the file bigger (higher resolution, higher framerate) means more bits to twiddle for the driver, which takes time, which in turn makes it lag.
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-16 18:26:55
Well I've tried .7.6, and the slow/choppy versions that used to work, now crash it. 
I've tried h264 as an avi and mp4 (mp4 renamed as an avi I mean).  I've also tried with different combinations of aac main, aac lc, and mp3.  All just crash now.
Title: Re: FF7 PSX videos
Post by: Aali on 2010-03-16 18:33:10
 :(

app.log and crash.dmp?
Title: Re: FF7 PSX videos
Post by: obesebear on 2010-03-16 18:53:59
Ask and ye shall receive (http://www.mediafire.com/?wmzygg5ke4w)

EDIT
This is the exact Sephiroth video I want to put in the game http://www.mediafire.com/?nlv1ygquvjz (http://www.mediafire.com/?nlv1ygquvjz).  I don't know if that helps any.
Title: Re: FF7 PSX videos
Post by: Aali on 2010-03-17 09:43:50
What the hell? Now that one-frame dummy file is messing it up all of a sudden. Could you also post that somewhere?
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-17 09:52:37
yes the dumy file seems to cause that crash, if you use the original eidoslogo.avi (or any video that isnt a dummy) it wont crash.
Also Aali here is the dummy file
http://www.mediafire.com/?gewtmtumjdd

Also Obsesbear i just tried that Sephiroth video and it crashes for me to but i have found that if you change the bitrate to 3264 or below in Super the video will work (although this drops the quality), bitrates of over 3504 seem to make it crash towards the end of the video (i know this isnt a solution but thought you might want to know anyway)
Title: Re: FF7 PSX videos
Post by: Kranmer on 2010-03-17 19:09:48
sorry for the double post, But on 0.7.6 it now seems possible to get Xvid files working at bigger sizes (before on 0.7.5 i could only get upto just under 1024x896 to work) So now its possible to get a Xvid of 1280x896 to work (i can get it upto the same quality as well but to have the same quality the filesize does increase slightly)
So here is a Xvid+AC3 1280x896 version of your fire video
http://www.mediafire.com/?dnk3dxy2mei
(also i made a mistake on the archive name and named it 1280x960 so just ignore that)
it can proberly be made smaller but i wanted to try to keep the same quality as your original.
Also i used AC3 audio instead of MP3 since it seemed to give slightly higher audio quality for me (this could be my own problem though)
Title: Re: FF7 PSX videos
Post by: m35 on 2010-09-11 07:46:03
I've recently had to remaster some videos from another PlayStation game. As a result, I may have found a technique that maintains the most amount of quality by adding a new format to jPSXdec: pc.601 (a.k.a. jpeg or jfif) YUV (possibly available in v0.93.2+).

Code: [Select]
java -jar jpsxdec.jar ff7disc1.bin -i ff7disc1.idx -d 3472 -quality high -vf avi:jyuv

I then let Avisynth and plugins do the heavy lifting.

Requires Avisynth 2.6 (alpha)
Uses nnedi3 (http://bengal.missouri.edu/~kes25c/) for scaling as suggested by superbbjai (http://forums.qhimm.com/index.php?topic=9233.msg124081#msg124081), and DGMPGDec (http://neuron2.net/dgmpgdec/dgmpgdec.html) for deblocking.

Code: [Select]
# OPENINGE.avs
LoadPlugin("nnedi3.dll")
LoadPlugin("DGDecode.dll")
AviSource("OPENINGE[0].avi")

# Deblocking
# quant is the strength between 1 and 31
# 12 seemed to be good, but the value could certainly be explored
# There is a huge list of similar filters on this page
# http://www.aquilinestudios.org/avsfilters/spatial.html
# which I didn't try
BlindPP(quant=12)

# Scale up by 4x for a final resolution of 1280x896
# The results of nnedi3 appeared slightly bettern than Spline64Resize
nnedi3_rpow2(rfactor=4)

# Convert to RGB mostly to ensure there is no chroma shift later,
# but is only available in 2.6
# matrix is to specify that the input uses the pc.601 [0-255] component range
ConvertToRGB32(matrix="pc.601", chromaplacement="MPEG1")

# ffmpeg likes to flip Avisynth rgba input
FlipVertical()

Then ffmpeg for the encoding.
Code: [Select]
ffmpeg -i OPENINGE.avs -acodec libmp3lame -ab 128k -vcodec libx264 -vpre veryslow -crf 12 -threads 0 OPENINGE.mp4
Code: [Select]
-acodec libmp3lame -ab 128k
Encode mp3 at 128kbps. My Windows binary didn't have aac included for audio, otherwise I would have used that.

-vcodec libx264
Encode video as h.264

-vpre veryslow
Use the best encoding preset

-crf 12
Encode at a constant quality.
Value is usually between 12-24. Lower value is better.
12 is probably overkill for this case.

-threads 0
Use all the processors!

The end result:

(https://sites.google.com/site/lainpsxfiles/a/vlcsnap-2010-09-11-00h19m12s229.png)

Full video
http://www.megaupload.com/?d=LCGPEC6G

I know this can't work with the current PC drivers, but I figured I'd share my work in case someone found it useful.
Title: Re: FF7 PSX videos
Post by: Timber on 2010-09-11 17:53:23
I know this can't work with the current PC drivers, but I figured I'd share my work in case someone found it useful.

That video plays fine in my FF7, the sound is jittery and out of sync though.
Title: Re: FF7 PSX videos
Post by: sl1982 on 2010-09-12 01:19:41
That is actually a fairly impressive redo of the video. I would imagine that is most likely the best we will get out of the source material.
Title: Re: FF7 PSX videos
Post by: Cyberman on 2010-09-17 01:46:19
That is actually a fairly impressive redo of the video. I would imagine that is most likely the best we will get out of the source material.
A bit late on that, but that's not a redo it's a refilter and re encode. Redoing it would be what the people in Team Avalanch are doing.  I can't look at it in vdub at the moment but just looking at the video in MPC it is rather interesting to see how well it did on sharp lines such as the hair jaw and eye lashes of Areth. You can see though some of the DCT noise from the lossy compression of the motion JPEG codec. Makes for an interesting subject matter.

In any case I could go on and on about various 'stuff'.  Interesting what the filters managed to do I suppose deblocking and decoding the original data and adding the correct DCT noise/data one could 'add' more detail that was thrown out in the original. I'll have to look at the filters and see what they are up too.

By the way AVISYNTH is AWESOME for this kind of stuff. It has to be run in a batch mode but who cares. Does great stuff (especially if your video editor doesn't like the video format of a file it can act as a YUV/RGB video source for it and decode the video without even batting an eyelash).

Cyb
Title: Re: FF7 PSX videos
Post by: sl1982 on 2010-09-17 02:23:13
That is actually a fairly impressive redo of the video. I would imagine that is most likely the best we will get out of the source material.
A bit late on that, but that's not a redo it's a refilter and re encode. Redoing it would be what the people in Team Avalanch are doing.  I can't look at it in vdub at the moment but just looking at the video in MPC it is rather interesting to see how well it did on sharp lines such as the hair jaw and eye lashes of Areth. You can see though some of the DCT noise from the lossy compression of the motion JPEG codec. Makes for an interesting subject matter.

In any case I could go on and on about various 'stuff'.  Interesting what the filters managed to do I suppose deblocking and decoding the original data and adding the correct DCT noise/data one could 'add' more detail that was thrown out in the original. I'll have to look at the filters and see what they are up too.

By the way AVISYNTH is AWESOME for this kind of stuff. It has to be run in a batch mode but who cares. Does great stuff (especially if your video editor doesn't like the video format of a file it can act as a YUV/RGB video source for it and decode the video without even batting an eyelash).

Cyb

Sorry, poor choice of words. And yes i know what Team Avalanche is doing. I did kind of start it after all.
Title: Re: FF7 PSX videos
Post by: DLPB_ on 2010-09-17 02:27:09
M35

Whilst that does look smoother, it has lost a lot of its detail.  You can get the same result with any number of filters, even inside sony vegas.  The best method seems to be to use your video converter, then place uncompressed result inside vegas and add a few simple filters then export to h.264.

There is always going to be a loss here.  The smoother you go the less detailed but less pixelated.  As it is, the fact is we are working with 320X224 videos and you can't polish a turd :P
Title: Re: FF7 PSX videos
Post by: Covarr on 2010-09-17 02:49:00
And yes i know what Team Avalanche is doing. I did kind of start it after all.
Really?

(http://img715.imageshack.us/img715/8249/92723752.png)
Title: Re: FF7 PSX videos
Post by: sl1982 on 2010-09-17 10:58:43
M35

Whilst that does look smoother, it has lost a lot of its detail.  You can get the same result with any number of filters, even inside sony vegas.  The best method seems to be to use your video converter, then place uncompressed result inside vegas and add a few simple filters then export to h.264.

There is always going to be a loss here.  The smoother you go the less detailed but less pixelated.  As it is, the fact is we are working with 320X224 videos and you can't polish a turd :P

http://www.howtocleanstuff.net/strategies/how-to-polish-a-turd/

Bad analogy.
Title: Re: FF7 PSX videos
Post by: m35 on 2010-09-17 11:37:31
M35

Whilst that does look smoother, it has lost a lot of its detail.  You can get the same result with any number of filters, even inside sony vegas.  The best method seems to be to use your video converter, then place uncompressed result inside vegas and add a few simple filters then export to h.264.

There is always going to be a loss here.  The smoother you go the less detailed but less pixelated.  As it is, the fact is we are working with 320X224 videos and you can't polish a turd :P

I was looking through this thread to see if any Sony Vegas videos were posted, but couldn't find any. I'd be interested to see what it can do in comparison.

Conceptually, what I posted is about the best I will ever achieve (these points are also addressed in this post (http://jpsxdec.blogspot.com/2010/08/immaculate-decoding.html)):
* PSX outputs YCbCr components with the full JPEG/JFIF/PC.601 [0-255] color range. This should be utilized as much as possible before reducing to the standard Rec.601 [16-235/240] color range, or RGB.
* PSX videos suffer most noticeably from blockiness and ringing artifacts. For best results, these artifacts should be filtered from the original YCbCr image data prior to any other transformation.
* Finally, I wanted to ensure there was no chroma shift because exact chroma positioning can vary.

I want to emphasize that conceptually I think this is the best. This would need careful subjective observation and objective signal analysis to determine if it really is the best. And while I'm no stranger to video technologies, I still know very little about fundamental signal processing theory (e.g. low-pass filters, FFT, etc). Someone with that kind of knowledge might know of even better filtering techniques for this data.
Title: Re: FF7 PSX videos
Post by: DLPB_ on 2010-09-17 18:57:27

Quote
http://www.howtocleanstuff.net/strategies/how-to-polish-a-turd/

Bad analogy.

 ;D  Someone showed me that before, but that shouldn't be allowed.  :-P
Title: Re: FF7 PSX videos
Post by: Cyberman on 2010-09-18 17:29:50
Sorry, poor choice of words. And yes i know what Team Avalanche is doing. I did kind of start it after all.
I know, I just thought it was kind of an odd 'huh moment too me.  Don't worry we aren't out to get you ... yet.

That 'polishing coprolites' article was interesting (they did misspell it however).  I didn't know people were obsessed about such strange things. Very useful however in archaeology to see what people were eating and how healthy they were (I bet you are not surprised). I just had a Conkers Bad Fur day vision (hehehe).

Erstwhile, for TA it would be interesting to render the same sequence using POV for it.  They finally made it SMPS functional etc so it can get beyond the 1000pps on some of the more intense scenes.  Compression of the data might prove to be interesting. However enough of this about that I guess.

As I said earlier AVISynth is an excellent video tool. It surpasses many commercial packages, it's most interesting ability is to be able to read almost ANY type of video. The Motion JPEGs on the PS1 are particularly nasty bits because of how the data is stored (and windows doesn't read ALL the data because it doesn't support Mode 2 type 1 data in the ISO it just supports CD audio <mode 0> data as it is).

That's the big problem with getting the video data out of the PlayStation files.  The audio (ADPCM) uses the full sector (2304  bytes) and the video uses the 2048 first bytes. So it is possible to get the video.

The thing about decoding and improving that video data is as I said earlier it's DCT data. Now DCT data is dimensionless (IE it's not constrained to pixel size per sea), increasing the resolution however is not a subject I understand well however. I know how it works etc. but adding data (think of an 8x8 block of pixels that had the DCT performed on them. the DCT is dimensionless data so the block size must be ASSUMED to be or have information that it 8x8), I suppose this is where quarter and sub pixel compression becomes handy for anti-aliasing purposes.  Another thing is simply moving from using integer DCT to a floating point based one can significantly improve the results. I believe the IDCT is a bit loss-y and has enough truncation error it creates other issues with the image data (namely it doesn't compress as well because of the noise it introduces).  To see what I am talking about just load an image in GIMP (just do a SHIFT-print screen then press SHIFT CTRL V) then go to save it as a JPEG. Select show preview in window and then look at the compressed size, then go to the advanced options and go to DCT methods select floating point and see what the new size is. It will be slightly smaller. On a less manufactured image (IE say a person) the difference is larger.

Anyhow I think it might be a better idea to use the TA video data when available (even if you just want enhanced movies and nothing else). The amount of work necessary to improve the original data will become close to the same as making all new data (as you people are doing). Geesh the number of things that go through ones mind.

Cyb
Title: Re: FF7 PSX videos
Post by: m35 on 2010-09-18 19:59:47
Thanks for your ramblings Cyberman!

Now DCT data is dimensionless (IE it's not constrained to pixel size per sea)

I know how it works etc. but adding data (think of an 8x8 block of pixels that had the DCT performed on them. the DCT is dimensionless data so the block size must be ASSUMED to be or have information that it 8x8), I suppose this is where quarter and sub pixel compression becomes handy for anti-aliasing purposes. 
I was actually pondering this very thing the other day: is there any value trying to scale at the DCT coefficient level? I wasn't sure how it would be possible, but now I see that the DCT equation is indeed dimensionless, so it could use 8x8 for the input matrix, and ANYxANY for the output matrix. I'm really curious what the results will look like. You have given me a lot to explore...

Another thing is simply moving from using integer DCT to a floating point based one can significantly improve the results. I believe the IDCT is a bit loss-y and has enough truncation error it creates other issues with the image data
My thoughts exactly, which is why jPSXdec uses floating-point math for all its operations (quantization, IDCT, etc) in the 'high' quality setting. ;) Now if only it was possible to keep that floating-point fidelity in AviSynth and its filters, then my quality cravings could finally be satisfied.
Title: Re: FF7 PSX videos
Post by: Cyberman on 2010-09-18 23:53:41
Thanks for your ramblings Cyberman!
Now that's a first LOL
I was actually pondering this very thing the other day: is there any value trying to scale at the DCT coefficient level? I wasn't sure how it would be possible, but now I see that the DCT equation is indeed dimensionless, so it could use 8x8 for the input matrix, and ANYxANY for the output matrix. I'm really curious what the results will look like. You have given me a lot to explore...
I don't believe playing with the coefficients will gain you that much. I believe the adding data (IE a second pass with sub pixel resolution) might be useful. What data to add is the problem (or issue). To give you more information the wikipedia article on JPEG is quite good (http://en.wikipedia.org/wiki/JPEG).  SONY used MJPEG to perform is compression. JPEG compression is considered LOSSY because they throw out information that has low 'signal' in the stream of data.  Reintroducing this data by some method may be a way to enhance the sub pixel resolution.
My thoughts exactly, which is why jPSXdec uses floating-point math for all its operations (quantization, IDCT, etc) in the 'high' quality setting. ;) Now if only it was possible to keep that floating-point fidelity in AviSynth and its filters, then my quality cravings could finally be satisfied.
Well aviSynth would have to use SSE3 or SSE2 (http://en.wikipedia.org/wiki/SSE2) instructions and I believe it only uses MMX level. This is how it achieves it's performance. I began using MMX code when I was making a software plugin for playstation emulators.  Moving to SSE2 instructions would resolve some of the performance issues you have when using floating point instructions for the DCT (basically you can perform 4 single precision instructions simultaneously instead of 1 at a time).  This would be a big performance hit using AVI synth but I've never seen people use it in real time anyways (shrug).