summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlocalvideowebencode16
1 files changed, 8 insertions, 8 deletions
diff --git a/localvideowebencode b/localvideowebencode
index 1766ca7..39dc6be 100755
--- a/localvideowebencode
+++ b/localvideowebencode
@@ -264,20 +264,20 @@ esac
# TODO: When verified beneficial, add option real_time=-2
_melt_in="${_melt_in:+$_melt_in }-progress $sample"
-_melt_video="$_melt_video ${bitrate:+vb=${bitrate}} ${size:+s=$size} ${aspect:+aspect=$aspect}"
-_melt_ogg="f=ogg vcodec=libtheora ${bitrate:-qscale=5}"
-_melt_h264="$_melt_h264 ${bitrate:-qscale=5}"
-_melt_webm="${webmpreset:+-vpre=libvpx-$webmpreset}"
+_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}"
+_melt_webm="$_melt_video${webmpreset:+- vpre=libvpx-$webmpreset}"
_melt_audio="${channels:+ac=$channels}"
_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_video $_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_video $_melt_out
-melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.mp4" ${bitrate:+pass=2} $_melt_h264 $_melt_video $_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 +285,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_video $_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"