Quantcast VirtualDub: Help with Simple VirtualDub Mod Script? - digitalFAQ.com Forums [Archives]
  #1  
09-05-2004, 09:35 AM
Mental Mental is offline
Free Member
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Can anyone explain how I can get virtualdub mod to run via the command line, open a file called C:\TEST\video.avs and save the audio before exiting please?

I`ve searched various internet sites and it`s begin to bug me

The reason is that I have found an easy way I can convert 29.970 avi files to PAL. I`ve written a prog I use to convert avi`s to mpeg2 files and would like to add the ability to convert the 29.970 ones too.

Doing it manually I have an avisynth script which tells Virtualdub mod to stretch the audio from 29.970 fps to 25 and to assume a framerate of 25fps.

The audio can then be encoded via Besweet and the video using FreeEnc or QuEnc.

It works for me, its my first try, but I can`t seem to automate it using VirtualDubs scripting language. Any help is gratefully received

Dave
__________________
Dave
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
09-05-2004, 10:12 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Have you tried asking at the Unofficial VirtualDub Support Forums? They will surely know if it's possible.

http://virtualdub.everwicked.com/index.php
Reply With Quote
  #3  
09-05-2004, 11:26 AM
stephanV stephanV is offline
Free Member
 
Join Date: May 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Mental
Doing it manually I have an avisynth script which tells Virtualdub mod to stretch the audio from 29.970 fps to 25 and to assume a framerate of 25fps.
I'm not sure thats the way to go... that would give a tone difference of 6*log2(25/29.97) of -1,57, which i find quite a lot. on the other hand it is not something i have to worry about.

As for the scripting language, normal VDub has the command 'saveWAV'. im not sure if its ported to VDM as they have changed the audio part of the program substantially. the help file does not mention it, so you would have to use normal VDub.

for a doc on the scripting language used in *normal* VDub go here

i also vagely recall a program called avs2wav ---> www.google.com

good luck!
Reply With Quote
  #4  
09-05-2004, 11:34 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Mental
Can anyone explain how I can get virtualdub mod to run via the command line, open a file called C:\TEST\video.avs and save the audio before exiting please?
I`ve searched various internet sites and it`s begin to bug me
If that I will say you works, please remember in the future where you found so hard answer.

This is a VirtualDubMod Script created by Centella forum member.

You need to call it with this line, using full path to virtualdubmod executable and yourjob.jobs files and also inside the script.

Code:
virtualdub /s"yourjob.jobs" /x
Quote:
Originally Posted by VirtualDubMod script by Centella----------------------------------
// $Escrito por Centella

VirtualDub.Open("g:\\por_hacer\\prueba.avi",0,0);
// setsource(2) 2=wav audio
// VirtualDub.audio.SetSource(2);

// SetMode( 1 ) = full processing mode
VirtualDub.audio.SetMode(1);

//VirtualDub.audio.SetInterleave(,,,,);
//VirtualDub.audio.SetclipMode(,);

VirtualDub.audio.SetCompression();

// 1 parámetro : 48000
// 44100
VirtualDub.audio.SetConversion(0,0,0,0,0);

// setvolume(); un valor entero, 0 por defecto.
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();

// demux audio sin wav header
// VirtualDub.audio.demux( "c:\\temp\\audio.ac3" )

VirtualDub.SaveWAV("C:\\temp\\audio.wav");

VirtualDub.Close();
Quote:
Originally Posted by Mental
The reason is that I have found an easy way I can convert 29.970 avi files to PAL. I`ve written a prog I use to convert avi`s to mpeg2 files and would like to add the ability to convert the 29.970 ones too.
I hope if you got it work, you post your script here, please.
I don't test the VDM script and don't know how it works with multilanguage avi files, but maybe it take first audio track.
If you go to KDVD it would be great that you keep ac3 5.1 audio if avi has it. Think about this and play with the Centella basic script and VDM to find the different ways.
Reply With Quote
  #5  
09-05-2004, 01:38 PM
Mental Mental is offline
Free Member
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
That did the same as my trial scripts, they just say "can`t open script".

I`ll have to find another way to convert the 29.970 films

Dave

PS Thanks for the help!
__________________
Dave
Reply With Quote
  #6  
09-05-2004, 01:47 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Mental
That did the same as my trial scripts, they just say "can`t open script".

I`ll have to find another way to convert the 29.970 films

Dave

PS Thanks for the help!
1 - Are your sources really 29.970 interlaced or are they 29.970 telecined?

2 - That script was tested by his writer, Centella, and it worked. Check your paths or try with another source.


Edited: 05/09/2004 21:05
I tested it and works perfect. Did you see the double back slashes, isn't it?
Reply With Quote
  #7  
09-05-2004, 02:05 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
why doublepost?

Do look here...
http://www.kvcd.net/forum/viewtopic....793&highlight=
Reply With Quote
  #8  
09-06-2004, 10:36 AM
Mental Mental is offline
Free Member
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Hi. I wasn`t double posting, when I couldn`t get the script to run I decided to ask if it could be done in another way, not virtualdub specific.

I still can`t get it working though, and I copied the script via copy and paste to make sure it was intact as written.

Then again my avisynth doesn`t load 99% of filters, I don`t know why as my XP Pro SP2 is bog standard but maybe the script is failing because of the same cause.

