Avidemux Forum

Avidemux => MacOSX => Topic started by: hgpuke on August 05, 2013, 06:48:03 PM

Title: Need help to write batch-script for de/re-muxing
Post by: hgpuke on August 05, 2013, 06:48:03 PM
Hi!
I am new to Avidemux and would like to ask for your help to write a shellscript or similar for Mac OS Mountain Lion which will do the following:

1. Open a file created with Handbrake containing video and audio suitable for most of Apples devices, including Apple TV 3. The file contains two audio-streams, AC3 and AAC. The file ending is .m4v
2. As my TV's built-in media-player seems to get confused with two audio-streams, I would like to keep only one of them (the AAC, I suppose).
3. Save the file with the video-stream intact but only one of the audio streams with the .mp4 filename ending.
4. Iterate over all .m4v files until complete.

This ought to be quite simple, but after looking at the CLI commands, I cannot figure out which parameters to use with what values. I have tried the GUI and it works as it should, but with the GUI I would have to load all 100 or so video-files manually, which I would like to avoid.

Can someone give me some hints?

Thanks!