This script takes a single input file and
- Reduces the volume of the third audio-track in the file by half
- Writes the reduced volume track into
l
- Mixes both the second audio-track and the lowered
l
-track together and stores them intoa
- Maps the original video to be the first track
- Adds the newly mixed audio-track
a
as the sole audio track - Enables pass-through for the video-track
- Configures the mixed audio-track to be AAC at 192kbit/s
[0:a:2]
selects from the first file (0
) the audio track (a
) at 0-based index 2 (2
)
Filters are composed by input (left side), the filter-name, options and the output: [0:a:1] [l] amix=inputs=2 [a]
- Input 1: From the first input-file use the audio track and index 1
- Input 2: Use the previously created track
l
- Filter Name:
amix
- Options:
inputs=2
sets input-count to two. (multiple options seperated by:
) - Output:
a
the new audio-track
- Initial Idea (wrong filter!): https://blog.nytsoi.net/2017/12/31/ffmpeg-combining-audio-tracks
amix
-filter (correct one): https://ffmpeg.org/ffmpeg-filters.html#amix