summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-10-04 00:23:18 +0200
committerJonas Smedegaard <dr@jones.dk>2014-10-04 00:30:45 +0200
commit39687f48e9ad51bf4d3fa203e6be3f7260f00de5 (patch)
tree95b0263c551dc8ea9f971837bd13ce7b23209e34
parent159fb1c842063bbacb9f7af7cd8f246ebd9c1ac4 (diff)
Distinguish initial and chained commands, the former being verbose to show progress.
-rwxr-xr-xlocalvideowebencode23
1 files changed, 12 insertions, 11 deletions
diff --git a/localvideowebencode b/localvideowebencode
index b60b0d1..59e88b7 100755
--- a/localvideowebencode
+++ b/localvideowebencode
@@ -411,10 +411,11 @@ use_vpxenc=yes
# generic options
melt="melt -progress"
-avconv="avconv -threads auto -y -v warning"
-vpxenc="vpxenc --quiet ${processors:+-t $((processors-1))}"
-oggenc="oggenc --quiet"
-opusenc="opusenc --quiet"
+avconv="avconv -threads auto -y -v info -stats"
+avconv_chained="avconv -threads auto -y -v warning"
+vpxenc_chained="vpxenc --quiet ${processors:+-t $((processors-1))}"
+oggenc="oggenc"
+opusenc="opusenc"
_melt_sample="$infile_first ${sample:+in=${samplestart:-0} out=$((${samplestart:-0} + samplelength))}"
# filter options
@@ -478,15 +479,15 @@ if [ -n "$multipass" ] && [ -n "$webm$vp9" ]; then
${do_loudness:+-consumer xml:$stem.xml video_off=1 all=1} \
-consumer avformat:pipe:1 $_melt_yuv4mpeg2 \
| pee \
- ${webm:+"$vpxenc - $_vpxenc_vp8 -p 2 --pass=1 --fpf=${stem}_vp8.log -o /dev/null"} \
- ${vp9:+"$vpxenc - $_vpxenc_vp9 -p 2 --pass=1 --fpf=${stem}_vp9.log -o /dev/null"}
+ ${webm:+"$vpxenc_chained - $_vpxenc_vp8 -p 2 --pass=1 --fpf=${stem}_vp8.log -o /dev/null"} \
+ ${vp9:+"$vpxenc_chained - $_vpxenc_vp9 -p 2 --pass=1 --fpf=${stem}_vp9.log -o /dev/null"}
else
$melt ${_melt_sample:-$infiles} \
${do_loudness:+$audioprefilters -filter loudness} \
$filters \
${do_loudness:+-consumer xml:$stem.xml video_off=1 all=1} \
-consumer avformat:pipe:1 $_melt_yuv4mpeg2 \
- | $avconv $_avconv_yuv4mpeg2_in -i pipe:0 \
+ | $avconv_chained $_avconv_yuv4mpeg2_in -i pipe:0 \
${webm:+$_avconv_rawvideo $_avconv_vp8 -an -pass 1 -passlogfile ${stem}_vp8 /dev/null} \
${vp9:+$_avconv_rawvideo $_avconv_vp9 -an -pass 1 -passlogfile ${stem}_vp9 /dev/null}
[ -z "$webm" ] || mv -f ${stem}_vp8-*.log ${stem}_vp8_2pass.log
@@ -508,13 +509,13 @@ if [ -n "$use_oggenc$use_opusenc$use_vpxenc" ] && [ -n "$webm$vp9" ]; then
${channels:+-consumer avformat:$stem.wav $_melt_wav} \
-consumer avformat:pipe:1 $_melt_yuv4mpeg2 \
| pee \
- ${webm:+"$vpxenc - $_vpxenc_vp8${singlepass:+ -p 1}${multipass:+ -p 2 --pass=2 --fpf=${stem}_vp8.log} -o ${stem}_silent.webm"} \
- ${vp9:+"$vpxenc - $_vpxenc_vp9${singlepass:+ -p 1}${multipass:+ -p 2 --pass=2 --fpf=${stem}_vp9.log} -o ${stem}_vp9_silent.webm"}
+ ${webm:+"$vpxenc_chained - $_vpxenc_vp8${singlepass:+ -p 1}${multipass:+ -p 2 --pass=2 --fpf=${stem}_vp8.log} -o ${stem}_silent.webm"} \
+ ${vp9:+"$vpxenc_chained - $_vpxenc_vp9${singlepass:+ -p 1}${multipass:+ -p 2 --pass=2 --fpf=${stem}_vp9.log} -o ${stem}_vp9_silent.webm"}
if [ -n "$webm" ]; then
echo "Encoding Vorbis audio and muxing with VP8 video..."
if [ -n "$use_oggenc" ]; then
$oggenc $_oggenc_wav_in $_oggenc_vorbis -o - $stem.wav \
- | $avconv $_avconv_webm_in -i ${stem}_silent.webm $_avconv_ogg_in -i pipe:0 $_avconv_webm_keepvideo $stem.webm
+ | $avconv_chained $_avconv_webm_in -i ${stem}_silent.webm $_avconv_ogg_in -i pipe:0 $_avconv_webm_keepvideo $stem.webm
else
$avconv $_avconv_webm_in -i ${stem}_silent.webm $_avconv_wav_in -i $stem.wav $_avconv_webm_keepvideo ${stem}.webm
fi
@@ -523,7 +524,7 @@ if [ -n "$use_oggenc$use_opusenc$use_vpxenc" ] && [ -n "$webm$vp9" ]; then
echo "Encoding Opus audio and muxing with WebM/VP9 video..."
if [ -n "$use_opusenc" ]; then
$opusenc $_opusenc_wav_in $_opusenc_opus -o - $stem.wav \
- | $avconv $_avconv_webm_in -i ${stem}_vp9_silent.webm $_avconv_ogg_in -i pipe:0 $_avconv_webm_keepvideo_opus ${stem}_vp9.webm
+ | $avconv_chained $_avconv_webm_in -i ${stem}_vp9_silent.webm $_avconv_ogg_in -i pipe:0 $_avconv_webm_keepvideo_opus ${stem}_vp9.webm
else
$avconv $_avconv_webm_in -i ${stem}_vp9_silent.webm $_avconv_wav_in -i $stem.wav $_avconv_webm_keepvideo_opus ${stem}_vp9.webm
fi