This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/bash/module/ffmpeg.sh

12 lines
400 B
Bash
Raw Normal View History

2023-10-30 03:49:10 +03:00
# mux audio into containers. file names in sound and current dirrectories must match. tmp usage for anime downloads.
# usage: ffmpeg_mux_audio <SOUND> <OUTPUT DIR>
2023-08-08 16:24:15 +03:00
ffmpeg_mux_audio()
{
if [[ "$1" = "" ]]; then
2023-10-30 03:49:10 +03:00
echo "usage: ffmpeg_mux_audio <SOUND> <OUTPUT DIR>"
2023-08-08 16:24:15 +03:00
return
fi
for file in *; do ffmpeg -i "$file" -i "$1"/"$file" -c copy -map 0:v:0 -map 1:a:0 -shortest "$2"/"$file"; done
}