From abb56bd09d842370cdfe605d2cd61ddb25a64ffa Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 2 Sep 2010 18:05:50 +0200 Subject: Cleanup logfile after WebM. Add a few comments. --- localvideowebencode | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/localvideowebencode b/localvideowebencode index 5b4d429..86fd78e 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -16,6 +16,8 @@ width=$(echo "$size" | perl -pe 's/[^x]*x//') height=$(echo "$size" | perl -pe 's/x[^x]*//') heightplus=${height:+$(($height+4))} +# TODO: Check and fail if all needed tools are not available + ## Theora/Vorbis/Ogg ffmpeg2theora --videobitrate 200 --max_size "$size" --output "$filebase.ogv" "$infile" @@ -24,8 +26,10 @@ HandBrakeCLI --preset "iPhone & iPod Touch" --vb 200 ${width:+--maxWidth "$width ## VP8/Vorbis/WebM ! ffmpeg -codecs | grep -iw vp8 || webm=yes +# FIXME: check and fail if logfiles exist already [ -z "$webm" ] || ffmpeg -pass 1 -passlogfile "$infile" -threads 16 -keyint_min 0 -g 250 -skip_threshold 0 -qmin 1 -qmax 51 -i "$infile" -vcodec libvpx -b 204800 -s "$size" -aspect 4:3 -an -f webm -y NUL [ -z "$webm" ] || ffmpeg -pass 2 -passlogfile "$infile" -threads 16 -keyint_min 0 -g 250 -skip_threshold 0 -qmin 1 -qmax 51 -i "$infile" -vcodec libvpx -b 204800 -s "$size" -aspect 4:3 -acodec libvorbis -ac 2 -y "$filebase.webm" +rm "$infile"-*.log ## JPEG preview ffmpegthumbnailer -s0 -i "$filebase.ogv" -o "$filebase.jpg" -- cgit v1.2.3