02-HELP ME -batch replacement of audio tracks in video files-02

Started by unity, November 02, 2023, 04:53:15 PM

Previous topic - Next topic


Dear eumagga0x2a
Help me complete the batch processing script!
In the script you wrote earlier
in the video file, the audio track was replaced with another external audio track
(as was the case)

Is it possible to improve the batch script (to end up with a video file with two audio tracks)

so that it would be possible:
-01) add a new audio track to the video file (with voice acting in a different language), but so that the original audio track is preserved (i.e., as a result, a video file with two audio tracks, original and new)

-02) integrate multiple audio tracks (in different languages)

-03) the ability to embed subtitles into a video (but as I understand it only through video conversion), but I would like to find a solution, do it through batch processing (with a large number of files, 100,200,300)

Thank you!


1. Just drop the lines

    if nbInternalTracks:

If you want to specify the language for the external audio track, add line

    adm.setSourceTrackLanguage(nbInternalTracks, "eng")
after the line

See https://github.com/mean00/avidemux2/blob/master/avidemux_core/ADM_coreUtils/src/ADM_iso639.cpp for the list of valid language descriptors.

2. Do you mean automatically add multiple external audio tracks per each source video?

3. I am not sure you really want hardcoding subtitles (the only thing Avidemux is able to do). Muxing a subtitle track into a video is not implemented in Avidemux.


Thank you very much, dear
    1) everything works with new lines!

-------------------------------------------------- -------------------------------------------------- -
and I forgot to ask
How to batch export audio tracks from video files?
-------------------------------------------------- -------------------------------------------------- ---
2) "Do you mean automatically adding multiple external audio tracks for each source video?"

yes, how can this be implemented? through names - language postfix - audio track?

here is an example of a specific technical task - batch conversion -
there are, say, 100 videos
1) batch extraction of audio tracks (video remains without sound)
2) add -to these 100 videos (now without sound - after 1 step)
several audio tracks for each video (in different languages, and the number of added audio tracks should be controlled (in the script?), from two to (how many are possible in ?
"For a list of valid language descriptors, see

how can this be implemented? through names - language postfix - audio track?
and tell me if it is possible to create a batch conversion (also 100 video files),
video file - with two audio tracks in different languages, audio track01 (in one language) in, say, the left audio channel (L), and audio track02 (in another language) in, say, the right audio channel (R)?
Thank you!