HexaCone/fonctions.sh

51 lines
1.1 KiB
Bash
Raw Normal View History

2024-12-16 03:53:42 +11:00
set -eu
2024-12-31 22:51:12 +11:00
# --------------------------------------------------------------
ralentisseur ()
{
temps=$1
echo "#+++ ralentisseur $temps +++#" | tee -a WS/log
sleep $temps
}
# --------------------------------------------------------------
2024-12-16 03:53:42 +11:00
ff_encodage()
{
2024-12-29 14:56:10 +11:00
SRCDIR="$1"
FILMNAME="$2"
2024-12-31 22:51:12 +11:00
echo "Encoding $SRCDIR to $FILMNAME" | tee -a WS/log
2024-12-29 14:56:10 +11:00
ffmpeg -nostdin \
-y -r 30 -f image2 -i frames/${SRCDIR}/%05d.png \
-metadata artist='--[ tTh ]--' \
-metadata title='-- HexaCone --' \
-c:v libx264 \
-pix_fmt yuv420p \
-tune film \
$FILMNAME
2024-12-31 22:51:12 +11:00
# wc -c $FILMNAME | tee -a WS/log
2024-12-16 03:53:42 +11:00
}
2024-12-31 22:51:12 +11:00
# --------------------------------------------------------------
2024-12-16 03:53:42 +11:00
mp_encodage()
{
2024-12-31 22:51:12 +11:00
#
# NOT WORKING !
#
2024-12-16 03:53:42 +11:00
mencoder 'mf://frames/*.png' \
-mf \
2024-12-20 05:13:31 +11:00
fps=24 \
2024-12-16 03:53:42 +11:00
-ovc lavc \
-lavcopts vcodec=mpeg4 \
-o output.avi
}
2024-12-31 22:51:12 +11:00
# --------------------------------------------------------------
# --------------------------------------------------------------