This commit is contained in:
2020-03-16 00:00:29 +01:00
parent 6f2113c15c
commit bed27db264
3 changed files with 24 additions and 19 deletions
+5 -3
View File
@@ -6,17 +6,19 @@ if [ $files -eq 1 ]; then
cd $(ls)
fi
convert -density 300 *.pdf -resize 1440x1080! '%01d'.png
convert -density 300 *.pdf -resize 1440x1080! '%d'.png
count=$(ls *wav | wc -l)
files=""
for i in `seq 0 $count`; do
for i in `seq 0 $(($count - 1))`; do
# fade
duration=$(sox $i.wav -n stat 2>&1 | grep Length | cut -d ':' -f 2 | tr -d '[:space:]')
sox $i.wav faded-$i.wav fade 0:0.1 $(soxi -d $i.wav) 0:0.1
files="$files faded-$i.wav"
echo -e "file '$i.png'\nduration $duration" >> video-input-list.txt
done
sox faded-{0..$count}.wav output.wav
sox $files output.wav
ffmpeg -f concat -safe 0 -i video-input-list.txt output.mp4
ffmpeg -i output.mp4 -i output.wav -c:v libx264 final.mp4