summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-09-12 12:08:28 +0200
committerJonas Smedegaard <dr@jones.dk>2014-09-12 12:12:42 +0200
commit66155aaf843f40547a424ea419894f46861e8bbb (patch)
treee8af8dbaf016581728cb14c42a33cd6352badec7
parent87dc4453bef1409070e01cec613c2e44290e22d7 (diff)
Tidy $_melt_in, and separate core options in $melt.
-rwxr-xr-xlocalvideowebencode11
1 files changed, 6 insertions, 5 deletions
diff --git a/localvideowebencode b/localvideowebencode
index 39dc6be..25df1d5 100755
--- a/localvideowebencode
+++ b/localvideowebencode
@@ -263,7 +263,8 @@ esac
# TODO: Check and fail if all needed tools are not available
# TODO: When verified beneficial, add option real_time=-2
-_melt_in="${_melt_in:+$_melt_in }-progress $sample"
+melt="melt -progress"
+_melt_in="${_melt_in:+$_melt_in }$sample"
_melt_video="$_melt_video${bitrate:+ vb=${bitrate}}${size:+ s=$size}${aspect:+ aspect=$aspect}"
_melt_ogg="$_melt_video f=ogg vcodec=libtheora${bitrate:- qscale=5}"
_melt_h264="$_melt_video $_melt_h264${bitrate:- qscale=5}"
@@ -273,11 +274,11 @@ _melt_vorbis="$_melt_audio acodec=libvorbis ab=$(($channels*$bitrate_vorbis))k"
_melt_aac="$_melt_audio acodec=aac ab=$(($channels*$bitrate_aac))k"
## Theora/Vorbis/Ogg
-melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.ogv" $_melt_ogg $_melt_vorbis $_melt_out
+$melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.ogv" $_melt_ogg $_melt_vorbis $_melt_out
## H.264/AAC/MP4
-[ -z "$bitrate" ] || melt -group $_melt_in $infiles -group $filters -consumer avformat:/dev/null properties=x264-medium-pass1 $_melt_h264 $_melt_out
-melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.mp4" ${bitrate:+pass=2} $_melt_h264 $_melt_aac $_melt_out
+[ -z "$bitrate" ] || $melt -group $_melt_in $infiles -group $filters -consumer avformat:/dev/null properties=x264-medium-pass1 $_melt_h264 $_melt_out
+$melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.mp4" ${bitrate:+pass=2} $_melt_h264 $_melt_aac $_melt_out
# TODO: drop qt-faststart when melt 0.9.2 is stable
mv "$stem.mp4" "$stem.mp4"~
qt-faststart "$stem.mp4"~ "$stem.mp4"
@@ -285,7 +286,7 @@ qt-faststart "$stem.mp4"~ "$stem.mp4"
## VP8/Vorbis/WebM
# TODO: use two-pass when supported by melt
-melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.webm" properties=webm $_melt_webm $_melt_vorbis $_melt_out
+$melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.webm" properties=webm $_melt_webm $_melt_vorbis $_melt_out
## JPEG preview
ffmpegthumbnailer -s0 -i "$stem.mp4" -o "$stem.jpg"