diff --git a/scripts/encode_gif.sh b/scripts/encode_gif.sh index 013b3d9b6..cba22f943 100755 --- a/scripts/encode_gif.sh +++ b/scripts/encode_gif.sh @@ -1,7 +1,7 @@ #!/bin/sh if=$1 -of=`basename "$if"|sed -e 's/\..\+//'` +of=$2 -ffmpeg -i "$if" -ss 10 -r 0.002 -b 100k -bt 100M -s 512x288 "$of.%05d.jpg" && \ +ffmpeg -i "$if" -ss 10 -r 0.002 -b 100k -bt 100M -s 320x180 "$of.%05d.jpg" && \ convert -delay 50 -loop 0 "$of.?????.jpg" "$of.gif" diff --git a/scripts/encode_mp4.sh b/scripts/encode_mp4.sh index 81583ed32..6ed8eb1af 100755 --- a/scripts/encode_mp4.sh +++ b/scripts/encode_mp4.sh @@ -1,25 +1,15 @@ #!/bin/sh -e if=$1 -of=`basename "$1"`".mp4" +of=$2 # No. CPU cores: -threads=2 +threads=8 # Video bitrate: vb=400k # Audio bitrate: -ab=96k +ab=64k -ffmpeg -i "$if" \ - -f mp4 \ - -an \ - -threads $threads \ - -vcodec libx264 \ - -vpre libx264-ipod640 \ - -b:v $vb \ - -pass 1 \ - -passlogfile "$of.ffmpeg2pass" \ - -y /dev/null ffmpeg -i "$if" \ -f mp4 \ -acodec libfaac \ @@ -28,7 +18,7 @@ ffmpeg -i "$if" \ -vcodec libx264 \ -vpre libx264-ipod640 \ -b:v $vb \ - -pass 2 \ + -s 640x360 \ -passlogfile "$of.ffmpeg2pass" \ -y "$of" diff --git a/scripts/encode_webm.sh b/scripts/encode_webm.sh index a4e52de0c..216213caa 100755 --- a/scripts/encode_webm.sh +++ b/scripts/encode_webm.sh @@ -2,10 +2,10 @@ if=$1 -of=`basename "$1"`".webm" +of=$2 # No. CPU cores: -threads=2 +threads=8 # Video bitrate: vb=400k # Audio bitrate: @@ -17,6 +17,7 @@ ffmpeg -i "$if" \ -an \ -vcodec libvpx \ -b:v $vb \ + -s 640x360 \ -pass 1 \ -passlogfile "$of.ffmpeg2pass" \ -y /dev/null @@ -27,6 +28,7 @@ ffmpeg -i "$if" \ -ab $ab \ -vcodec libvpx \ -b:v $vb \ + -s 640x360 \ -pass 2 \ -passlogfile "$of.ffmpeg2pass" \ -y "$of"