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.

 
Compress .avi(s) Using Command Line
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
Raoul
Posted: Nov 5 2010, 05:59 PM


Newbie


Group: Members
Posts: 3
Member No.: 28993
Joined: 5-November 10



Hi there,

I have a question:
I am using Fraps to record some gameplay, Fraps uses a really low compression, for example a 15 second video is about 500MB.
I am currently using VirtualDub in combination with the Xvid MPEG-4 Codec to compress the original fraps friles from 500MB to 20MB.
I have a lot of videos so it takes ages to do this manually.
So I started searching google for command line for VirtualDub.

QUOTE
The /p flag tells VirtualDub to add a batch job using the current settings and the given source and destination filenames. The /b flag adds jobs to process an entire directory into another.

virtualdub /s mySettings.vcf /p source.avi dest.avi /x


I found out that I could make a .vcf file that holds my specific settings (using MPEG-4 codec for Video Compression).

I created the .vcf file, and I started reading a little more and wrote myself a little CMD:
CODE
@echo off
TITLE Compressing video files using VirtualDub
SET WORKDIR=G:\Fraps
SET VD=%WORKDIR%\VD\VirtualDub-1.9.10-AMD64\Veedub64.exe
SET in=%WORKDIR%\Movies
SET out=%WORKDIR%\Done
SET vcf=%WORKDIR%\Movies\process.vcf
echo.
echo Working..
echo.
%VD% /s %vcf% /b %in% %out%
echo.
pause.
EXIT


But the script doesnt work and I cant figure out what I am doing wrong.
When I run the above script, VirtualDub loads and selects the right codec, but it isnt compressing anything, I think there is something missing.

In my workdir\Movies folder I have a file called:
iw4mp 2010-11-05 16-33-00-38.avi

I need the script to select all the .avi in the Movies folder, then compress them and put the compressed output in the workdir\Done folder.

Someone knows what I should do?
 
     Top
dloneranger
Posted: Nov 5 2010, 07:51 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



With your script, you're adding jobs to the job list, but not processing it

You'll need the /r switch to actually run the batch jobs
It's in the help, just after the part about /b

And probably the /x to exit virtualdub after it's finished as well

Note: you're using virtualdub with a local batch list - this is fine as long as you're only using 1 instance of virtualdub, but it you run 2 at the same time the job list could end up garbled
If you want to ie: add more jobs to the list while it's already running

You can look at the help for batch operation: distributed mode
That lets you use multiple copies of virtualdub with one job list using the /master and /slave switchs



--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
Raoul
Posted: Nov 5 2010, 09:52 PM


Newbie


Group: Members
Posts: 3
Member No.: 28993
Joined: 5-November 10



QUOTE (dloneranger @ Nov 5 2010, 07:51 PM)
With your script, you're adding jobs to the job list, but not processing it

You'll need the /r switch to actually run the batch jobs
It's in the help, just after the part about /b

And probably the /x to exit virtualdub after it's finished as well

Note: you're using virtualdub with a local batch list - this is fine as long as you're only using 1 instance of virtualdub, but it you run 2 at the same time the job list could end up garbled
If you want to ie: add more jobs to the list while it's already running

You can look at the help for batch operation: distributed mode
That lets you use multiple copies of virtualdub with one job list using the /master and /slave switchs

Thanks!

CODE
@echo off
TITLE Compressing video files using VirtualDub
SET WORKDIR=G:\Fraps
SET VD=%WORKDIR%\VD\VirtualDub-1.9.10-AMD64\Veedub64.exe
SET in=%WORKDIR%\Movies\
SET out=%WORKDIR%\Done\
SET vcf=%WORKDIR%\Movies\process.vcf
echo.
echo Working..
echo.
%VD% /s %vcf% /b %in% %out% /r /x
echo.
EXIT


Works now! cool.gif laugh.gif



edit:
Hmm, it looks like the script never stops, it processes all files and then starts over again.
 
     Top
stephanV
Posted: Nov 6 2010, 08:20 AM


Spam killer ;)


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



QUOTE (Raoul @ Nov 5 2010, 10:52 PM)
edit:
Hmm, it looks like the script never stops, it processes all files and then starts over again.

Did you clear up the job list? If you ran your first script multiple times than those jobs would be still be present.

You can do this with /c by the way.

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
Raoul
Posted: Nov 17 2010, 12:31 PM


Newbie


Group: Members
Posts: 3
Member No.: 28993
Joined: 5-November 10



Thanks! Working great now! smile.gif cool.gif
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
4 replies since Nov 5 2010, 05:59 PM Track this topic | Email this topic | Print this topic

<< Back to Advanced Video Processing