diff --git a/encode.sh b/encode.sh deleted file mode 100755 index fb8dd3a..0000000 --- a/encode.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -e ; set -u - -if [ $# == 1 ] -then - srcdir=$1 -else - srcdir="essai" -fi - -source ./fonctions.sh - -ff_encodage $srcdir wip.mp4 diff --git a/fonctions.sh b/fonctions.sh deleted file mode 100644 index 03967dc..0000000 --- a/fonctions.sh +++ /dev/null @@ -1,53 +0,0 @@ - -set -eu - -# -------------------------------------------------------------- -ralentisseur () -{ -temps=$1 - -load=$(awk '{print int($1)}' < /proc/loadavg) -# echo " load is $load" | tee -a WS/log -if [ $load -gt 10 ] ; then - attente=$(( $temps + ($RANDOM % 90) )) - echo "ralentir $0 $SEQNAME $attente" # | tee -a WS/log - sleep $attente -fi -} - -# -------------------------------------------------------------- - -ff_encodage() -{ -SRCDIR="$1" -FILMNAME="$2" - -echo "Encoding $SRCDIR to $FILMNAME" | tee -a WS/log -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 - -# wc -c $FILMNAME | tee -a WS/log -} -# -------------------------------------------------------------- - -mp_encodage() -{ -# -# NOT WORKING ! -# -mencoder 'mf://frames/*.png' \ - -mf \ - fps=24 \ - -ovc lavc \ - -lavcopts vcodec=mpeg4 \ - -o output.avi -} - -# -------------------------------------------------------------- -# -------------------------------------------------------------- diff --git a/linkfarmer.sh b/linkfarmer.sh deleted file mode 100755 index 811e9e4..0000000 --- a/linkfarmer.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - -set -e ; set -u -source ./fonctions.sh - -IDX=0 -SPOOL="frames/Spool" - -# ------------------------------------------------------- -addfile () -{ -src="$1" -dstname=$(printf "%s/%05d.png" $SPOOL $IDX) -# echo "$src -> $dstname" -# ln --force --symbolic $src $dstname -cp -f $src $dstname -IDX=$(( IDX + 1 )) -} -# ------------------------------------------------------- -linkfarm () -{ -SRC="frames/$1" -echo "linkfarm $SRC" | tee -a WS/log - -local NBRE=30 -for foo in $(seq 0 $NBRE) -do - addfile "$SRC/00000.png" -done - -for src in "$SRC"/* -do - addfile $src -done - -for foo in $(seq 0 $NBRE) -do - addfile "$SRC/00359.png" -done -sync - -} -# ------------------------------------------------------- -faire_le_titre () -{ -echo "faire le titre" - -local NBRE=90 -for foo in $(seq 0 $NBRE) -do - addfile "datas/cover.png" -done -} -# ------------------------------------------------------- -faire_la_fin () -{ -local NBRE=90 -for foo in $(seq 0 $NBRE) -do - addfile "datas/back.png" -done -} -# ------------------------------------------------------- - -faire_le_titre - -ralentisseur 10 - -linkfarm orbite -linkfarm topview -linkfarm passage -linkfarm scene -linkfarm essai - -faire_la_fin - -ff_encodage Spool full.mp4 - - - - - diff --git a/plot-timing.sh b/plot-timing.sh deleted file mode 100755 index c90321d..0000000 --- a/plot-timing.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -set -ue - -TMPFILE="/dev/shm/plot-timing.tmp" -IMAGE="timing.png" - -tail -3600 WS/mp4.timing | awk ' \ -BEGIN { \ - nbrames=360; - for (foo=0; foo $3) mini[$2] = $3; \ - if (maxi[$2] < $3) maxi[$2] = $3; \ - } \ -END { \ - for (foo=0; foo 0) { \ - mean = accu[foo] / count[foo]; \ - printf "%4d %4f %4d %4d\n", foo, mean, \ - mini[foo], maxi[foo]; \ - } \ - } - } \ -' > $TMPFILE - -gnuplot << __EOC__ - set term png size 800,480 - set output "timing.png" - set grid - set xrange [:360] - set yrange [:30] - set title "HexaCone : temps de tracé vs. numéro de séquence" - set xlabel "numéro de la trame" - set ylabel "temps en secondes" - plot "/dev/shm/plot-timing.tmp" u 1:4 w l t "maximum", \ - "/dev/shm/plot-timing.tmp" u 1:3 w l t "minimum", \ - "/dev/shm/plot-timing.tmp" u 1:2 w l t "moyenne", -__EOC__