Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Configuring Interpolate Filter In Script, parameter to instance[0]Config()
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
fafa
Posted: Jun 9 2010, 03:01 PM


Newbie


Group: Members
Posts: 5
Member No.: 27767
Joined: 9-June 10



Hi all,
I am using Virtualdub scripting and I need to apply a Inverse Telecine with 1.9.1 release .

But the interpolate fiter config is not documented in http://www.virtualdub.org/docs/vdscript.txt

Here is some code:
QUOTE


  declare myfilter;
  myfilter=VirtualDub.video.filters;
  myfilter..Add("interpolate");
  myfilter.instance[0].Config(a,b,c) ;


I understand that Config have 3 parameters ...


Thanks all

PS: using setFrameRate crash
 
     Top
rjisinspired
Posted: Jun 9 2010, 09:45 PM


Advanced Member


Group: Members
Posts: 1256
Member No.: 20008
Joined: 12-October 06



I don't have an answer for you for this topic but I noticed that there are two dots in the "myfilter.add" part of your code. Is that a syntax error or is there suppose to be a double dot there?
 
       Top
fafa
Posted: Jun 10 2010, 07:39 AM


Newbie


Group: Members
Posts: 5
Member No.: 27767
Joined: 9-June 10



A little mistake in the message.

And still no idea of the needed config parameters of "interpolate" filter (which was old Inverse Telecine feature of changing frame rate.

Any idea ?
 
     Top
stephanV
Posted: Jun 10 2010, 08:05 AM


Spam killer ;)


Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04



You don't have to use the interpolate filter for IVTC; it is not its replacement. The IVTC filter is.

If you are not sure how to configure a certain filter ina script an easy way to figure this out is to create the an instance of the filter within VirtualDub, configure it, and then save a processing settings file, which you can view in a text editor.

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
fafa
Posted: Jun 10 2010, 01:53 PM


Newbie


Group: Members
Posts: 5
Member No.: 27767
Joined: 9-June 10



QUOTE (stephanV @ Jun 10 2010, 08:05 AM)
You don't have to use the interpolate filter for IVTC; it is not its replacement. The IVTC filter is.

If you are not sure how to configure a certain filter ina script an easy way to figure this out is to create the an instance of the filter within VirtualDub, configure it, and then save a processing settings file, which you can view in a text editor.

Great !

wonderful feature I didn't known . But when I execute it in a script frame number are inchanged instead of decreasing to a 25fps .

I am trying to changing fps in a script, from 60p to 25p.

I test it using filter menu. No problems but when I am running the saved process in a script => same frames number... So the last frame is repeted during most of the end of the stream.

here is my script:

CODE

//$ 1920*1080p60 => 640*480p25

//$ video
VirtualDub.Open(VirtualDub.params[0]);
//$ Audio
VirtualDub.audio.SetSource(VirtualDub.params[1],"");


//------------------------------ End of gen code
VirtualDub.audio.SetMode(0);
VirtualDub.audio.SetInterleave(1,500,1,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio.EnableFilterGraph(0);
VirtualDub.video.SetInputFormat(0);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.video.SetMode(3);
VirtualDub.video.SetSmartRendering(0);
VirtualDub.video.SetPreserveEmptyFrames(0);
VirtualDub.video.SetFrameRate2(0,0,1);
VirtualDub.video.SetIVTC(0, 0, 0, 0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("interpolate");
VirtualDub.video.filters.instance[0].Config(0, 25, 0);
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[1].Config(640,360,0,4,3,1,640,480,4,3,1,7,1,0x000000);
VirtualDub.audio.filters.Clear();

//------------------------------ End of gen code
//$ Save

VirtualDub.SaveAVI(VirtualDub.params[0]+"_vga25.avi");
VirtualDub.audio.filters.Clear();


How to adapt new frame number (video duration in fact ) when decrasing from 60 fps to 25 fps
 
     Top
stephanV
Posted: Jun 10 2010, 02:38 PM


Spam killer ;)


Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04



I didn't mean to say that you should copy the whole processing files settings file. Only that you can figure out how the filter should be configured that way...

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
fafa
Posted: Jun 10 2010, 03:47 PM


Newbie


Group: Members
Posts: 5
Member No.: 27767
Joined: 9-June 10



QUOTE (stephanV @ Jun 10 2010, 02:38 PM)
I didn't mean to say that you should copy the whole processing files settings file. Only that you can figure out how the filter should be configured that way...

That's right.

The point is now that the filter have 2 different behavior, One correct using interface, one not correct in scripting. This is why I copied the most part of the generated script.

My probleme is maybe an interaction - implicit or not - with one of these routines. Frame number may change (I reduce fps) but not.


sorry
 
     Top
phaeron
Posted: Jun 11 2010, 05:01 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



You need to reset/recreate the subset if you have added or removed filters like interpolate that change frame rate. The reason is that the subset (timeline) is created in post-filter frame numbers, so if you don't redo it, the length is wrong. The UI automatically does this when you exit the filter dialog, but this doesn't happen for scripts.
 
    Top
fafa
Posted: Jun 11 2010, 09:54 AM


Newbie


Group: Members
Posts: 5
Member No.: 27767
Joined: 9-June 10



QUOTE (phaeron @ Jun 11 2010, 05:01 AM)
You need to reset/recreate the subset if you have added or removed filters like interpolate that change frame rate. The reason is that the subset (timeline) is created in post-filter frame numbers, so if you don't redo it, the length is wrong. The UI automatically does this when you exit the filter dialog, but this doesn't happen for scripts.

Woks fine !!!
I do a "VirtualDub.Subset.Delete();" after interpolate filter and got the correct frame number and A/V sync.

Thanks a lot tongue.gif
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
8 replies since Jun 9 2010, 03:01 PM Track this topic | Email this topic | Print this topic

<< Back to Advanced Video Processing