diff options
author | Jonas Smedegaard <dr@jones.dk> | 2014-09-12 14:53:47 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2014-09-12 14:53:47 +0200 |
commit | dea13baed9d88899e0ff66af73ca03943c5c7251 (patch) | |
tree | bb00678bfb52385a4d453e3f92dfc55fdb35abb7 /localvideowebencode | |
parent | 66155aaf843f40547a424ea419894f46861e8bbb (diff) |
Avoid use of qt-faststart for recent melt.
Diffstat (limited to 'localvideowebencode')
-rwxr-xr-x | localvideowebencode | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/localvideowebencode b/localvideowebencode index 25df1d5..4cc654e 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -140,6 +140,10 @@ while true ; do esac done +# Resolve if melt is version 0.9.2 or newer +# TODO: drop when melt 0.9.2 is stable +melt_recent=$(melt -query filter=loudness | grep -i R128) + while [ $# -gt 0 ] ; do case "$1" in *=*) _melt_in="${_melt_in:+$_melt_in }$1"; shift;; @@ -279,10 +283,11 @@ $melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.ogv" $ ## 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 -# TODO: drop qt-faststart when melt 0.9.2 is stable -mv "$stem.mp4" "$stem.mp4"~ -qt-faststart "$stem.mp4"~ "$stem.mp4" -[ -f "$stem.mp4" ] && rm "$stem.mp4"~ || mv -f "$stem.mp4"~ "$stem.mp4" +if [ -z "$melt_recent" ]; then + mv "$stem.mp4" "$stem.mp4"~ + qt-faststart "$stem.mp4"~ "$stem.mp4" + [ -f "$stem.mp4" ] && rm "$stem.mp4"~ || mv -f "$stem.mp4"~ "$stem.mp4" +fi ## VP8/Vorbis/WebM # TODO: use two-pass when supported by melt |