Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th May 2018, 09:38   #181  |  Link
creaothceann
Registered User
 
Join Date: Jul 2010
Location: Germany
Posts: 357
If you want to upscale 3D games then you ought to do that via the game's engine / the emulator / the graphics card.
creaothceann is offline   Reply With Quote
Old 5th May 2018, 10:09   #182  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Ah ah !

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
SuperLumberjack is offline   Reply With Quote
Old 5th May 2018, 11:11   #183  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
Quote:
Originally Posted by SuperLumberjack View Post
It would be perfect, if we could adjust the sharpness of the GaussResize separately vertically and horizontally [...] It's my last wish !
No problem...
Code:
##################################
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 because
Quote:
http://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:
Code:
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)
raffriff42 is offline   Reply With Quote
Old 5th May 2018, 12:07   #184  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
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 !


Original (8:7 AR)


https://media.joomeo.com/original/5aed00897c55c.png

Upscaled to 2160p (8:7 AR)


https://media.joomeo.com/original/5af108ed79b8c.png


Original (8:7 AR)


https://media.joomeo.com/original/5aed019458739.png

Upscaled to 2160p (4:3 AR)


https://media.joomeo.com/original/5af1094190a30.png


Original (4:3 AR)


https://media.joomeo.com/original/5aed021e59505.png

Upscaled to 2160p (4:3 AR)


https://media.joomeo.com/original/5af10990cbf5a.png


Original (4:3 AR)


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 ) 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/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...

But I will still take the opportunity to post the relative video for this script :

https://youtu.be/RjxJZj55Rzc?list=PL...W3G7DVYqx9NhoT

Here is the playlist with all my scripts : https://www.youtube.com/playlist?lis...W3G7DVYqx9NhoT

My other favorite scripts are those :

Modern display style : https://youtu.be/Q9khxebvc7k?list=PL...W3G7DVYqx9NhoT
Old display style 1 & 2 : https://youtu.be/ckJXsOxjpKo?list=PL...W3G7DVYqx9NhoT

But I still not have a video for my last script !

Last edited by SuperLumberjack; 8th May 2018 at 03:25.
SuperLumberjack is offline   Reply With Quote
Old 5th May 2018, 12:53   #185  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
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 ?

It's juste to have a modele that I understand, because this kind of scripts it's a bit too elaborated for me !

In fact, I tried, and it didn't work


Edit :

How can I do to have the equivalent of that ?

Quote:
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 !

Last edited by SuperLumberjack; 5th May 2018 at 13:34.
SuperLumberjack is offline   Reply With Quote
Old 5th May 2018, 13:38   #186  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
Quote:
Originally Posted by SuperLumberjack View Post
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 ?
This script? (EDIT fixed the link)
Code:
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
}

Last edited by raffriff42; 9th May 2018 at 03:24. Reason: fixed the link
raffriff42 is offline   Reply With Quote
Old 5th May 2018, 13:44   #187  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Houlala ! Thanks raffriff42 ! But I still don't understand all this code

I just want the equivalent of this (I updated my last post, sorry ) :

GaussResize2(10240, 5760, px=50, py=25)

(But it really need to be the perfect equivalent !)


Nothing special, just this, but in this script :

Quote:
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 !

Last edited by SuperLumberjack; 5th May 2018 at 14:01.
SuperLumberjack is offline   Reply With Quote
Old 5th May 2018, 13:58   #188  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
>I just want the equivalent of this...
"equivalent" ???
raffriff42 is offline   Reply With Quote
Old 5th May 2018, 14:03   #189  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Yes, the equivalent This I suppose, but with the numbers :

Quote:
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 !

I only understand the simple fonctions for the moment.

So if I want this to work :

Quote:
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 ?

Last edited by SuperLumberjack; 5th May 2018 at 14:33.
SuperLumberjack is offline   Reply With Quote
Old 5th May 2018, 14:49   #190  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
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 :

Quote:
GaussResize2(10240, 5760, px=50, py=25)
But I tried this and it didn't recognize the fonction

So, how can I do please ?
SuperLumberjack is offline   Reply With Quote
Old 5th May 2018, 18:08   #191  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Is there somebody ?

Because my vacations will be over in one day...
SuperLumberjack is offline   Reply With Quote
Old 7th May 2018, 17:56   #192  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
So this is not possible if I understand :

Quote:
GaussResize2(10240, 5760, px=50, py=25)
Was it just for the example ?

Last edited by SuperLumberjack; 7th May 2018 at 21:17.
SuperLumberjack is offline   Reply With Quote
Old 8th May 2018, 02:03   #193  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
Sure, it's possible. Use the script I posted above and change the arguments. Remember to include the GaussResize2 function in your script:
Code:
...

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
}
raffriff42 is offline   Reply With Quote
Old 8th May 2018, 03:32   #194  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Thanks raffriff42 !

So, if I understand, I must add this too ?

Quote:
##################################
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 ?

Quote:
px = Default(px, 30.0)
SuperLumberjack is offline   Reply With Quote
Old 8th May 2018, 09:52   #195  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
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].

Code:
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
}
Quote:
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_de...ript_functions
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 8th May 2018 at 10:26.
StainlessS is offline   Reply With Quote
Old 8th May 2018, 16:47   #196  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
raffriff42 and StainlessS, you are real heros ! You are the bests !

It works ! 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 !

But finally, I got my new super script !

Quote:
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 ! When I add this line :

Quote:
BicubicResize(2880, 2160)
It stays in the resolution of 5760x4320. How can I do please ?

Thank you !

Last edited by SuperLumberjack; 10th May 2018 at 12:33.
SuperLumberjack is offline   Reply With Quote
Old 8th May 2018, 17:27   #197  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Code:
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

Code:
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).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 8th May 2018, 19:57   #198  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Thank you for you explanations !

So I put the Bicubic in the wrong place

You don't like Spline16 ? Do you have another recommendation ?
SuperLumberjack is offline   Reply With Quote
Old 8th May 2018, 20:07   #199  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
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
Code:
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
Code:
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
}
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 8th May 2018 at 20:36.
StainlessS is offline   Reply With Quote
Old 8th May 2018, 20:30   #200  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 333
Quote:
Originally Posted by StainlessS View Post
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
Code:
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 !

In fact, I play (sometimes, but I have not enough times, and I prefer old games) and I do videos

It's just for fun ! I'm not a youtuber !

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ą !

Last edited by SuperLumberjack; 8th May 2018 at 20:35.
SuperLumberjack is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.