scripts/encode_{gif,mp4,webm} update
This commit is contained in:
parent
20e4d8201f
commit
14c6b99874
|
@ -3,8 +3,5 @@
|
||||||
if=$1
|
if=$1
|
||||||
of=`basename "$if"|sed -e 's/\..\+//'`
|
of=`basename "$if"|sed -e 's/\..\+//'`
|
||||||
|
|
||||||
#~/ffmpeg/
|
ffmpeg -i "$if" -ss 10 -r 0.002 -b 100k -bt 100M -s 512x288 "$of.%05d.jpg" && \
|
||||||
ffmpeg -i "$if" -ss 10 -r 0.004 -b 100k -bt 100000k -s 360x202 "$of.%05d.jpg" && \
|
convert -delay 50 -loop 0 "$of.?????.jpg" "$of.gif"
|
||||||
convert -delay 50 -loop 0 "$of.?????.jpg" "$of.gif" && \
|
|
||||||
mv "$of.00001.jpg" "$of.jpg" && \
|
|
||||||
rm "$of".?????.jpg
|
|
||||||
|
|
|
@ -7,11 +7,11 @@ schedtool -De \
|
||||||
ffmpeg -i "$if" \
|
ffmpeg -i "$if" \
|
||||||
-f mp4 \
|
-f mp4 \
|
||||||
-an \
|
-an \
|
||||||
|
-threads 4 \
|
||||||
|
-deinterlace \
|
||||||
-vcodec libx264 \
|
-vcodec libx264 \
|
||||||
-vpre baseline \
|
-vpre libx264-ipod640 \
|
||||||
-b 400k \
|
-b:v 400k \
|
||||||
-bt 400k \
|
|
||||||
-s 600x336 \
|
|
||||||
-pass 1 \
|
-pass 1 \
|
||||||
-passlogfile "$of.ffmpeg2pass" \
|
-passlogfile "$of.ffmpeg2pass" \
|
||||||
-y \
|
-y \
|
||||||
|
@ -21,11 +21,11 @@ schedtool -De \
|
||||||
-f mp4 \
|
-f mp4 \
|
||||||
-acodec libmp3lame \
|
-acodec libmp3lame \
|
||||||
-ab 96k \
|
-ab 96k \
|
||||||
|
-threads 4 \
|
||||||
|
-deinterlace \
|
||||||
-vcodec libx264 \
|
-vcodec libx264 \
|
||||||
-vpre baseline \
|
-vpre libx264-ipod640 \
|
||||||
-b 400k \
|
-b:v 400k \
|
||||||
-bt 400k \
|
|
||||||
-s 600x336 \
|
|
||||||
-pass 2 \
|
-pass 2 \
|
||||||
-passlogfile "$of.ffmpeg2pass" \
|
-passlogfile "$of.ffmpeg2pass" \
|
||||||
-y \
|
-y \
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
if=$1
|
if=$1
|
||||||
of=`basename "$1"`".webm"
|
of=`basename "$1"`".webm"
|
||||||
|
|
||||||
if [ ! -f "$of.ffmpeg2pass" ]; then
|
if [ ! -f "$of.ffmpeg2pass-0.log" ]; then
|
||||||
schedtool -De \
|
schedtool -De \
|
||||||
ffmpeg -i "$if" \
|
ffmpeg -i "$if" \
|
||||||
|
-threads 4 \
|
||||||
-f webm \
|
-f webm \
|
||||||
-an \
|
-an \
|
||||||
-vcodec libvpx \
|
-vcodec libvpx \
|
||||||
-b 400k \
|
-deinterlace \
|
||||||
-bt 400k \
|
-b:v 400k \
|
||||||
-s 600x336 \
|
|
||||||
-pass 1 \
|
-pass 1 \
|
||||||
-passlogfile "$of.ffmpeg2pass" \
|
-passlogfile "$of.ffmpeg2pass" \
|
||||||
-y \
|
-y \
|
||||||
|
@ -19,12 +20,13 @@ if [ ! -f "$of.ffmpeg2pass" ]; then
|
||||||
fi
|
fi
|
||||||
schedtool -De \
|
schedtool -De \
|
||||||
ffmpeg -i "$if" \
|
ffmpeg -i "$if" \
|
||||||
|
-threads 4 \
|
||||||
-f webm \
|
-f webm \
|
||||||
-acodec copy \
|
-acodec libvorbis \
|
||||||
|
-ab 96k \
|
||||||
-vcodec libvpx \
|
-vcodec libvpx \
|
||||||
-b 400k \
|
-deinterlace \
|
||||||
-bt 400k \
|
-b:v 400k \
|
||||||
-s 600x336 \
|
|
||||||
-pass 2 \
|
-pass 2 \
|
||||||
-passlogfile "$of.ffmpeg2pass" \
|
-passlogfile "$of.ffmpeg2pass" \
|
||||||
-y \
|
-y \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user