Hi cats
please consider this avisynth script-base
Now I would like apply a .IResize(1920,1080) likeCode:videofile0 = LWLibavVideoSource("c:\myfolder\C0060.MXF") audiofile0 = LWLibavAudioSource("c:\myfolder\C0060.MXF") file0 = audiodub(videofile0,audiofile0)
Code:videofile0 = LWLibavVideoSource("c:\myfolder\C0060.MXF").IResize(1920,1080)
only if the video resolution is different from 1920x1080
And also add a line so that is apply a .convertToYUY2() only if the colorspace is different from 4:2:2
How can I do? thanks
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 5 of 5
			
		- 
	
- 
	if/then 
 
 I'm pretty sure it was covered in one of your previous threads 
 
 Here is one way to do it: if width is < 1919, then apply iresize(1920,1080), otherwise return videofile0 . (or you can use something else , like height to be the determining factor, adjust as you see fit)
 
 Code:videofile0.width<1919 ? videofile0.IResize(1920,1080) : videofile0 
 
 For the YUY2 - You probably just want to use ConvertToYUY2(interlaced=true, matrix="rec709") . If file is already YUY2, it's a no-op (nothing is processed). You don't need any if/then or logic, avisynth already does this. I'm assuming all your files are interlaced (hence the interlaced=true switch)
- 
	One note: "<1919" would allow clips that are 1919 pixels wide through without resizing. You should use "<1920" or "<=1919" instead. 
 
 I would use "!= 1920" (ie, not equal) instead so that larger clips would get downsized, as well as smaller clips getting upsized.
 
 Why use IResize if the clips aren't interlaced?
 
 And do you really want to distort sources that aren't 16:9?Last edited by jagabo; 13th Mar 2016 at 11:49. 
- 
	I think because historically the OP has dealt with lots of interlaced material. 
 
 Scott
Similar Threads
- 
  pc > hdtv 1920x1080 ok until power off, then wrong resolutionBy dianedebuda in forum Newbie / General discussionsReplies: 7Last Post: 1st Jun 2015, 13:24
- 
  DirectVobSub PGS/SUP subtitle problems with BD not in 1920x1080 resolutionBy Yinleifu in forum SubtitleReplies: 0Last Post: 2nd Jan 2014, 10:59
- 
  Adjust Red Green Blue in Avisynth in YV12?By VideoFanatic in forum RestorationReplies: 2Last Post: 23rd Aug 2013, 11:42
- 
  Non-standard resolution MKV to Standard resolution (1920x802 to 1920x1080By brack in forum Video ConversionReplies: 2Last Post: 30th Jun 2012, 18:33
- 
  1920x1080 mov, avisynth directshowsource = 1440x1080?!?!By duhmez in forum Video ConversionReplies: 5Last Post: 5th May 2011, 07:01


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			
 Quote
 Quote
