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