blob: 903b8291e3aa71fd87535e4b64f458c3bf5f3a18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
|