diff options
Diffstat (limited to 'localvideowebencode')
-rwxr-xr-x | localvideowebencode | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/localvideowebencode b/localvideowebencode index 08dddd7..f16587d 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -202,19 +202,12 @@ infile_first=$(perl -e 'print shift @ARGV' $infiles) stem=${stem:-$(basename "$infile_first" | perl -pe 's/\.[^.]*//')} title=${title:-$stem} -# Avoid melt for VP8 and VP9: multipass broken for these codecs #use_ffmpeg_vp8=yes #use_ffmpeg_vp9=yes #use_vpxenc=yes # Avoid discrete audio encoders if possible: may cause sync problems #use_oggenc=yes #use_opusenc=yes -if [ -n "$use_ffmpeg_vp8$use_ffmpeg_vp9$use_vpxenc" ]; then - [ -n "$use_oggenc" ] || use_ffmpeg_ogg=yes - [ -n "$use_opusenc" ] || use_ffmpeg_opus=yes - [ -z "$use_oggenc$use_opusenc" ] || use_wav=yes - [ -z "$use_ffmpeg_ogg$use_ffmpeg_opus" ] || use_matroska=yes -fi # Avoid AAC: Lame arguably better than any free AAC encoder # Argument for AAC: Safari possibly lacks mp3 support in video container #use_mp3=yes @@ -449,6 +442,17 @@ if [ -n "$stereo$mono" ]; then fi fi +for vformat in vp8 vp9 h264; do + # melt supports dual-pass mode only for h.264 + [ h264 = "$vformat" ] || [ -n "$vpxenc" ] || [ -z "$multipass" ] || eval "use_ffmpeg_$vformat=yes" +done +if [ -n "$use_ffmpeg_vp8$use_ffmpeg_vp9$use_vpxenc" ]; then + [ -n "$use_oggenc" ] || use_ffmpeg_ogg=yes + [ -n "$use_opusenc" ] || use_ffmpeg_opus=yes + [ -z "$use_oggenc$use_opusenc" ] || use_wav=yes + [ -z "$use_ffmpeg_ogg$use_ffmpeg_opus" ] || use_matroska=yes +fi + # generic options melt="melt -progress" which ffmpeg > /dev/null && ffmpeg=ffmpeg || ffmpeg=avconv |