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

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th April 2018, 05:31   #141  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,267
Quote:
Originally Posted by raffriff42 View Post
Very clear description of why the shader effect looks good!

Which gives me an idea! Suppose we emulate the shader by
  1. smoothly sizing to 1/4 or 1/2 of the final size, then pixel sizing the rest of the way (to retain some jagginess);
  2. de-registering the RGB colors slightly (to imitate the phosphor arrangement); and
  3. superimposing a black grid pattern?
I already have a grid pattern generator function, made years ago (part of an attempt to recreate NTSC dot crawl artifacts). The grids are not exactly like the shader grids, but they might be close "enough."



I have no idea what SuperLumberjack is hoping to accomplish, but sign me up for your newsletter, because this is a seriously awesome filter. Even if you hate scanlines, you can blend it down a bit to minimize them; otherwise, it looks mindblowing on 4K.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. ~ Ed Howdershelt
foxyshadis is offline   Reply With Quote
Old 22nd April 2018, 15:33   #142  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
I updated my last script and I think I will never touch it again !

I understand that you have difficulty to follow my logic, but I will tell you why I did so complicated things It's only for videos of these old Super Nes games, but for other videos of old video games, of the PS2 and Xbox era too. It's why I didn't want scanlines or other things like that

But now, I tested my script with something else, and I think it's better like this. Because as I said, I wanted a kind of logical formula that could be all right with lots of low resolution videos from old games.

So I abandoned the idea to have something perfect with the Super Nintendo games. I want unity with all the old videos.


Consequently, I tried with this video taken from the game "Legacy of Kain: Defiance". The advantage is that this video was done with the engine of the game, so I can compare with the graphics of the game to see if it's credible. Little precision : the video has a resolution of 640x480 with black bars, and wasn't in the exact correct aspect ratio compared to the game. So I correct it too.

Original


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

Upscaled to 2160p with my script


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

Graphics in-game


https://media.joomeo.com/original/5adc98d934370.jpg

This picture is from this site : http://www.pcmrace.com/2015/01/06/ep...kain-defiance/

But apparently some textures mods were used to enhance the display in 2160p. But it seams that it's compliant with the original graphics. No extravagances !


Original


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

We clearly see the deformation of the picture (see the barrels) compared to the picture in-game.

Upscaled to 2160p with my script


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

Graphics in-game


https://media.joomeo.com/original/5adc7f0e99004.jpg


Here was my script for this :

Quote:
AviSource()
Crop(0, 80, 0, -80)
Spline16Resize(2560, 1280)
GaussResize(10240, 2880, p=50)
BicubicResize(3840, 2160)
If I multiplied the horizontal resolution 4 times with the GaussResize, it's because compared to a video with 4:3 AR (2880x2160), we need more precision horizontaly.

Besides, we keep a certain ratio between the resolution of the GaussResize and the final resolution.

We have :

(10240x2880)/(3840x2160) = 3,55


With a video with a 4:3 resolution of 640x480, I used this script :

Quote:
AviSource()
Spline16Resize(2560, 1920)
GaussResize(5120, 3840, p=50)
BicubicResize(2880, 2160)
We have :

(5120x3840)/(2880x2160) = 3,16


And with the script for Super Nes video games :

Quote:
AviSource()
Spline16Resize(2048, 1792)
GaussResize(5120, 3840, p=50)
BicubicResize(2820, 2160)
We have :

(5120x3840)/(2820x2160) = 3,22


Similar ratio !
SuperLumberjack is offline   Reply With Quote
Old 22nd April 2018, 15:44   #143  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
I post my video again for my last script : https://youtu.be/CHXsyhBZJ5g

Playlist of all my scripts : https://www.youtube.com/playlist?lis...W3G7DVYqx9NhoT

If you want to test scripts with some original videos of Super Nes games : https://mega.nz/#!K5FRlJhb!pKqQ06WOn...yGiozQuikkk77A

Last edited by SuperLumberjack; 25th April 2018 at 20:29.
SuperLumberjack is offline   Reply With Quote
Old 25th April 2018, 20:00   #144  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
Hello my friends !

I'm back ! I tried so many things (sometimes, there is no big difference, it's true) and I'm never satisfied

But I know what I want ! It's just hard to achieve...

I want something that reminds me the picture on CRT but clean !


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

source : https://youtu.be/3uB52C4zE_4

I tried the WarpResize in VirtualDub and it gives the type of image I want, so you will see better. It's very similar to the picture on CRT I think, but without the black scanlines (furthermore, we don't see them like everybody says, it's more subtle).

This is in 2160p :


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

In 4320p it's a bit better :


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

The only problem are these defaults :


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

This is the picture only with the Spline16Resize :


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

It's not so bad, but a bit boring...

So, now you know what I'm looking for Have you an idea how to get the same kind of picture but without the defaults please ?

Thanks a lot !


Edit : I added the video from the title menu of Killer Instinct in my WinRAR archive, if you want to test with your own scripts

Last edited by SuperLumberjack; 25th April 2018 at 22:01.
SuperLumberjack is offline   Reply With Quote
Old 26th April 2018, 04:59   #145  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 989
don't know if it already mentioned here or not, but there are http://ldesoras.free.fr/src/avs/crt-display-1.0.zip

