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 23rd November 2014, 13:25   #1  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 158
Upscaled video - back to original resolution

I have a video file 1280720, that was most likely created from DVD. The upscaled video is blurry, but quite detailed and high bitrate. Is there any way to recreate the original DVD?
Stormborec is offline   Reply With Quote
Old 23rd November 2014, 13:26   #2  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
dither_resize16 (720,480,kernel="bilinear",invks=true)
feisty2 is offline   Reply With Quote
Old 23rd November 2014, 14:50   #3  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 158
Upscaled video - back to original resolution

Now the video has twice height and in the bottom half is color noise ...

Perhaps something like this could be usefull?:

spline36resize(960,540)
lsfmod(defaults="slow",strength=50,ss_x=1,ss_y=1)
spline36resize(640,360)

I've also tried debilinear(640,360), but the previous seems to be better ...
Stormborec is offline   Reply With Quote
Old 23rd November 2014, 14:51   #4  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
full version:
Code:
dither_convert_8_to_16 ()
dither_resize16 (640,360,kernel="bilinear",invks=true) 
ditherpost (mode=6)
feisty2 is offline   Reply With Quote
Old 23rd November 2014, 15:06   #5  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
try kernel="bicubic" if the result looks oversharped
feisty2 is offline   Reply With Quote
Old 23rd November 2014, 18:20   #6  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 158
Thanks

Is it this package?: http://forum.doom9.org/showthread.ph...59#post1386559

I'm not sure, if I true understand what it do. It computes in 16-bit depth and adds some grain and removes banding?
Stormborec is offline   Reply With Quote
Old 23rd November 2014, 18:25   #7  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 637
Yes, that's the package.


The script posted by feisty2 just resizes in 16 Bit and dithers back to 8 Bit. Pretty basic (no debanding or adding grain)

I doubt you will notice a difference compared to a standard resize in 8 Bit though. I personally can't tell a difference between 16 Bit and 8 Bit resized videos. 16 Bit resizes are nice if you want to do gamma-corrected resizing but for standard "gamma-un-aware" resizing 8 Bit is totally sufficient imo.

Last edited by TheSkiller; 23rd November 2014 at 18:28.
TheSkiller is offline   Reply With Quote
Old 23rd November 2014, 18:34   #8  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 610
To invert an upscale known to be bicubic or bilinear, you can use debilinear or debicubic (see here).
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r19 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 23rd November 2014, 20:01   #9  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
16bit is not the main point here
it's invks
it reverses upscaled image if you know the original resolution and upscale algorithm
feisty2 is offline   Reply With Quote
Old 23rd November 2014, 21:16   #10  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 158
Thank you very much.

I've tried the script with dither and also the debilinear and the output is for my eyes the same ... Perhaps it is due to I dont'n know the original resolution ... (sorry my english)
Maybe I'll deside not to downsize the video, I'll better same realtime sharpening ... My idea is - if the video is just upsized, I could use lsfmod without supersampling (ss_x=1, ss_y=1). But I'm not sure, if the supersampling is making the job just during the downsizing phase ... (in defaults="slow" it upsizes 1,5, then it sharpens and then it downsizes 1,5).
The video is theoretically allready upsized from 720576(or 480) to 1280720. What is then the correct way?
Stormborec is offline   Reply With Quote
Old 23rd November 2014, 21:35   #11  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 158
I wrote it unintelligibly ...

the question should be: how to sharpen video , which has been already upscaled
Stormborec is offline   Reply With Quote
Old 24th November 2014, 13:38   #12  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,302
Quote:
Originally Posted by feisty2 View Post
dither_resize16 (720,480,kernel="bilinear",invks=true)
The source could be PAL (720x576). Stormborec, what is it's fps speed?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 24th November 2014, 19:06   #13  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 158
25 FPS, but it's just TV serial rip. It isn't worth many hours to process ...
Stormborec is offline   Reply With Quote
Old 24th November 2014, 19:20   #14  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,302
Quote:
Originally Posted by Stormborec View Post
25 FPS, but it's just TV serial rip. It isn't worth many hours to process ...
Okay then. So originally it was most likely a PAL source encoded using 720x576 pixels...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 24th November 2014, 19:45   #15  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 158
I just interested how it would look after appropriate treatment...
SG1 ...
There is also some color shift - to red (perhaps wrong color space)

http://imgur.com/z4xkepN
http://imgur.com/8HrPrlh

In the video is only litle haloing and few of noise, but I'm not sure, which resizer was used, and perhaps it would be better to do only litle sharpening, and perhaps something like colormatrix ...

Last edited by Stormborec; 24th November 2014 at 20:01.
Stormborec is offline   Reply With Quote
Old 24th November 2014, 21:12   #16  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 158
Maybe something like this could take sense:

debilinear(720,576)
ColorMatrix(mode="Rec.709->Rec.601")
spline36resize(768,432)
Stormborec is offline   Reply With Quote
Old 25th November 2014, 18:07   #17  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 312
There's nothing wrong with using ColorMatrix, but it'd be better to do the conversion with 16-bit intermediate precision (check Dither's documentation for an example on how to do that) or to flag your resulting encode as being BT.709. Colourspace conversion is one of those things that really benefit from having higher precision.

Also, PAL DVDs have active picture size only 702576, not 720576. Not that a 2.5% difference in aspect ratio will matter much, though.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!
colours is offline   Reply With Quote
Old 26th November 2014, 23:24   #18  |  Link
AzraelNewtype
Registered User
 
AzraelNewtype's Avatar
 
Join Date: Oct 2007
Posts: 126
Quote:
Originally Posted by Stormborec View Post
Thank you very much.

I've tried the script with dither and also the debilinear and the output is for my eyes the same ... Perhaps it is due to I dont'n know the original resolution ... (sorry my english)
That's what shrinker, from the same site, is for. Take a screenshot, save it as a 24 bit bmp, run shrinker.exe on it. It should give you a much better idea of what the original resolution is. Any of the upscale inversion tools are going to give fairly questionable results if not you're not actually using them to invert, but just as generic downscalers.
AzraelNewtype is offline   Reply With Quote
Old 27th November 2014, 17:27   #19  |  Link
Stormborec
Registered User
 
Join Date: Feb 2013
Posts: 158
What do you mean - "shrinker"?
Stormborec is offline   Reply With Quote
Old 27th November 2014, 17:37   #20  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 312
http://rgb.chromashift.org/shrinker%20r1.zip

In my experience sufficiently few things are bilinear-upscaled that this tool pretty much always generates irrelevant results, but it can't hurt to try.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!
colours 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 10:17.


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