scripts/videoappend.sh

25 lines
559 B
Bash
Raw Permalink Normal View History

2018-11-10 14:01:20 +01:00
#!/bin/bash
folderout="/tmp/render/"
folderin="videos/"
fileout="out.mp4"
#mkdir
mkdir -p $folderout
#deletes this file - if exists
rm -f "${folderout}list.txt"
echo "generate listfile"
list=$(ls --color=never -tr "$folderin" )
for file in $list; do
echo "file '$folderin$file'" >> "${folderout}list.txt"
done
#if the user wants to correct somethink in the file
echo "wait for acc"
read ignored
echo "RENDER!"
ffmpeg -hide_banner -threads 0 -f concat -safe 0 -i "${folderout}list.txt" -c copy "$folderout$fileout"
rm "${folderout}list.txt"
echo "done."