Lossless merging and cutting for squats
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2019-11-22 11:13:09 +01:00
createsrt.sh init commit 2019-11-22 11:10:29 +01:00
cuts.txt init commit 2019-11-22 11:10:29 +01:00
README.md Update README.md 2019-11-22 11:13:09 +01:00

Cutting

while read fn from to; do flnm=`ls "$fn.mp4"`; ffmpeg -nostdin -i "$flnm" -vcodec copy -acodec copy -ss "$from" -to $to "c$fn.mp4"; done < cuts.txt

Srt Files Creation

./createsrt.sh

Merging subtitles and videos

for f in *.mp4; do \
flnm=`basename $f .mp4`; \
mkvmerge -o "s$flnm.mp4" $flnm.mp4  --language 0:en --track-name 0:English "$flnm.srt"; \
done;

Merging videos into an LP progression

ls sc*.mp4 | sort -k2,3g -t '_' > /tmp/concat_order.txt
a=`cat /tmp/concat_order.txt | tr -s '\n' " " | sed 's/ / +/g'`
mkvmerge -o comp.mp4 ${a::-2}