News:

--

Main Menu

Batch Save Audio Only

Started by TheTooleMan, July 16, 2022, 08:26:09 PM

Previous topic - Next topic

TheTooleMan

I would like to rip the audio from DVD's using a batch process. I'm quite dependent on saving project scripts and reviewing the tinypy code to understand what Avidemux is doing under the hood. Saving audio is not one of the things that is available for saving as a project. Any examples and starting points will be greatly appreciated!

(Not sure this is the best place for a scripting question, but my first try, the Documentation and Tips forum, is definitely the wrong place.)

eumagga0x2a

#1
The method is

adm.saveAudio(0, "path/to/outfile.ext")
where adm is presumed to have been set to Avidemux(). The first argument which should be the index number of the audio track is actually ignored and the first active audio track is used (the one which is played back when previewing video in Avidemux). The only true complication is to identify the correct track if there are multiple audio tracks, which must be set as the first one by clearing audio tracks and adding a single one with adm.audioAddTrack(int trackIndex) and to choose extension based either on the return value of adm.audioEncoding(int trackIndex) when in copy mode or on the selected audio encoder.

TheTooleMan

Thanks for the reply! I will test soon and return with results.