View Full Version : I want to upscale a Super Nes video in HD
StainlessS
27th April 2018, 12:33
See post #3 here:- http://forum.digital-digest.com/f25/avisynth-bicubic-resize-parameters-28921.html
Two questions,
1) Are you really spending all this time messing with some screen caps from some naff game.
2) Why.
:)
SuperLumberjack
27th April 2018, 12:53
1) Yes ! :)
2) Because I like this ! :p
The information of your link is wrong. I already read that as I said :
I read that "BicubicResize(b=0, c=0.75, x, y)" is the same thing, but I tested, and it isn't exactly identical.
And it's not exactly the same result !
StainlessS
27th April 2018, 13:05
Are you resizing RGB ?
SuperLumberjack
27th April 2018, 15:16
Yep ! ;)
The source is RGB24. But I export from VirtualDub with the "UtVideo YUV420 BT.709 VCM" codec. And finally I encode with Handbrake :p
StainlessS
27th April 2018, 16:46
Why not just use VDub, it is almost certain to be exactly the same as that which you seek.
SuperLumberjack
27th April 2018, 16:48
Because it's not enough ! :D
bxyhxyh
27th April 2018, 17:53
Thanks ! :)
Can you post a screenshot please ? :p
Donkey Kong Country 3
https://i.imgur.com/oPWhmhH.png - spline36
https://i.imgur.com/1yq6dvx.png - point
https://i.imgur.com/Sy7JzyV.png - crt_display()
https://i.imgur.com/Y2hcQ3l.png - that script
Mr.Nutz
https://i.imgur.com/2I04duY.png - spline36
https://i.imgur.com/iuWAtmq.png - point
https://i.imgur.com/ozCEWcu.png - crt_display()
https://i.imgur.com/8ocuOMm.png - that script
If you think it's being too blurry you could sharpen clip normal with weak settings or increase crt strength crt_str.
Idea is simple. You upscale original small clip a little with a standard avisynth resizer. It's to avoid getting too much side effects from anti aliasers or nnedi3_rpow2 (that line bending artifact for example).
Then use anti-aliaser maa2. Then upscale it again using nnedi3_rpow2.
Result would look bad for that alone. Then you hide those bad things in crt effect.
SuperLumberjack
27th April 2018, 20:53
Thanks a lot bxyhxyh ! ;)
I must admit that this script is very interesting ! :p
More than the CRT effect, because it's finer ! :)
But I have difficulty to understand all the script :stupid:
Sorry, but can you give a copy of the exact script you used please ? It will be more understandable for me.
Thanks ! ;)
StainlessS
27th April 2018, 22:44
Because it's not enough ! #
On occasion, you may want to use a bunch of stuff, kinda horses for courses, and that.
EDIT: I have zero to offer, on this quest.
SuperLumberjack
28th April 2018, 01:20
I laughed !:p
In fact, I find it's more practical to use scripts to load filters instead of using a vdscript to load them.
It's better to create templates I think ;)
In addition, I tell myself that if something is possible with VirtualDub, it can be possible without a doubt with AviSynth. No ? :p
raffriff42
28th April 2018, 02:33
does somebody know how to use the "Precise bicubic (A=-0.75)" filter from VirtualDub in AviSynth please ?
I read that "BicubicResize(b=0, c=0.75, x, y)" is the same thing, but I tested, and it isn't exactly identical.
Thanks for you help ! ;)
Vdub2 Precise bicubic (-0.75), 400%
https://www.dropbox.com/s/8qxiiaiph01xply/resize-test-102%20x4%2001%20vdub2%20PBic-0.75.png?raw=1
Avisynth+ BicubicResize (b=0, c=-0.75), 400%
https://www.dropbox.com/s/qprjnfq5xlgrgqe/resize-test-102%20x4%2002%20avs%2B%20Bic-0.75.png?raw=1
Difference, exaggerated by 8x
https://www.dropbox.com/s/1cfz1q4jqvj3sgq/resize-test-102%20x4%2003%20diffx8.png?raw=1
The Avisynth one has fixed some minor edge artifacts, but otherwise they are the same.
They are both lousy for upscaling (of this type of source). Almost anything would be better.
Here's Avisynth+ GaussResize (p=80)
https://www.dropbox.com/s/ybjkuyx3owy8ojo/resize-test-102%20x4%2004%20gauss80.png?raw=1
Here's Spline16Resize:
https://www.dropbox.com/s/dxx56kovtuv7xkb/resize-test-102%20x4%2005%20spline16.png?raw=1
Source:
https://www.dropbox.com/s/21pdwxeyzv578sc/resize-test-102-retroarch.png?raw=1
SuperLumberjack
28th April 2018, 15:40
It's bizarre, because when I compared, I saw big differences. But maybe I did something wrong :p
Maybe a VirtualDub filter was activated in the same time...
Thanks for your lights ! :)
bxyhxyh
28th April 2018, 22:38
Sorry, but can you give a copy of the exact script you used please ? It will be more understandable for me.
Thanks ! ;)
What do you mean by exact? You want copy of .avs file or something? That's the exact script I used.
SuperLumberjack
29th April 2018, 02:17
OK. I asked because it didn't work for me :(
But maybe a filter is missing or something like that.
bxyhxyh
29th April 2018, 23:56
http://avisynth.nl/index.php/MAA2
Check this page. Dowload maa2 avsi and all required plugins.
SuperLumberjack
1st May 2018, 10:15
Thank you very much bxyhxyh ! ;)
But I just noticed one thing with your script : there are 2 CRT pixels for 1 digital pixels ! :p
https://i.imgur.com/iuWAtmq.png
https://i.imgur.com/8ocuOMm.png
killmoms
3rd May 2018, 01:03
Thank you very much bxyhxyh ! ;)
But I just noticed one thing with your script : there are 2 CRT pixels for 1 digital pixels ! :p
https://i.imgur.com/iuWAtmq.png
https://i.imgur.com/8ocuOMm.png
I mean, it's hard to talk about CRTs and "pixels", but this is not really inaccurate—NTSC televisions had more horizontal resolution than any of the consoles of the 90s were capable to driving during normal gameplay. That said, plugging an SNES into something like a professional Sony NTSC CRT broadcast monitor will look completely different than plugging into a bog-standard home television. The image that's being generated by bxyhxyh's script is closer to an idealized NTSC broadcast monitor than it is to what you probably would recognize as the CRT "feeling" you're after.
SuperLumberjack
3rd May 2018, 14:23
But as I already said, I want an old feeling, without CRT filter, even if it's interesting ;) By the way, I got a very satisfied result now :p
With the 8:7 aspect ratio in any case.
The only problem is with 4:3. I'm not totally satisfied, because it becomes blurry horizontally. It would be perfect, if we could adjust the sharpness of the GaussResize separatly vertically and horizontally (I put 50 with the original aspect ratio, because I don't have to change it) :)
GaussResize(2820, 2160, p=?)
It's my last wish ! :o
Because in 2160p, the resolution is 2468x2160 with 8:7 AR and 2820x2160 with 4:3 AR (it's not perfect 4:3, but it's like that with the Higan emulator, and it's more precise than the standard 4:3 actually), I must take this number for the p to counter the blurriness of the horizontal stretch :
p = (2820/2468)x50 = 57.131280388978930307941653160454
The problem is that the vertical resolution will be affected to. So, for the moment, I must use a compromise :
p = (57.131280388978930307941653160454 + 50)/2 = 53.565640194489465153970826580227
But if I could adjust the p for separatly for the horizontal and vertical resolutions, it would be better :)
SuperLumberjack
3rd May 2018, 14:47
Seriously, it would be perfect if I could adjust the sharpness of the GaussGauss Resize for the horitontal and the vertical resolutions separatly ! :)
Because at last I'm happy now with what I got ! :p
I undertsood the limits of an upscale, so I did with what I have.
I just tried this :
GaussResize(2820, 2160, p=50) .Blur(-0.11426256077795786061588330632091, 0)
Because : 2820/2468 = 1,1426256077795786061588330632091
But it's not perfect, but close ! :D
Here is my 8:7 version that I love very much :) :
(click on the pictures, because the compression is very dirty)
https://media.joomeo.com/medium/5aeb2f9293a35.jpg (https://media.joomeo.com/large/5aeb2f9293a35.jpg)
https://media.joomeo.com/original/5aeb2f9293a35.png
AviSource()
Spline16Resize(1024, 896)
Blur(0.5, 0.25)
GaussResize(2468, 2160, p=50)
And here is the 4:3 version (GaussResize + Blur) :
https://media.joomeo.com/medium/5aeb2fe33a27a.jpg (https://media.joomeo.com/large/5aeb2fe33a27a.jpg)
https://media.joomeo.com/original/5aeb2fe33a27a.png
AviSource()
Spline16Resize(1024, 896)
Blur(0.5, 0.25)
GaussResize(2820, 2160, p=50) .Blur(-0.11426256077795786061588330632091, 0)
But it clearly would be better if we could separate horizontal and vertical resolutions with Gauss Resize like the Blur filter, because we wouldn't see the stretch of the image, and this... it would be cool ! :p
Ideally, I would like a p of "50" horizontally and "57.131280388978930307941653160454" vertically ;)
SuperLumberjack
4th May 2018, 00:21
Hello again ! :)
I was surprised to see that on the old boxes of these Super Nes games, the pictures look so 3D and... without scanlines ! :D But natural, not weird (even if they still are low resolutions pictures) ! :o
(I took these pictures from boxes on eBay)
https://media.joomeo.com/large/5aeb976db4456.jpg
https://media.joomeo.com/original/5aeb976db4456.png
It's interesting, because my source videos don't look 3D ! :confused:
I wonder how they did to do these kind of pictures... Are they from captures of the real Super Nes or the original images like me, but reworked to look like this (because if you look carefully, the aspect ratio is 4:3)...
creaothceann
4th May 2018, 00:47
In reality, the output resolution must be proportional to 584x448. [...] I want 1408x1080 for the output resolution.That can only be done without color bleeding with an extremely high-resolution display. Basically, the least common multiple of 512 and 584 for the horz. axis, i.e. x=37376 pixels.
Bilinear, it's a bit too sweet.???
I want to get a natural image. [...] I want that the result remembers me the era where I played Super Nintendo games on a CRT :) I'm just talking about the feeling. I don't want scanlines and others things like that :pAh. Sounds like you do want scanlines (https://www.retrogameboards.com/t/scanline-screenshot-thread-because-240p-is-all-the-ps-i-need-56k-warning/71). And horz. blending for the dithering (http://www.sega-16.com/forum/showthread.php?28893-Genesis-v-s-Super-Nintendo-hardware-comparison/page21).
https://i.imgur.com/PLMkhuMt.gif (https://i.imgur.com/PLMkhuM.gif)
FrapsThe correct way to get videos is via the emulator's own recording function (e.g. BizHawk, RetroArch - both have bsnes cores). That way you get the exact framerate of 5*7*9 / 88 * 6 * 10^6 / 1364 / 524 * 2 = 60.098 fps, and no frame drops/duplications.
Strangly, I find that the scanlines added more relief with the old Super Nintendo games (the signal was progressive with a resolution of 256x224 in low resolution mode) that on a modern display. But it was just a illusion, because as you know, the scanlines are black :DActually... very bright colors bleed into the scanlines (which is emulated with more advanced shaders).
Otherwise, I just want to remind that I don't want scanlines or grids. Il will tell you why. It's because in the old times, even if we have these kinds of picture with the CRT display, it was always when we were close to the screen, but never at a certain distance. And personnally, I never glued my nose to the screen :DRecreating the experience naturally includes moving a bit away from the screen. ;) Or make it 720p and display it in a window / with borders.
I wonder how they did to do these kind of pictures... Are they from captures of the real Super Nes or the original images like me, but reworked to look like this (because if you look carefully, the aspect ratio is 4:3)...You don't see any scanlines when you shrink the picture (might be photographs or RGB snapshots, maybe even from prototype versions).
SuperLumberjack
4th May 2018, 01:15
That can only be done without color bleeding with an extremely high-resolution display. Basically, the least common multiple of 512 and 584 for the horz. axis, i.e. x=37376 pixels.
It's old all of this ! :) In fact, I did a mistake in this time. The resolution in 4:3 aspect ratio was 585x448 with Higan or 1170x896.
So we have 1410x1080 or 2820x2160 :p
???
Not sharp !
Ah. Sounds like you do want scanlines (https://www.retrogameboards.com/t/scanline-screenshot-thread-because-240p-is-all-the-ps-i-need-56k-warning/71). And horz. blending for the dithering (http://www.sega-16.com/forum/showthread.php?28893-Genesis-v-s-Super-Nintendo-hardware-comparison/page21).
https://i.imgur.com/PLMkhuMt.gif (https://i.imgur.com/PLMkhuM.gif)
Amazing the 2nd picture ! :) Was it done with a script, or is it a photography of a CRT ? :o
The correct way to get videos is via the emulator's own recording function (e.g. BizHawk, RetroArch - both have bsnes cores). That way you get the exact framerate of 5*7*9 / 88 * 6 * 10^6 / 1364 / 524 * 2 = 60.098 fps, and no frame drops/duplications.
I used the Snes9X emulator to record my videos. It's exactly 60 fps, but I never saw any dropped frames :confused:
Can you give me more explanations please ? :p
Actually... very bright colors bleed into the scanlines (which is emulated with more advanced shaders).
Bleed ? I'm not sure that I understand :scared: Sorry, I'm French ! :o
Recreating the experience naturally includes moving a bit away from the screen. ;) Or make it 720p and display it in a window / with borders.
Yes, but it's too bad to lose all these pixels ! :p
You don't see any scanlines when you shrink the picture (might be photographs or RGB snapshots, maybe even from prototype versions).
But my RGB snapshots aren't like this. So maybe photos... :)
lansing
4th May 2018, 05:17
But as I already said, I want an old feeling, without CRT filter, even if it's interesting ;) By the way, I got a very satisfied result now :p
With the 8:7 aspect ratio in any case.
The only problem is with 4:3. I'm not totally satisfied, because it becomes blurry horizontally. It would be perfect, if we could adjust the sharpness of the GaussResize separatly vertically and horizontally (I put 50 with the original aspect ratio, because I don't have to change it) :)
GaussResize(2820, 2160, p=?)
It's my last wish ! :o
Because in 2160p, the resolution is 2468x2160 with 8:7 AR and 2820x2160 with 4:3 AR (it's not perfect 4:3, but it's like that with the Higan emulator, and it's more precise than the standard 4:3 actually), I must take this number for the p to counter the blurriness of the horizontal stretch :
p = (2820/2468)x50 = 57.131280388978930307941653160454
The problem is that the vertical resolution will be affected to. So, for the moment, I must use a compromise :
p = (57.131280388978930307941653160454 + 50)/2 = 53.565640194489465153970826580227
But if I could adjust the p for separatly for the horizontal and vertical resolutions, it would be better :)
The "p" in gaussresize does not scale linear to resolution, so this whole mess you're doing is pointless.
creaothceann
4th May 2018, 08:14
Not sharp!https://en.wiktionary.org/wiki/blurry
Amazing the 2nd picture ! :) Was it done with a script, or is it a photography of a CRT? :oProbably a photo (like most examples in that thread), though I wonder what the picture would look like with a TV shader... (http://www.gamasutra.com/blogs/KylePittman/20150420/241442/CRT_Simulation_in_Super_Win_the_Game.php)
I used the Snes9X emulator to record my videos. It's exactly 60 fps, but I never saw any dropped frames :confused:
SNES9x synchronizes the frames with your display (especially if you have VSync activated), so it's 60.0 instead of 60.098 fps. To keep the audio in sync, the audio input rate is set to 31900 Hz instead of the actual 32040.5 Hz (you can change it in the options).
The bsnes core emulates it at the correct speed, but you'll get a dropped frame every 1 / (60.098 - 60) = 10.15 seconds if you don't use a GSync/FreeSync display. If you emulate it on a TV that runs at the default NTSC speed (60 / 1.001 Hz) you get a dropped frame every 6.3 seconds.
Bleed?
It means that bright pixels extend (https://youtu.be/EgzVK5aYczI?t=243) a bit into the black scanline gaps. When white pixels are aligned vertically, the black scanlines can disappear entirely in that area (https://i.imgur.com/0bIYWmp.jpg).
But my RGB snapshots aren't like this. So maybe photos... :)Well, they were printed (https://en.wikipedia.org/wiki/Halftone), and probably faded a bit before they were scanned.
real.finder
4th May 2018, 09:22
blur() in avs or ablur() in awarpsharpmt can do blur in only horizontal that can make it like what CRT look, there are some filters like Lghost and edgesidebleed that fix the old analog artifact manually that you can also use then to made these artifact
edit: you may also like to try this https://pastebin.com/TvpRdQA8
SuperLumberjack
4th May 2018, 10:27
The "p" in gaussresize does not scale linear to resolution, so this whole mess you're doing is pointless.
Thanks ! ;) You are always here to remind me that what I'm doing is pointless :p
But I try to do things with my eyes, and for me, it could work if only we could adjust the "p" horizontally and vertically. An idea ? Could you try to help me please ? :) Even if I'm wrong...
https://en.wiktionary.org/wiki/blurry
But I thought sweet, not blurry ! :D Sweet like a woman, like a flower... :p
Probably a photo (like most examples in that thread), though I wonder what the picture would look like with a TV shader... (http://www.gamasutra.com/blogs/KylePittman/20150420/241442/CRT_Simulation_in_Super_Win_the_Game.php)
OK. Interesting link by the way ! ;)
SNES9x synchronizes the frames with your display (especially if you have VSync activated), so it's 60.0 instead of 60.098 fps. To keep the audio in sync, the audio input rate is set to 31900 Hz instead of the actual 32040.5 Hz (you can change it in the options).
The bsnes core emulates it at the correct speed, but you'll get a dropped frame every 1 / (60.098 - 60) = 10.15 seconds if you don't use a GSync/FreeSync display. If you emulate it on a TV that runs at the default NTSC speed (60 / 1.001 Hz) you get a dropped frame every 6.3 seconds.
OK. I understand now ! :) Thanks !
It means that bright pixels extend (https://youtu.be/EgzVK5aYczI?t=243) a bit into the black scanline gaps. When white pixels are aligned vertically, the black scanlines can disappear entirely in that area (https://i.imgur.com/0bIYWmp.jpg).
OK. Yes, it's logical ! :) Thanks for your explanations ! ;)
Well, they were printed (https://en.wikipedia.org/wiki/Halftone), and probably faded a bit before they were scanned.
It's possible ! :)
blur() in avs or ablur() in awarpsharpmt can do blur in only horizontal that can make it like what CRT look, there are some filters like Lghost and edgesidebleed that fix the old analog artifact manually that you can also use then to made these artifact
edit: you may also like to try this https://pastebin.com/TvpRdQA8
Thanks ! :p But this kind of scripts is too complicated for me :( I only understand the basic scripts like what I did :stupid:
SuperLumberjack
4th May 2018, 10:53
Otherwise, it's funny, I see lots of people who are interested and are participating, but a very little number of screenshots from them ! :p
And if you were sharing some of your screenshots to have a better view ? :D
Here are some videos to test ;) It would be cool and interesting to see what you like ! :)
https://mega.nz/#!K5FRlJhb!pKqQ06WOnZVI5gLnSzpLj5Ix2aa36yGiozQuikkk77A
lansing
4th May 2018, 19:34
Thanks ! ;) You are always here to remind me that what I'm doing is pointless :p
But I try to do things with my eyes, and for me, it could work if only we could adjust the "p" horizontally and vertically. An idea ? Could you try to help me please ? :) Even if I'm wrong...
You need to see an eye doctor if you're seeing difference between
p=57.1 and p=57.131280388978930307941653160454. The "p" parameter in Gaussresize is not an addon feature, you can't break it apart from the resizer.
Aside from that, what is the reason for you to even try to separate the sharpening into horizontal and vertical?
SuperLumberjack
4th May 2018, 22:00
You are not a positive man ! :)
SuperLumberjack
5th May 2018, 02:17
What do you think about these new pictures ? :p
Original (8:7 AR)
https://media.joomeo.com/medium/5aed00897c55c.jpg (https://media.joomeo.com/large/5aed00897c55c.jpg)
https://media.joomeo.com/original/5aed00897c55c.png
Upscaled to 2160p (8:7 AR)
https://media.joomeo.com/medium/5af108ed79b8c.jpg (https://media.joomeo.com/large/5af108ed79b8c.jpg)
https://media.joomeo.com/original/5af108ed79b8c.png
Original (8:7 AR)
https://media.joomeo.com/medium/5aed019458739.jpg (https://media.joomeo.com/large/5aed019458739.jpg)
https://media.joomeo.com/original/5aed019458739.png
Upscaled to 2160p (4:3 AR)
https://media.joomeo.com/medium/5af1094190a30.jpg (https://media.joomeo.com/large/5af1094190a30.jpg)
https://media.joomeo.com/original/5af1094190a30.png
Original (4:3 AR)
https://media.joomeo.com/medium/5aed021e59505.jpg (https://media.joomeo.com/large/5aed021e59505.jpg)
https://media.joomeo.com/original/5aed021e59505.png
Upscaled to 2160p (4:3 AR)
https://media.joomeo.com/medium/5af10990cbf5a.jpg (https://media.joomeo.com/large/5af10990cbf5a.jpg)
https://media.joomeo.com/original/5af10990cbf5a.png
Original (4:3 AR)
https://media.joomeo.com/medium/5aed02f0db60c.jpg (https://media.joomeo.com/large/5aed02f0db60c.jpg)
https://media.joomeo.com/original/5aed02f0db60c.png
Note : Here, the aspect ratio is wrong if we compare with other videos from the Legacy of Kain saga (for the connoisseurs :D ) and the aspect ratio in-game. There shouldn't be black bars. So I just had to cut the black bars to have the correct AR.
Upscaled to 2160p (16:9 AR)
https://media.joomeo.com/medium/5af109cf258d5.jpg (https://media.joomeo.com/large/5af109cf258d5.jpg)
https://media.joomeo.com/original/5af109cf258d5.png
Oki ! Good night ! :)
creaothceann
5th May 2018, 09:38
If you want to upscale 3D games then you ought to do that via the game's engine / the emulator (https://www.reddit.com/r/emulation/comments/8e4fp5/rpcs3_demons_souls_in_4k_30_fps_outperforming_a/) / the graphics card (https://www.geforce.com/hardware/technology/dsr/technology).
SuperLumberjack
5th May 2018, 10:09
Ah ah ! :p
But for the last picture, even if the video was done with the engine of the game, it's not in real time ;)
I know that it's misleading, but the original file was a ".bik" file (Bink Videos), so it's was originally a real video :)
raffriff42
5th May 2018, 11:11
It would be perfect, if we could adjust the sharpness of the GaussResize separately vertically and horizontally [...] It's my last wish ! :oNo problem...
##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}
This works becausehttp://avisynth.nl/index.php/Resize#Notes
AviSynth has completely separate vertical and horizontal resizers. If input is the same as output on one axis, that resizer will be skipped.
So if I understand what you are trying to do (not likely!), you would use it like this:GaussResize2(2820, 2160, px=(2820.0/2468.0)*50.0, py=50.0)
(specifying px, py as formulas is shorter and more clear than writing long floating-point numbers like 57.131280388978930307941653160454, which are not needed anyway since 32-bit floats only convey 7 or 8 significant digits (https://en.wikipedia.org/wiki/IEEE_754#Basic_and_interchange_formats))
SuperLumberjack
5th May 2018, 12:07
Exactly ! :)
Thanks raffriff42 ! You're the best ! ;)
Bur for my last pictures, I didn't use the GaussResize like this, only with a p of 25. I adjusted the picture with a Blur after that. But it still will be useful for another script, because as you know, I always try new things ! :D
Original (8:7 AR)
https://media.joomeo.com/medium/5aed00897c55c.jpg (https://media.joomeo.com/large/5aed00897c55c.jpg)
https://media.joomeo.com/original/5aed00897c55c.png
Upscaled to 2160p (8:7 AR)
https://media.joomeo.com/medium/5af108ed79b8c.jpg (https://media.joomeo.com/large/5af108ed79b8c.jpg)
https://media.joomeo.com/original/5af108ed79b8c.png
Original (8:7 AR)
https://media.joomeo.com/medium/5aed019458739.jpg (https://media.joomeo.com/large/5aed019458739.jpg)
https://media.joomeo.com/original/5aed019458739.png
Upscaled to 2160p (4:3 AR)
https://media.joomeo.com/medium/5af1094190a30.jpg (https://media.joomeo.com/large/5af1094190a30.jpg)
https://media.joomeo.com/original/5af1094190a30.png
Original (4:3 AR)
https://media.joomeo.com/medium/5aed021e59505.jpg (https://media.joomeo.com/large/5aed021e59505.jpg)
https://media.joomeo.com/original/5aed021e59505.png
Upscaled to 2160p (4:3 AR)
https://media.joomeo.com/medium/5af10990cbf5a.jpg (https://media.joomeo.com/large/5af10990cbf5a.jpg)
https://media.joomeo.com/original/5af10990cbf5a.png
Original (4:3 AR)
https://media.joomeo.com/medium/5aed02f0db60c.jpg (https://media.joomeo.com/large/5aed02f0db60c.jpg)
https://media.joomeo.com/original/5aed02f0db60c.png
Note : Here, the aspect ratio is wrong if we compare with other videos from the Legacy of Kain saga (for the connoisseurs :D ) and the aspect ratio in-game. There shouldn't be black bars. So I just had to cut the black bars to have the correct AR.
Upscaled to 2160p (16:9 AR)
https://media.joomeo.com/medium/5af109cf258d5.jpg (https://media.joomeo.com/large/5af109cf258d5.jpg)
https://media.joomeo.com/original/5af109cf258d5.png
My last script has the best perspective I think ! :)
3 years ago, I wanted to show you another new script, but I did another... and another... :D
But I will still take the opportunity to post the relative video for this script :p :
https://youtu.be/RjxJZj55Rzc?list=PLL_S06Mn5k4mRZ1a50jW3G7DVYqx9NhoT
Here is the playlist with all my scripts : https://www.youtube.com/playlist?list=PLL_S06Mn5k4mRZ1a50jW3G7DVYqx9NhoT
My other favorite scripts are those :
Modern display style : https://youtu.be/Q9khxebvc7k?list=PLL_S06Mn5k4mRZ1a50jW3G7DVYqx9NhoT
Old display style 1 & 2 : https://youtu.be/ckJXsOxjpKo?list=PLL_S06Mn5k4mRZ1a50jW3G7DVYqx9NhoT
But I still not have a video for my last script ! :)
SuperLumberjack
5th May 2018, 12:53
raffriff42, can you just give me the script you did with the GaussResize2 with an input resolution of "256x224" and and output resolution of "2820x2160" with "px=50" and "py=50" please ? :o
It's juste to have a modele that I understand, because this kind of scripts it's a bit too elaborated for me ! :p
In fact, I tried, and it didn't work :(
Edit :
How can I do to have the equivalent of that ? :)
AviSource()
Spline16Resize(2560, 1440)
GaussResize2(10240, 5760, px=50, py=25)
BicubicResize(3840, 2160)
Need I an other filter than the internal filter GaussResize ?
It's for another video with a resolution of 640x360 that I want in 3840x2160. It's my reference to validate all my different scripts ! :p
raffriff42
5th May 2018, 13:38
raffriff42, can you just give me the script you did with the GaussResize2 with an input resolution of "256x224" and and output resolution of "2820x2160" with "px=50" and "py=50" please ? :o
This (https://forum.doom9.org/showthread.php?p=1841295#post1841295) script? (EDIT fixed the link)
LoadPlugin("<path>\PointSize_x64.dll") ## FIX THIS PATH
## ADD SOURCE HERE (RGB32, 256x224)
## (256x224 -> 1024x896)
LQx(4) ## retains some jaggies (best for 'digital' look)
#xBRZ(4) ## softer gradients (best for 'smooth' look)
ConvertToYV12(matrix="Rec709")
## (other filters here -- try QTGMC for example)
GaussResize2(2820, 2160, px=50, py=50)
return Last
##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}
SuperLumberjack
5th May 2018, 13:44
Houlala ! Thanks raffriff42 ! But I still don't understand all this code :p
I just want the equivalent of this (I updated my last post, sorry :D ) :
GaussResize2(10240, 5760, px=50, py=25)
(But it really need to be the perfect equivalent !)
Nothing special, just this, but in this script :
AviSource()
Spline16Resize(2560, 1440)
GaussResize2(10240, 5760, px=50, py=25)
BicubicResize(3840, 2160)
It's just to test ! ;)
But I would like to stay with RGB24 or RGB32, not convert to YV12 or something else. I do this when I export the video :)
Can you do the real script please ? Not the general formula. Sorry, it's just to better understand :)
Thank you very much ! ;)
raffriff42
5th May 2018, 13:58
>I just want the equivalent of this...
"equivalent" ???
SuperLumberjack
5th May 2018, 14:03
Yes, the equivalent :p This I suppose, but with the numbers :D :
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}
Sorry, but it's hard to understand for me ! :( I'm a bit slow... and a noob ! :stupid:
I only understand the simple fonctions for the moment.
So if I want this to work :
AviSource()
Spline16Resize(2560, 1440)
GaussResize2(10240, 5760, px=50, py=25)
BicubicResize(3840, 2160)
(source resolution : 640x360 [RGB24])
What exact code (so that I can use directly without adapt it) have I to put ? :)
SuperLumberjack
5th May 2018, 14:49
OK. I understand better now :)
I read this :
http://salp.wikia.com/wiki/AviSynth_Basics
So the "#" are for comments and don't affect the script. Oki ! ;)
So I just have to keep this if I understand :
GaussResize2(10240, 5760, px=50, py=25)
But I tried this and it didn't recognize the fonction :(
So, how can I do please ? :scared:
SuperLumberjack
5th May 2018, 18:08
Is there somebody ? :scared:
Because my vacations will be over in one day... :D
SuperLumberjack
7th May 2018, 17:56
So this is not possible if I understand :) :
GaussResize2(10240, 5760, px=50, py=25)
Was it just for the example ? :o
raffriff42
8th May 2018, 02:03
Sure, it's possible. Use the script I posted above (https://forum.doom9.org/showthread.php?p=1841305#post1841305) and change the arguments. Remember to include the GaussResize2 function in your script:...
GaussResize2(2820, 2160, px=50, py=25)
return Last
##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}
SuperLumberjack
8th May 2018, 03:32
Thanks raffriff42 ! :)
So, if I understand, I must add this too ?
##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}
But why is there "30.0" here ? :confused:
px = Default(px, 30.0)
StainlessS
8th May 2018, 09:52
So, if I understand, I must add this too ?
Yes, because that is the script function that you are calling, in blue.
[EDIT: GaussResize2() is a user defined script function, which in turn calls GaussResize() which is an Avisynth built in function].
GaussResize2(2820, 2160, px=50, py=25)
return Last
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}
But why is there "30.0" here ?
These arguments to the above GaussResize2() function are compulsory, "clip C, int target_width, int target_height,".
The remaining arguments are optional, (they are surrounded in double quotes in the function definition).
If the px and py optional arguments are not supplied [EDIT: when calling the script function], then px will be given the default of 30.0, and
px is the default for py (after px is either accepting caller arg or defaulting to 30.0).
The other optional args (ie src_left etc), are not given defaults within the above script function, they are
simply passed on the two GaussResize() calls, and accept whatever the defaults are in those filters.
Your curiosity might suggest that you would like to have a crack at leaning Avisynth scripting, there are worst ways to spend your time.
See, "New to Avisynth - Start here":- http://avisynth.nl/index.php/Main_Page
User defined script functions [specific to above questions]:- http://avisynth.nl/index.php/User_defined_script_functions
SuperLumberjack
8th May 2018, 16:47
raffriff42 and StainlessS, you are real heros ! :p You are the bests ! ;)
It works ! :D And thanks fot the explanations StainlessS. It's so cool to learn from you both ! :)
In fact, I thought that I must change some things in the fonction. It's why I was afraid ! :scared:
But finally, I got my new super script ! :p
AviSource()
Spline16Resize(1024, 896)
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
GaussResize2(5760, 4320, px=37.5, py=12.5)
return Last
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 50.0) # I used 50.0 instead of raffriff42 default of 30.0
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}
But I only have a problem ! :o When I add this line :
BicubicResize(2880, 2160)
It stays in the resolution of 5760x4320. How can I do please ? :confused:
Thank you ! :thanks:
StainlessS
8th May 2018, 17:27
AviSource()
Spline16Resize(1024, 896)
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
GaussResize2(5760, 4320, px=37.5, py=12.5)
# ???????? # <<----<< Bung whatever else in here, which is processed after the preceding lines above.
return Last # This is the end of the program, and returns the result that is displayed in player.
ie
AviSource()
Spline16Resize(1024, 896) # NOT Sure that you really want this one
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
GaussResize2(5760, 4320, px=37.5, py=12.5)
BicubicResize(2880, 2160)
return Last # This is the end of the program, and returns the result that is displayed in player.
EDIT: And yes, you do still need the GaussResize2 thing in the script (as already established).
SuperLumberjack
8th May 2018, 19:57
Thank you for you explanations ! ;)
So I put the Bicubic in the wrong place :p
You don't like Spline16 ? Do you have another recommendation ? :)
StainlessS
8th May 2018, 20:07
No recommendation, just thought that 4 resize's was a bit much, if that produces what you want then use it by all means.
EDIT:
nnedi3_rpow2(rfactor=2) doubles the input size, so
Spline16Resize(1024, 896) # NOT Sure that you really want this one
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
outputs 2048x1792,
then GaussResize2() to 5760x4320,
then back to 2880x2160, via BiCubic.
EDIT: I've no idea what you want to do, and absolutely no clue as to why you want to do it.
(why do people record a video game, indeed why do people play games is a mystery to me :) )
EDIT: More like from post #186
LoadPlugin("<path>\PointSize_x64.dll") ## FIX THIS PATH
## ADD SOURCE HERE (RGB32, 256x224)
#AviSource("...")
### CONFIG ###
## (256x224 -> 2820x2160)
LQx_ARG = 4 ## retains some jaggies (best for 'digital' look)
xBRZ_ARG = 4 ## softer gradients (best for 'smooth' look)
OUTW = 2820
OUTH = 2160
### END CONFIG ###
LQx(LQx_ARG)
#xBRZ(xBRZ_ARG)
ConvertToYV12(matrix="Rec709")
## (other filters here -- try QTGMC for example)
GaussResize2(OUTW, OUTH, px=50, py=50)
return Last
##################################
function GaussResize2(clip C, int target_width, int target_height,
\ float "src_left", float "src_top", float "src_width", float "src_height",
\ float "px", float "py")
{
px = Default(px, 30.0)
py = Default(py, px)
R = C.GaussResize(target_width, C.Height,
\ src_left, 0, src_width, 0, px)
\ .GaussResize(target_width, target_height,
\ 0, src_top, 0, src_height, py)
return R
}
SuperLumberjack
8th May 2018, 20:30
No recommendation, just thought that 4 resize's was a bit much, if that produces what you want then use it by all means.
EDIT:
nnedi3_rpow2(rfactor=2) doubles the input size, so
Spline16Resize(1024, 896) # NOT Sure that you really want this one
nnedi3_rpow2(rfactor=2, nsize=0, nns=2, qual=1, etype=0, pscrn=2, threads=0, opt=0, fapprox=0)
outputs 2048x1792,
then GaussResize2() to 5760x4320,
then back to 2880x2160, via BiCubic.
EDIT: I've no idea what you want to do, and absolutely no clue as to why you want to do it.
(why do people record a video game, indeed why do people play games is a mystery to me :) )
Lots of mysteries in the universe ! :D
In fact, I play (sometimes, but I have not enough times, and I prefer old games) and I do videos :p
It's just for fun ! I'm not a youtuber ! :o
I love testing some things too !
For short explanations, I begin with Spline16 to get more details, with a resolution of 1024x896, because it's 256x224x4.
Then, I tested with Nnedi3, because it gives a clean look to the image :)
The GaussResize is to change the aspect ratio. It's good for that I think, almost transparent. And it's good to clean the image too.
I prefer always rise the resolution, and in the end, reduce with a Bicubic. I find the Bicubic is well-balanced to reduce the resolution. I don't like Lanczos for example.
Voilà ! :D
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.