VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. My camera records videos of the following sort:

    Video: MJPG 640x480 30.00fps 8453Kbps [Video 0]
    Audio: PCM 8000Hz mono 64Kbps [Audio 1]

    I wish to compress this down to say 1-2mbps xvid. How can I do this automatically for many videos in different subfolders?
    Quote Quote  
  2. Member midders's Avatar
    Join Date
    Sep 2008
    Location
    United Kingdom
    Search Comp PM
    How's your windows batch programming? (I'm assuming you're not using a Mac!)

    In the following code, change *.mjpg to match the file extension for your Mjpeg files, and add/modify the avisynth script as you like:
    Code:
    for /f "usebackq tokens=* delims=" %%A in (`dir /a-d/s/b *.mjpg`) do call :MAKE_AVS "%%~A"
    goto :EOF
    
    :MAKE_AVS
    echo # generated avs file>"%~n1.avs"
    echo DirectShowSource(%1,audio=true)>>"%~n1.avs"
    echo # add any other AviSynth commands here>>"%~n1.avs"
    goto :EOF
    The above code, when pasted into a file called doit.cmd and then run from a cmd prompt in the folder containing all your video sub-folders, will create an AviSynth script file for each of your video files. You can then point your favourite batch-encoding application at a single folder to encode all your videos. (My script assumes that none of your videos has the same filename.)

    For this to work, you will need AviSynth and ffdshow installed (and need to make sure that ffdshow video decoder is set to decode mjpeg video).

    Slainte

    midders
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!