it will give you feel like you see old SONY Trinitron

edit: raffriff42 Post here was good too
__________________
My Avisynth Stuff

Last edited by real.finder; 26th April 2018 at 05:15.
real.finder is offline   Reply With Quote
Old 26th April 2018, 09:44   #146  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
No, thanks !

I already said that I don't want scanlines
SuperLumberjack is offline   Reply With Quote
Old 26th April 2018, 17:29   #147  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 347
Ok I tried small combination with scanlines again. Just check it if it works for you or not.
Tested with your Mr.Nuts and Donkey Kong samples since they were NOT strictly made for crt screen.
But your Super Mario World one NEEDS strong crt effects.
Since I'm not a fan of 2160p upscale (or even 1080p) I tested by upscaling them to 1080p.
Code:
AVISource("C:\Users\BallGNM\Desktop\Super Nintendo videos\Donkey Kong Country 3.avi")
#AVISource("C:\Users\BallGNM\Desktop\Super Nintendo videos\Mr. Nutz.avi")

small=last

w=1440 h=1080
normal=Spline16Resize(512,384).ConvertToYV24(matrix="Rec709").maa2().nnedi3_rpow2(rfactor=4,nns=4,fwidth=w,fheight=h,cshift="bicubicresize",ep0=0,ep1=0.6)

crt_str=0.25
crt=crt_display(small,4,4,gainb=1.2,gamma=1.9).spline16resize(w,h).ConvertToYV24(matrix="Rec709")
expr="x " + string(crt_str) + " * y + " + string(crt_str+1) + " /"
mt_lutxy(crt,normal,expr,u=3,v=3)
ConvertToYV12(matrix="Rec709",chromaresample="spline16")
#normal
#crt
#small.spline36resize(w,h)
#small.pointresize(1536,1120).spline16resize(w,h)

Last edited by bxyhxyh; 28th April 2018 at 22:44. Reason: better wording
bxyhxyh is offline   Reply With Quote
Old 26th April 2018, 19:27   #148  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
Thanks !

But I'm not sure if I understand this kind of script. It's a bit too complex for me I think !

Can you post a screenshot please ?

Just a question : 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 !
SuperLumberjack is offline   Reply With Quote
Old 26th April 2018, 19:39   #149  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,582
D9 forum search is a bit limited when looking for something like "precise bicubic" as one phrase,

try google
Code:
"precise bicubic" site:forum.doom9.org
Plenty of hits, not viewed them.

Or here link to same:- https://www.google.com/search?client....0.5UhwE1cp86I

EDIT: Also, just want to point out that the below has a hyphen in it ie, ' - 0.75 '.
Quote:
"Precise bicubic (A=-0.75)"
EDIT: Actually D9 search dont do too bad if phrase is wrapped in double quotes.
__________________
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; 26th April 2018 at 19:46.
StainlessS is offline   Reply With Quote
Old 27th April 2018, 09:16   #150  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
I searched, but I didn't find anything about how to use the "Precise bicubic (A=-0.75)" from VirtualDub in AviSynth
SuperLumberjack is offline   Reply With Quote
Old 27th April 2018, 12:33   #151  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,582
See post #3 here:- http://forum.digital-digest.com/f25/...ers-28921.html

Two questions,

1) Are you really spending all this time messing with some screen caps from some naff game.
2) Why.

__________________
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 27th April 2018, 12:53   #152  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
1) Yes !
2) Because I like this !

The information of your link is wrong. I already read that as I said :

Quote:
Originally Posted by SuperLumberjack View Post
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 !
SuperLumberjack is offline   Reply With Quote
Old 27th April 2018, 13:05   #153  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,582
Are you resizing RGB ?
__________________
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 27th April 2018, 15:16   #154  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
Yep !

The source is RGB24. But I export from VirtualDub with the "UtVideo YUV420 BT.709 VCM" codec. And finally I encode with Handbrake
SuperLumberjack is offline   Reply With Quote
Old 27th April 2018, 16:46   #155  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,582
Why not just use VDub, it is almost certain to be exactly the same as that which you seek.
__________________
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 27th April 2018, 16:48   #156  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
Because it's not enough !
SuperLumberjack is offline   Reply With Quote
Old 27th April 2018, 17:53   #157  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 347
Quote:
Originally Posted by SuperLumberjack View Post
Thanks !
Can you post a screenshot please ?
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.

Last edited by bxyhxyh; 27th April 2018 at 18:16.
bxyhxyh is offline   Reply With Quote
Old 27th April 2018, 20:53   #158  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
Thanks a lot bxyhxyh !

I must admit that this script is very interesting !

More than the CRT effect, because it's finer !

But I have difficulty to understand all the script

Sorry, but can you give a copy of the exact script you used please ? It will be more understandable for me.

Thanks !
SuperLumberjack is offline   Reply With Quote
Old 27th April 2018, 22:44   #159  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,582
Quote:
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.
__________________
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; 27th April 2018 at 22:46.
StainlessS is offline   Reply With Quote
Old 28th April 2018, 01:20   #160  |  Link
SuperLumberjack
French Registered User
 
SuperLumberjack's Avatar
 
Join Date: Aug 2016
Location: France
Posts: 173
I laughed !

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 ?
SuperLumberjack is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 20:47.


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