Log in

View Full Version : filter to write data to an avs script


ikarus
11th August 2003, 11:44
Hi

I had google search for the above, i did look through the forum for something like it, i didn't find it.
If i didn't look hard enough please let me know. But if i did, i wonder if anyone else would find such a filter useful.

I do alot of tv recording. i wrote some batch files to make my day easier. but still entering the crop and trim ranges to my avs scripts is "unhandy".

So i thought of a kind of extendes vdub-cropping dialouge, which should allow me to get the crop-values (maybe plus resize) to an avs-script.

since most tv shows contain commercials and o record about 3 minutes before and after to get the whole show, i have to trim the video, so that it just contains the show without any commercials etc.

To do so i use the avisynth "trim" function. i have to figure out the frame where to start and stob, copy&paste it via mouse. so it would be nice to have a filter do that, requiring me just to click an "in" and "out" button in the filter dialouge.
the output-file would be the the input-avs, which should be selcted by the filter.

i had a look at the vdub filter sdk, but well. im no programmer. i think it would take me at least 6 month to learn c (if i had the time to study it full time, which i don't), i figure someone with skills in C should be able to code that filter in one day or even less.
so maybe theres some kind programmer out there. or some skilled user that finds that idea appealing and could make it happen.
i unfortunately can't. :(
i have a quite clear idea of how that filter should/could work but i have no clue how to code it.

any suggestions or help is greatly appreciated.
maybe someone can toss me to that C stuff.
as i think of that filter, most urgent information would be, where to find the functions / variables containing the crucial data (input height and width, cropping values from the dialouge, outut dimensions, current preview frame number).

i hope i didn't annoy anoyone
best regards
ikarus

Belgabor
11th August 2003, 17:12
The script editor in VirtualDubMod can help you with the trim, so far there is nothing for the crop. I might look into that somewhen :)

bb
11th August 2003, 17:36
In the meantime you may use my tiny little program:
http://forum.doom9.org/showthread.php?s=&postid=310435#post310435

bb

ikarus
11th August 2003, 20:18
Thanks for the quick replies.
@Belgabor: unfortunately this only relocates my mouse-action to stay within vdub. it does not really make my task more efficient. for that i`d need a "in" and "out" button in vdub to reach the insert via one click from the vdub main window. plus automatically adding trimranges via "++" in the script.

@bb: i cant really figure out what your tool is for. at least it does not seem to do the job for me. if i am not mistaken, i would have to make all selection in vdub, and then export the vcf and convert it. since i can crate my avs files for my recordings autiomatically (except the trim and crop/resize stuff) this doesn't really help, appreciate the effort though.


as i said, i process an average of 6 avs files per day most of the time i do about 20 every third/fourth day.

i created an image of how i imagine the dialouge, but i have no webspace to put it on. if anyone is interested, please let me know, i can send it via email then.

thanks so far
regards
ikarus

Belgabor
13th August 2003, 17:25
Originally posted by ikarus
Thanks for the quick replies.
@Belgabor: unfortunately this only relocates my mouse-action to stay within vdub. it does not really make my task more efficient. for that i`d need a "in" and "out" button in vdub to reach the insert via one click from the vdub main window. plus automatically adding trimranges via "++" in the script.


Um, just edit your file in the main window via the in/out buttons and 'delete', go to the script editor and press Ctrl+I and thats that, how much easier can it get?

ikarus
13th August 2003, 21:10
thanks for pointing that out.
i saw the option and was asking myself how to define a "frameset". I did not realize vdubmod does this on its own (i don't really work alot with vdub, it's just my "view the avi to crop and trim and set the codec options"-interface)

Ctrl+I is quite nice.
But since you were asking how much easier it could get:
- Refresh the script in the open editor when a new script is opened in vdub (using drag n drop) or let a script be opened via drag n drop in the editor.
- extra buttons in/out that directly set the in/out values to the script to the trim commands, while auto-detecting a existing "trim" command line, and replacing/filling this line with the values
- cropping

that would result in a truley very nice "avs-mode" in vdubmod. :)

thanks for the help, you've been very enlightening.
ikarus

Belgabor
13th August 2003, 22:23
Originally posted by ikarus
- Refresh the script in the open editor when a new script is opened in vdub (using drag n drop) or let a script be opened via drag n drop in the editor.

Good ideas. Currently the Script Editor works in 'multi' mode (you can open as many as you want), but a single instance mode was requested and for that your requests can work. I don't know how hard it will be to implement the second one, but I'll look into it.


- extra buttons in/out that directly set the in/out values to the script to the trim commands, while auto-detecting a existing "trim" command line, and replacing/filling this line with the values

I think auto-detection is too much error prone (and admittedly I'm too lazy to code it :p), but two buttons that insert 'Trim(xxx' and ',yyy)' should be doable =)


- cropping

Already coded (and works), not yet in CVS =)

Belgabor
15th August 2003, 23:30
Single instance mode, autopopup/autoload on opening avs files and insert crop is now in cvs.

ikarus
16th August 2003, 22:11
Wicked !
looking forward to the next release :)
i`ll certainly post my impressions of these additions.

thanks alot for the effort !
regards
ikarus