2020-06-07 19:04:43 +03:00
|
|
|
tmpfile="$RANDOM-$(date +%s%N)"
|
|
|
|
|
|
|
|
cp $2 "/tmp/vid_$tmpfile.bin"
|
2020-06-23 23:04:17 +03:00
|
|
|
cp ../files/video/rendering.apng $3${4:0:2}/$4.gif
|
|
|
|
cp ../files/video/rendering.ogv $3/${4:0:2}/$4.ogv
|
2020-06-07 19:04:43 +03:00
|
|
|
|
2020-06-23 23:04:17 +03:00
|
|
|
nice ffmpeg -i "/tmp/vid_$tmpfile.bin" -ss 00:00:01.000 -vframes 1 $3${4:0:2}/$4.gif
|
2022-04-18 20:40:32 +03:00
|
|
|
nice -n 20 ffmpeg -i "/tmp/vid_$tmpfile.bin" -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 -vf "scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2,setsar=1" -y "/tmp/ffmOi$tmpfile.ogv"
|
2020-06-07 19:04:43 +03:00
|
|
|
|
2020-06-23 23:04:17 +03:00
|
|
|
rm -rf $3${4:0:2}/$4.ogv
|
|
|
|
mv "/tmp/ffmOi$tmpfile.ogv" $3${4:0:2}/$4.ogv
|
|
|
|
|
2020-06-07 19:04:43 +03:00
|
|
|
rm -f "/tmp/ffmOi$tmpfile.ogv"
|
2020-06-23 23:04:17 +03:00
|
|
|
rm -f "/tmp/vid_$tmpfile.bin"
|