weird resizing trouble >> FORUM
Our Forum

Our Forum



SearchSearch   Users   Registration   Entrance
Today: 03.11.2025 - 07:33:21
Pages:  1  2  

weird resizing trouble

MessageAuthor

Hi, I'm using a dj video mix software that has bugs that make sometime some videos I play not being centered well and have bad size. The only solution i found was to use the resize function of ffdshow. Unfortunately i need GPU hardware acceleration so i use Lav filters. The solution someone on the forumotion gave me was to use avisynth and have a resize script that would be triggered each time i play a video. I would have to create a .avs for each video files. I tried ResizePar script but i get the error : Script error : invalid arguments to function "IsRGB" Could you help me having something simple to ensure that all the videos i play will fit the screen resolution ? The simplest seems to be to have .avs for each video and that the .avs would trigger a more general .avsi file that contains the resizing code Thank you for your time

---------------------

MKit

users




Statistics:
Messages: 83
Registration: 10.30.2002
13.08.24 - 07:30:25
Message # 1
RE: weird resizing trouble

What is ResizePar script, without it, IsRGB problem not solvable ? Is Pixel aspect ratio 1:1 ?

---------------------
2001 X5 1995 540i SOLD 9-24-01

Katt

users




Statistics:
Messages: 120
Registration: 08.22.2001
13.08.24 - 07:40:30
Message # 2
RE: weird resizing trouble

Oh sorry it was that that was adviced : resize.avsi CODE: function ResizeKeepAR(clip c, int width, int height) { BackgroundColor = $000000 ResizeMethod = "BilinearResize" ratioS = Float(width(c))/Float(height(c)) ratioD = Float(width)/Float(height) newW = Round(height*ratioS/2)*2 newH = Round(width/ratioS/2)*2 BorderH = Round((height-newH)/2) BorderW = Round((width-newW)/2) #Dest Higher Then Source; Dest Wider Then Source; Same Ratio c = \ (ratioS>ratioD) ? \ Eval(ResizeMethod + "(c, " + String(width) + ", " + String(newH) + ")"). \ AddBorders(0, BorderH, 0, BorderH, BackgroundColor) : \ (ratioS<ratioD) ? \ Eval(ResizeMethod + "(c, " + String(newW) + ", " + String(height) + ")"). \ AddBorders(BorderW, 0, BorderW, 0, BackgroundColor) : \ (ratioS==ratioD) ? \ Eval(ResizeMethod + "(c, " + String(width) + ", " + String(height) + ")" ) : \ nop() #fix 1px changes, works only with 4:4:4 c = \ (IsRGB(c)) && (width>width(c)) ? c.AddBorders(0, 0, 1, 0) : \ (IsRGB(c)) && (height>height(c)) ? c.AddBorders(0, 0, 0, 1) : \ c return c } function ResizeFile(string filename) { DirectShowSource(filename).ConvertToRGB32.ResizeKeepAR(640,360) } videofile.avs CODE: Import("c:\videos\resize.avsi") ResizeFile("c:\videos\example.mp4")

---------------------

Cru Jones

users




Statistics:
Messages: 248
Registration: 01.16.2003
13.08.24 - 07:51:41
Message # 3
RE: weird resizing trouble

You can wrap code like this: [CODE] Some code [/CODE] Assuming 1:1 pixel aspect ratio, you might just try something like Code:

---------------------

///Molloy

users




Statistics:
Messages: 3,444
Registration: 06.26.2003
13.08.24 - 08:01:24
Message # 4
RE: weird resizing trouble

Thanks very much for your help. What about the : Script error : invalid arguments to function "IsRGB" ?

---------------------
96 M3. 5speed. All Redline all the time. Dinan Stg II SC. Dinan TB. Supersprint Exhaust SS. AA LTW Flywheel. Dinan Stg III Suspension. Dinan Camber Plates. UUC Tranny Mounts. Front and Rear Stress Bars Schroth Belts. X-Brace. Kickin' Stereo and Clear

SC///M3

users




Statistics:
Messages: 321
Registration: 05.23.2001
13.08.24 - 08:05:11
Message # 5
RE: weird resizing trouble

my videos resolution are 1280x720 (720p) 720x480 and 640x360. I want all to fit my 720p or 1080p HDMI LCD TV. As i'm a noob in avisynth could tell me exactly what i need to do. Where do i copy the .avsi file, what to i put in it ? etc...

---------------------

Avus95

users




Statistics:
Messages: 730
Registration: 03.09.2002
13.08.24 - 08:15:50
Message # 6
RE: weird resizing trouble

So when you wrote : Code:

---------------------

toddman35

users




Statistics:
Messages: 7,038
Registration: 03.18.2001
13.08.24 - 08:25:22
Message # 7
RE: weird resizing trouble

Do i have to pick you version of Avisynthesize_Mod or version from the website ? There is an .exe provided to install on the website

---------------------

ArcaneParadise

users




Statistics:
Messages: 355
Registration: 04.08.2003
13.08.24 - 08:30:02
Message # 8
RE: weird resizing trouble

I'm really sorry to bother you with questions that may sound stupids but it's just that i'm a noob of avisynth. I discovered it yesterday. I'm not used to programs that doesn't load with and executable file :p

---------------------
2000 Pontiac Firebird TransAm WS6

RareBird

users




Statistics:
Messages: 18
Registration: 10.04.2002
13.08.24 - 08:39:12
Message # 9
RE: weird resizing trouble

Put the RoboCrop dll in the "C:\Program Files\AviSynth 2.5\plugins" on XP, or whatever folder does the same on W7. I would avoid the original Avisynthesizer as it is bugged and has other problems, you can follow the instructions to use the Mod version, ie copy the DIRECTORY somewhere and execute the bat install file. (EDIT: eg copy the Avisynthesizer FOLDER to "C:\Program Files\", then execute the install bat in-situ, this will accomplish what the Setup.Exe file does for the original Avisynthesizer).

---------------------

RidgeBack

users




Statistics:
Messages: 2,405
Registration: 04.16.2003
13.08.24 - 08:44:09
Message # 10
RE: weird resizing trouble
Pompa paliwa E32 M60 : Previous topicNext topic: G37x do oceny
Pages:  1  2  

Message
Name
Message

Click on the dot next to the name to address the participant

           
   
The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants