News:

--

Main Menu

Avidemux Problem With Batch Files

Started by BuMmR, September 27, 2013, 04:06:39 PM

Previous topic - Next topic

BuMmR

Can someone teamview me that knows alot about using command line to batch files? I have created a .bat to batch all my episodes and when I run it says "Error Opening File" I figure best way is have someone teamview me and either tell me why its doing it or take control and fix it. Please let me know. I have about 120+ episodes I want to convert from avi to mp4 so I can stream them on my appletv. I don't want to be sitting here all night doing it 1 by 1.

Baconnaise

You aren't alone. I've looked through some of the posts here and the wiki and the examples are out of date with reality. Examples are for mp4 to avi which is rare when most will want to convert all the older container formats like avi to mp4 or mkv.

set avidemux="C:\whatever\folder\youinstalleditin.exe"
set videocodec=x264
set audiocodec=AAC
set audiobitrate=160
for %%f in (*.avi) do %avidemux% --video-codec %videocodec% --audio-codec %audiocodec% --audio-bitrate %audiobitrate% --force-alt-h264 --load "%%f" --save "%%f.mp4" --quit


That's a snippet I've edited a few times from the wiki. The other batch version which is a touch simpler same thing. It's unclear about the audio setting if I want Faac there doesn't appear to be an option in the command list that makes that clear (unless I missed it). The other thing that's unclear or spelled out is if I want it to use the mp4v2 muxer and which one to use without going into editing a python project file or more intermediate commands for a batch file. 

The other lacking feature is the jobs or batch processing via gui. The way it's currently setup is sort of crazy and very tedious to work with (it's not worth using imo). A good example of how something like this should work is mkvtomp4. This program is better for converting files but mkvtomp4 and a couple others are just easier to use to get things done. If the dev gets around to improving the batch processing through the gui somewhere at least around handbrake or better this would be one of the best apps out imo.

BuMmR

This worked for me, only problem I'm having now is when it starts to convert each episode, a box pops up asking do I want to "unpack" the bit stream. Is there a way to make it do this automatically?

Baconnaise

It shouldn't give you any popups if you're using batch/py project files from what I understand. Check the wiki or perhaps avsforum. MkvtoMP4 might be your best bet since it's specifically for itunes/appletv converting.

BuMmR

#4
Fixed this problem. Got yet another one. For some reason with this script it isnt changing the Format inside avidemux to Mp4. For some reason its staying as AVI.

/edit - Nevermind! I got it working lol. Had to add --output-format mp4 to the script.

EEMcGee

Take a look on the Need help with batch files thread.  I just posted a few things on this.  I think it is exactly what you need.

http://www.avidemux.org/smf/index.php/topic,12740.msg65400.html#msg65400