digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   VirtualDub: Help with simple virtualdub Mod script? (http://www.digitalfaq.com/archives/encode/11938-virtualdub-simple-virtualdub.html)

Mental 09-05-2004 09:35 AM

Help with simple virtualdub Mod script?
 
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 :x

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

Boulder 09-05-2004 10:12 AM

Have you tried asking at the Unofficial VirtualDub Support Forums? They will surely know if it's possible.

http://virtualdub.everwicked.com/index.php

stephanV 09-05-2004 11:26 AM

Re: Help with simple virtualdub Mod script?
 
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!

Prodater64 09-05-2004 11:34 AM

Re: Help with simple virtualdub Mod script?
 
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 :x

If that I will say you works, please remember in the future where you found so hard answer. :D

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.

Mental 09-05-2004 01:38 PM

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 :oops:

Dave

PS Thanks for the help!

Prodater64 09-05-2004 01:47 PM

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 :oops:

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?

incredible 09-05-2004 02:05 PM

why doublepost?

Do look here...
http://www.kvcd.net/forum/viewtopic....793&highlight=

Mental 09-06-2004 10:36 AM

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 :oops:

Dialhot 09-06-2004 10:42 AM

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.

Prodater64 09-06-2004 11:21 AM

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?

Dialhot 09-06-2004 11:23 AM

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.

Prodater64 09-06-2004 12:38 PM

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.

Mental 09-06-2004 03:10 PM

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 :?

Dialhot 09-06-2004 04:07 PM

@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.

Prodater64 09-06-2004 04:38 PM

Thanks Phil, I tested VDM 1.5.10.1 just before read your post, and you are right. Thanks.


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.