From ef7c1605a027b52bbff1b01ea693b60f53fa3a71 Mon Sep 17 00:00:00 2001 From: yuzu-eva Date: Thu, 8 May 2025 14:01:37 +0200 Subject: initial commit --- combine-videos | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 combine-videos (limited to 'combine-videos') diff --git a/combine-videos b/combine-videos new file mode 100755 index 0000000..903b829 --- /dev/null +++ b/combine-videos @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +# Combine OP, Episode and ED into one file +# Used for Video files that get the OP and ED via metadata + +j=1; + +mkdir ./TMP/ + +for i in *.mkv; do + ffmpeg -i "[Coalgirls]_Serial_Experiments_Lain_OP_(1520x1080_Blu-Ray_FLAC)_[DF129863].mkv" -i "$i" -i "[Coalgirls]_Serial_Experiments_Lain_ED_(1520x1080_Blu-Ray_FLAC)_[BF8449F7].mkv" \ + -filter_complex "[0:v]ass=op.ass[video0];[1:v]ass=ep$j.ass[video1];[2:v]ass=ed.ass[video2];[video0][0:a:0][video1][1:a:0][video2][2:a:0]concat=n=3:v=1:a=1[outv][outa]" \ + -map [outv] -map [outa] -preset ultrafast -y ./TMP/Episode\ "$j"_tmp.mkv; + j=$((j+=1)); +done -- cgit v1.2.3