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. |
15th June 2013, 02:29 | #1 | Link |
Registered User
Join Date: Apr 2009
Posts: 478
|
Need some help with Avisynth syntax
Hi there!
I have some videos that I want to batch encode, and I want to come up with a bunch of if else conditionals to help me with this. Some of the videos have small little black bars at the side. I want to crop these out and resize back to 720x480. This is what I need in Pseudocode: Code:
If(Autocrop Crop suggestion > 0) { Autocrop(mode=0) Spline36Resize(720,480) } else if(1280x720 > Resolution > 720x480) { #Some videos have non standard resolutions, so I want to resize them to 720,480 for the sake of standardization Spline36Resize(720,480) } #The rest of the processing chain such as denoising continues from here. |
17th June 2013, 23:28 | #2 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
You can try it, even I dont test. ^^'
Code:
Autocrop_value=video.Autocrop() vertical_res=video.height() video = (Autocrop_value > 0) ? video.Autocrop(mode=0).Spline36Resize(720,480) :\ ((vertical_res < 720) && (vertical_res > 480)) ? video.Spline36Resize(720,480) : video
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite Last edited by Overdrive80; 20th June 2013 at 16:37. |
20th June 2013, 16:36 | #4 | Link |
Anime addict
Join Date: Feb 2009
Location: Spain
Posts: 673
|
True, I should be indicated parameter video as return. ^^'
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite |
Thread Tools | Search this Thread |
Display Modes | |
|
|