Apologies if I was wrong to post as a new topic elsewhere though
__________________
Dave
Reply With Quote
  #9  
09-06-2004, 10:42 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
I have a perl script that generates a job file for virtualdubmod and an other one for virtualdub from a directory containing avi files.

I can post both scripts or just an example of generated file if you want.
Reply With Quote
  #10  
09-06-2004, 11:21 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
I repeat you, I tested script posted by me, and it works perfect.
Did you use double back slashes in your paths?
Did you see any message when run de script?
Reply With Quote
  #11  
09-06-2004, 11:23 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
I'm not sure a script for vdub can work like it for vdubmod. The opposite is impossible (this, I'm sure, because I tested it )

You script is for vdub Pro.
Reply With Quote
  #12  
09-06-2004, 12:38 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
I'm not sure a script for vdub can work like it for vdubmod. The opposite is impossible (this, I'm sure, because I tested it )

You script is for vdub Pro.
I tested it in VirtualDubMod 1.4, and trust me, it worked, but maybe can be differences with not equal versions. Later will test it again with VDM 1.5 and in any case will post a new script.
Reply With Quote
  #13  
09-06-2004, 03:10 PM
Mental Mental is offline
Free Member
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Trying to answer the posts here, here goes....

Yes I did notice the slashes, as I said I copied it exactly using copy and paste so I have no idea why it isn`t working. I have had problems with avisynth too where it would work but not load most of the external plugins so perhaps there is something off with my system though it appears fine.

I do appreciate all the help, I will try again with the script but can`t do that for a few days now.

Thankyou for the help, and to DialHot - yes if you could post an example or the perl I would be pleased, it will give me an idea where I might be messing up as I`ve read the help files, etcetera.

If I still have problems I will have to find another way but I`m hoping Virtualdub will do it fine - it should have worked already
__________________
Dave
Reply With Quote
  #14  
09-06-2004, 04:07 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
@Pro
Yes : syntax has changed betwseen V1.4 and V1.5
My script was okay for both version before 1.5.10 and now I need two script !

This is an example for two movies for Vdub 1.5.10
Code:
// $job "Job 1"
// $input "movie1.avi.avi"
// $output "out.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script
VirtualDub.Open("movie1.avi.avi",0,0);
VirtualDub.audio.SetSource(1);
VirtualDub.audio.SetMode(1);
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.audio.filters.Clear();
VirtualDub.SaveWAV("movie1.avi.wav");
VirtualDub.Close();
// $endjob

// $job "Job 2"
// $input "movie2.avi"
// $output "out.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script
VirtualDub.Open("movie2.avi",0,0);
VirtualDub.audio.SetSource(1);
VirtualDub.audio.SetMode(1);
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.audio.filters.Clear();
VirtualDub.SaveWAV("movie2.wav");
VirtualDub.Close();
// $endjob
This is the same for Vdubmod 1.5.10.1
Code:
// $job "Job 1"
// $input "movie1.avi"
// $output "out.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script
VirtualDub.Open("movie1.avi",0,0);
VirtualDub.stream[0].SetMode(1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetCompression();
VirtualDub.stream[1].SetMode(1);
VirtualDub.stream[1].SetConversion(0,0,0,0,0);
VirtualDub.stream[1].SetCompression();
VirtualDub.stream[0].SaveWAV("movie1 fr.wav");
VirtualDub.stream[1].SaveWAV("movie1 uk.wav");
VirtualDub.Close();
// $endjob

// $job "Job 2"
// $input "movie2.avi"
// $output "out.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script
VirtualDub.Open("movie2.avi",0,0);
VirtualDub.stream[0].SetMode(1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetCompression();
VirtualDub.stream[1].SetMode(1);
VirtualDub.stream[1].SetConversion(0,0,0,0,0);
VirtualDub.stream[1].SetCompression();
VirtualDub.stream[0].SaveWAV("movie2 fr.wav");
VirtualDub.stream[1].SaveWAV("movie2 uk.wav");
VirtualDub.Close();
// $endjob
Note1: with the given vdubmod script you isolate TWO audio stream (#0 and #1)
Note2 : the "//" lines MUST BY TYPED AS THIS !

Of course modify the name of the files.
Reply With Quote
  #15  
09-06-2004, 04:38 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks Phil, I tested VDM 1.5.10.1 just before read your post, and you are right. Thanks.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
VirtualDub: VirtualDub v1.6.0 (experimental) Released andybno1 Video Encoding and Conversion 1 10-15-2004 03:26 AM
VirtualDub: VirtualDub-MPEG2 1.5.10 build 18250 jorel Video Encoding and Conversion 14 09-30-2004 10:46 AM
VirtualDub: Editing an mpg file with virtualdub? shgr Video Encoding and Conversion 1 09-14-2004 12:17 AM
VirtualDub: Vdub and MA avs 2.52 script J-Wo Video Encoding and Conversion 1 09-15-2003 04:51 AM
VirtualDub: Detailed guides on how to use virtualdub? bigggt Video Encoding and Conversion 1 07-06-2003 09:19 PM

Thread Tools



 
All times are GMT -5. The time now is 05:43 PM  —  vBulletin © Jelsoft Enterprises Ltd