VideoHelp Forum




+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    I'd like to be able to automate my video conversions. I need to convert a lot of h.264 MP4 videos to Xvid AVI. I'm trying to set it up so a folder is monitored and the videos are automatically converted.

    I've tried the old Handbrake 0.9.3 (last version with xvid) and DropFolders. I use this string and DropFolders tells me it's and invalid codec.

    -e xvid -E lame -2 -s 175

    I tried using HandbrakeCLI directly and it looks like it's going to do it but then gives me a bunch of exception errors. I'm assuming it needs the MP4 to be demuxed first?

    I've been using this batch script to run avidemux2_cli, but I hate having to move all the files around myself.

    set avidemux="D:\Locked\Programs\avidemux_2.5_r7200_wi n32\avidemux2_cli.exe"
    set videocodec=Xvid
    set audiocodec=MP3
    for %%f in (*.mp4) do %avidemux% --video-codec %videocodec% --audio-codec %audiocodec% --force-alt-h264 --load "%%f" --save "%%f.avi" --quit


    Problem is, I'd like to have the AVI files be the same file size as the original MP4s, but apparently avidemux2_cli doesn't support setting a target file size.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    If you use 2pass encoding you can set target file size,

    Code:
    --video-conf
    cq=q | cbr=br | 2pass=xx	
    Select the encoding mode: constant quality (cq=quality), constant bitrate (br=bitrate) or 2 pass mode, in that case, give the final size in megabytes.
    It should then be possible to get the video source size with a batch command(see http://stackoverflow.com/questions/112055/what-does-d0-mean-in-a-windows-batch-file ) and use like --video-conf 2pass=100 (100MB)
    Quote Quote  
  3. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    Thanks. That looks like it's doing the trick.

    Now I just need to move the original file to a different folder after it is converted so I can keep originals around in case something goes wrong. How do I get the batch to do that?

    Even more awesome, maybe there's a way to have the batch move the original to a different folder and also check that same folder for older files and delete them? Say, delete all files that are a week or older.
    Quote Quote  
  4. Member
    Join Date
    Jan 2011
    Location
    Adelaide, Australia
    Search PM
    Quote Quote  
  5. Member
    Join Date
    Oct 2005
    Location
    United States
    Search Comp PM
    Turns out, --video-conf 2pass=175 resulted in a file that was 196MB. That doesn't work for me. I wish it worked like MeGUI and other apps and took the audio size into account.

    Looking at MCE-Buddy, it looks like it can't convert to MP3 audio, just AC3. I don't like that, but I might be able to live with it. Also, it doesn't allow for setting a target file size. Unless it all can be done by modifying the profiles it uses.

    Plus, I can't tell how to set it to run in the background. Unless it does that automatically and doesn't show any evidence of it.
    Quote Quote  



Similar Threads

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