From 2df634eb1c2b279d27b72ef2218ba30ab7f10e4b Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 7 Feb 2021 18:39:25 +0100 Subject: docs: talk about formats (not codecs) where appropriate, and clarify formats H.264/AVC and AAC-LC --- localvideowebencode | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/localvideowebencode b/localvideowebencode index 1afa68b..1a32f94 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -84,12 +84,12 @@ html favoring open formats with optional non-JavaScript Flash fallback. (default: use input framerate) --refbpp Bitrate reference: Bits-per-pixel for 360p30 H.264 (default: 0.12) - --formats Containers and codecs to use, comma-separated: - [container] [video codec] [audio codec] - theora ogg Ogg Theora Vorbis - vp8 webm WebM VP8 Vorbis - vp9 WebM VP9 Opus - h264 mp4 MPEG-4 H.264 AAC + --formats Container and media formats to use, comma-separated: + [container] [video] [audio] + theora ogg Ogg Theora Vorbis + vp8 webm WebM VP8 Vorbis + vp9 WebM VP9 Opus + h264 mp4 MPEG-4 H.264/AVC AAC-LC (default: webm,vp9,mp4) --audio Audio style: [channels] [bitrate per channel] @@ -618,7 +618,7 @@ _opusenc_downmix="${downmix_opusenc:+${stereo:+--downmix-stereo}${mono:+--downmi # limit (i.e. avoid peaks "clipping") _melt_postfilters_audio="${limit:+-filter ladspa.1077}" -# codec bitrate options +# format bitrate options _melt_bitrate_vp8="${do_bitrate_vp8:+ vb=$bitrate_vp8} minrate=$((bitrate_vp8/20)) maxrate=$((bitrate_vp8*12))" _ffmpeg_bitrate_vp8="${do_bitrate_vp8:+-b:v $bitrate_vp8} -minrate $((bitrate_vp8/20)) -maxrate $((bitrate_vp8*12))" _vpxenc_bitrate_vp8="--target-bitrate=$((bitrate_vp8/1000)) --minsection-pct=5 --maxsection-pct=1200" @@ -626,7 +626,7 @@ _melt_bitrate_vp9="${do_bitrate_vp9:+ vb=$bitrate_vp9} minrate=$((bitrate_vp9/20 _ffmpeg_bitrate_vp9="${do_bitrate_vp9:+-b:v $bitrate_vp9} -minrate $((bitrate_vp9/20)) -maxrate $((bitrate_vp9*12))" _vpxenc_bitrate_vp9="--target-bitrate=$((bitrate_vp9/1000)) --minsection-pct=5 --maxsection-pct=1200" -# codec low-level options +# format low-level options _melt_misc_vp8="qmin=$webm_qmin qmax=$webm_qmax g=120 deadline=good cpu-used=$cpu_vp8${profile_vp8:+ vprofile=$profile_vp8} auto-alt-ref=1 lag-in-frames=$webm_lag arnr-maxframes=7 arnr-strength=5 arnr-type=centered" _ffmpeg_misc_vp8="-qmin $webm_qmin -qmax $webm_qmax -g 120 -deadline good -cpu-used $cpu_vp8${profile_vp8:+ -profile:v $profile_vp8} -auto-alt-ref 1 -lag-in-frames $webm_lag -arnr-maxframes 7 -arnr-strength 5 -arnr-type centered" _vpxenc_misc_vp8="--min-q=$webm_qmin --max-q=$webm_qmax --kf-max-dist=120 --good --cpu-used=$cpu_vp8${profile_vp8:+ --profile=$profile_vp8} --token-parts=$webm_tokenparts_log2 --auto-alt-ref=1 --lag-in-frames=$webm_lag --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3" @@ -634,7 +634,7 @@ _melt_misc_vp9="qmin=$webm_qmin qmax=$webm_qmax g=120 deadline=good cpu-used=$cp _ffmpeg_misc_vp9="-qmin $webm_qmin -qmax $webm_qmax -g 120 -deadline good -cpu-used $cpu_vp9${profile_vp9:+ -profile:v $profile_vp9} -auto-alt-ref 1 -lag-in-frames $webm_lag -arnr-maxframes 7 -arnr-strength 5 -arnr-type centered" _vpxenc_misc_vp9="--min-q=$webm_qmin --max-q=$webm_qmax --kf-max-dist=120 --good --cpu-used=$cpu_vp9${profile_vp9:+ --profile=$profile_vp9} --tile-columns=$webm_tokenparts_log2 --tile-rows=$webm_tokenparts_log2 --auto-alt-ref=1 --lag-in-frames=$webm_lag --arnr-maxframes=7 --arnr-strength=5 --arnr-type=3" -# codec options +# format options # emulate VP8 Constant Quality using "loose" Constrained Quality _melt_theora="vcodec=libtheora${bitrate_theora:+ vb=$bitrate_theora} qscale=$q_theora" _melt_vp8="vcodec=$encoder_vp8${pre_vp8:+ vpreset=$pre_vp8}${preset_vp8:+ preset=$preset_vp8}${do_bitrate_vp8:+ $_melt_bitrate_vp8}${q_vp8:+ ${no_bitrate_vp8:+vb=$((bitrate_vp8*10)) }$qkey_vp8=$q_vp8} $_melt_misc_vp8" @@ -788,7 +788,7 @@ if [ -n "${webm:+$use_vpxenc$use_ffmpeg_vp8$use_oggenc}${vp9:+$use_vpxenc$use_ff fi fi if [ -n "${vp9:+$use_vpxenc$use_ffmpeg_vp9$use_opusenc}" ] && [ -n "$channels" ]; then - echo >&2 "Encoding Opus audio and muxing with WebM/VP9 video..." + echo >&2 "Encoding Opus audio and muxing with VP9 video..." if [ -n "$use_opusenc" ]; then $opusenc $_opusenc_wav_in $_opusenc_opus -o - $stem.wav \ | $ffmpeg_chained \ @@ -803,12 +803,12 @@ if [ -n "${webm:+$use_vpxenc$use_ffmpeg_vp8$use_oggenc}${vp9:+$use_vpxenc$use_ff fi if [ -n "${mp4:+$use_ffmpeg_h264}" ] && [ -n "$channels" ]; then if [ -n "$use_mp3" ]; then - echo "Encoding MP3 audio and muxing with h.264 video..." + echo "Encoding MP3 audio and muxing with H.264/AVC video..." $ffmpeg_alone $_ffmpeg_mp4_in -i ${stem}_silent.mp4 \ $_ffmpeg_matroska_wav_in -i $stem.mkv \ $_ffmpeg_mp4_keepvideo ${stem}.mp4 else - echo "Encoding AAC audio and muxing with h.264 video..." + echo "Encoding AAC audio and muxing with H.264/AVC video..." $ffmpeg_alone $_ffmpeg_mp4_in -i ${stem}_silent.mp4 \ $_ffmpeg_matroska_wav_in -i $stem.mkv \ $_ffmpeg_mp4_keepvideo_aac ${stem}.mp4 @@ -851,10 +851,10 @@ _source_mp4="" _object_flash="" _param_name="" _param_flashvars="" -__oggfile=${ogg:+open format Ogg} -__webmfile=${webm:+open format WebM (VP8)} -__vp9file=${vp9:+open format WebM (VP9/Opus)} -__mp4file=${mp4:+closed format MPEG-4} +__oggfile=${ogg:+open format Ogg/Thera} +__webmfile=${webm:+open format WebM/VP8} +__vp9file=${vp9:+open format WebM/VP9} +__mp4file=${mp4:+closed format MPEG-4/AVC} cat >"$stem.html" < -- cgit v1.2.3