diff options
author | Jonas Smedegaard <dr@jones.dk> | 2021-02-09 14:19:02 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2021-02-09 14:35:25 +0100 |
commit | b0bc644cc3caeb44d3d42ef44cc90710f67fb1bd (patch) | |
tree | 09aab3572461d3f05edb22c63bc4f2fef6b944a9 /localvideowebencode | |
parent | 6f28be41f75d335415bfb804b0006e664a6d30ee (diff) |
only pipe raw video when needed
Diffstat (limited to 'localvideowebencode')
-rwxr-xr-x | localvideowebencode | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/localvideowebencode b/localvideowebencode index 1d99fc2..b8724eb 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -596,6 +596,7 @@ use_ffmpeg_any="${webm:+$use_ffmpeg_vp8}${webm_vp9:+$use_ffmpeg_vp9}${mp4:+$use_ use_vpxenc_any="${webm:+$use_vpxenc}${webm_vp9:+$use_vpxenc}" use_opusenc_any="${webm:+$use_oggenc}${webm_vp9:+$use_opusenc}" use_oggenc_any="${webm:+$use_oggenc}${webm_vp9:+$use_opusenc}" +[ -n "$use_ffmpeg_any$use_vpxenc_any$use_oggenc_any" } || use_any_nomelt_video=yes [ -z "$gpu" ] || echo >&2 "GPU platform enabled: $gpu" @@ -744,13 +745,14 @@ fi if [ -n "${webm:+$multipass_vp8}${webm_vp9:+$multipass_vp9}${mp4:+$multipass_avc}" ]; then echo >&2 "Analyzing video complexity..." - render melt $_melt_infiles $filters $_melt_stdout \ + render melt $_melt_infiles $filters \ ${webm:+${use_melt_vp8:+-consumer avformat:$stem.webm $_melt_webm \ pass=1 passlogfile=${stem}_vp8}} \ ${webm_vp9:+${use_melt_vp9:+-consumer avformat:${stem}_vp9.webm $_melt_webm_vp9 \ pass=1 passlogfile=${stem}_vp9}} \ ${mp4:+${use_melt_avc:+-consumer avformat:$stem.mp4 $_melt_mp4 \ pass=1 passlogfile=${stem}_avc}} \ + ${use_any_nomelt_video:+$_melt_stdout} \ | pee \ ${any_ffmpeg:+"$(render ffmpeg-chained-echo $_ffmpeg_stdin \ ${webm:+${use_ffmpeg_vp8:+$_ffmpeg_rawvideo $_ffmpeg_vp8 -an \ @@ -782,7 +784,7 @@ render melt $_melt_infiles \ $_melt_wav}} \ ${channels:+${use_matroska:+-consumer avformat:$stem.mkv \ $_melt_matroska_pcm}} \ - $_melt_stdout \ + ${use_any_nomelt_video:+$_melt_stdout} \ | pee \ ${any_ffmpeg:+"$(render ffmpeg-chained-echo $_ffmpeg_stdin \ ${webm:+${use_ffmpeg_vp8:+$_ffmpeg_webm_onlyvideo \ |