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 28th February 2013, 21:32   #1  |  Link
sumawo13
Learning Avisynth user
 
sumawo13's Avatar
 
Join Date: Sep 2008
Posts: 80
SixLineResizer; DVD<->BD Conversion script

Code:
function slr(clip c,float par,float dar,int resx,int resy,float left,float top,float right,float bottom){
modx=isrgb(c)?1:2
mody=isrgb(c)||isyuy2(c)||isyv16(c)?1:2
lr=round((((c.height()*dar)-(c.width()*par))/2)/float(modx))*modx
tb=round(((((c.width()*par)/dar)-c.height())/2)/float(mody))*mody
c.addborders(lr,tb,lr,tb).bicubicresize(resx,resy,0,1,left,top,right,bottom)}
I'm working on a function to automate the process of converting the aspect ratio and frame size of Blu-ray material to DVD and back. I'm thinking of adding options for NNEDI and other HQ resamplers and possible even incorporating QTGMC and various IVTC filters into the function.

Right now the DAR, PAR and resolution are set directly, but I'm going to improve that with options for 'NTSC/PAL/HD720/HD1080', et cetera.

I have a lot of plans but I'm starting out small. I'd appreciate advisory on best practices, what I can do to improve my code, and any other criticism.
sumawo13 is offline   Reply With Quote
Old 16th March 2013, 06:17   #2  |  Link
Jenyok
Warm and fuzzy
 
Join Date: Apr 2010
Location: Moscow, Russia
Posts: 201
There is no good way to add borders to video.
There is no good way to use any resizers, if upscaling video to 2 or more times, instead of NNEDI, NNEDI2, NNEDI3.
.
Maybe you will use function Panorama(...) instead of AddBorders(...) function, when converting 4:3 -> 16:9 or 16:9 -> 4:3, see web link.
http://forum.doom9.org/showthread.php?t=165911
.
.
http://forum.ixbt.com/topic.cgi?id=29:33007-9
.
This is a very good description of DAR, PAR, SAR with examples and pictures, see web link upper, but in Russian.
.
__________________
Warm and fuzzy (white and fluffy)

Last edited by Jenyok; 16th March 2013 at 11:45.
Jenyok is offline   Reply With Quote
Old 16th March 2013, 12:48   #3  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,607
also there is warpedresize() out there, which lets you specify any arbitrary warping-factor for aspect-ratio conversion.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 16th March 2013, 15:53   #4  |  Link
Poutnik
Useless idea generator
 
Poutnik's Avatar
 
Join Date: Apr 2004
Location: Europe, Czech Republic, Brno
Posts: 354
Quote:
Originally Posted by scharfis_brain View Post
also there is warpedresize() out there, which lets you specify any arbitrary warping-factor for aspect-ratio conversion.
Exactly. One can also try these my ugly and probably not usable functions .. --> 4:3 to 16:9 -> PanoramaWR / PanoramaWR2
__________________
Vista64 Premium SP2 / C2D E4700 2.6GHz/ 6GB RAM/ Intel GMA 3100 / DTV Leadtek DONGLE GOLD USB2 /
focused to DVB-T MPEG2 PS capture -> ProjectX -> M2V/MP2 -> MeGUI/AVS -> MP4[AVC/AAC]
Poutnik is offline   Reply With Quote
Reply

Tags
blu-ray, conversion, dvd, script, sixlineresizer

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 17:52.


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