This commit is contained in:
Thomas Forgione 2020-03-15 23:45:50 +01:00
parent f7cf161830
commit 6f2113c15c
3 changed files with 15 additions and 2 deletions

View File

@ -11,6 +11,12 @@ const port = 3000;
const transporter = nodemailer.createTransport(JSON.parse(fs.readFileSync(__dirname + '/auth.json', 'utf-8')));
try {
fs.mkdirSync(__dirname + '/data');
} catch (e) {
}
const root = "https://easy-editing.tforgione.fr/";
function responseText(id) {

5
merge
View File

@ -7,15 +7,16 @@ if [ $files -eq 1 ]; then
fi
convert -density 300 *.pdf -resize 1440x1080! '%01d'.png
count=$(ls *wav | wc -l)
for i in `seq 0 4`; do
for i in `seq 0 $count`; 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
echo -e "file '$i.png'\nduration $duration" >> video-input-list.txt
done
sox faded-*wav output.wav
sox faded-{0..$count}.wav 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

View File

@ -33,6 +33,12 @@ else
elif [ $number_of_sounds -ne $number_of_pages ]; then
echo >&2 "<li>il y a $number_of_sounds fichiers sonores mais $number_of_pages planches dans vos slides</li>"
errored=1
else
for i in `seq 0 $number_of_sounds`; do
if ! [ -f $i.wav ]; then
"<li>les fichiers sonores doivent s'appeler 0.wav, 1.wav, 2.wav, etc...</li>"
fi
done
fi
fi