diff options
Diffstat (limited to 'localvideowebencode')
-rwxr-xr-x | localvideowebencode | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/localvideowebencode b/localvideowebencode index 470b549..d452aab 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -385,7 +385,8 @@ case "$audio" in ;; *) exit1 "Unknown audio style \"$audio\".";; esac -channels=$(ffprobe -v warning -show_streams "$infile_first" \ +which ffprobe > /dev/null && ffprobe=ffprobe || ffprobe=avprobe +channels=$($ffprobe -v warning -show_streams "$infile_first" \ | perl -ne 's/channels=// and print $_' || echo -1) # adapt channel count and flags to reflect actual downmix/silence need if [ -n "$stereo" ]; then @@ -424,8 +425,9 @@ fi # generic options melt="melt -progress" -ffmpeg="ffmpeg -threads auto -y -v info -stats" -ffmpeg_chained="ffmpeg -threads auto -y -v warning" +which ffmpeg > /dev/null && ffmpeg=ffmpeg || ffmpeg=avconv +ffmpeg_alone="$ffmpeg -threads auto -y -v info -stats" +ffmpeg_chained="$ffmpeg -threads auto -y -v warning" vpxenc_chained="vpxenc --quiet ${processors:+-t $((processors-1))}" oggenc="oggenc" opusenc="opusenc" @@ -565,7 +567,7 @@ if [ -n "$use_oggenc$use_opusenc$use_vpxenc" ] && [ -n "$webm$vp9" ]; then $_ffmpeg_ogg_in -i pipe:0 \ $_ffmpeg_webm_keepvideo $stem.webm else - $ffmpeg $_ffmpeg_webm_in -i ${stem}_silent.webm \ + $ffmpeg_alone $_ffmpeg_webm_in -i ${stem}_silent.webm \ $_ffmpeg_matroska_wav_in -i $stem.mkv \ $_ffmpeg_webm_keepvideo ${stem}.webm fi @@ -579,7 +581,7 @@ if [ -n "$use_oggenc$use_opusenc$use_vpxenc" ] && [ -n "$webm$vp9" ]; then $_ffmpeg_ogg_in -i pipe:0 \ $_ffmpeg_webm_keepvideo_opus ${stem}_vp9.webm else - $ffmpeg $_ffmpeg_webm_in -i ${stem}_vp9_silent.webm \ + $ffmpeg_alone $_ffmpeg_webm_in -i ${stem}_vp9_silent.webm \ $_ffmpeg_matroska_wav_in -i $stem.mkv \ $_ffmpeg_webm_keepvideo_opus ${stem}_vp9.webm fi |