diff options
| author | yuzu-eva <cafebabe@disroot.org> | 2025-05-08 14:01:37 +0200 |
|---|---|---|
| committer | yuzu-eva <cafebabe@disroot.org> | 2025-05-08 14:01:37 +0200 |
| commit | ef7c1605a027b52bbff1b01ea693b60f53fa3a71 (patch) | |
| tree | 1089334258aefbd459d18cf6968e78f1194739b0 /combine-videos | |
initial commit
Diffstat (limited to 'combine-videos')
| -rwxr-xr-x | combine-videos | 15 |
1 files changed, 15 insertions, 0 deletions
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 |
