summaryrefslogtreecommitdiff
path: root/localvideowebencode
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2021-02-07 18:39:25 +0100
committerJonas Smedegaard <dr@jones.dk>2021-02-07 19:33:14 +0100
commit2df634eb1c2b279d27b72ef2218ba30ab7f10e4b (patch)
treec16c43cb951c02c0dd6a6e323ee304b79f7afc18 /localvideowebencode
parent8b14f381f36e45a8d661ab145b80b071b251064b (diff)
docs: talk about formats (not codecs) where appropriate, and clarify formats H.264/AVC and AAC-LC
Diffstat (limited to 'localvideowebencode')
-rwxr-xr-xlocalvideowebencode32
1 files 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="<source src=\"$stem.mp4\" type=\"video/mp4\" />"
_object_flash="<object$__width$__heightplus type=\"application/x-shockwave-flash\" data=\"$flashplayer.swf\">"
_param_name="<param name=\"movie\" value=\"$flashplayer.swf\" />"
_param_flashvars="<param name=\"flashvars\" value=\"image=$stem.jpg&amp;file=$stem.mp4\" />"
-__oggfile=${ogg:+open format <a href=\"$stem.ogv\">Ogg</a>}
-__webmfile=${webm:+open format <a href=\"$stem.webm\">WebM (VP8)</a>}
-__vp9file=${vp9:+open format <a href=\"${stem}_vp9.webm\">WebM (VP9/Opus)</a>}
-__mp4file=${mp4:+closed format <a href=\"$stem.mp4\">MPEG-4</a>}
+__oggfile=${ogg:+open format <a href=\"$stem.ogv\">Ogg/Thera</a>}
+__webmfile=${webm:+open format <a href=\"$stem.webm\">WebM/VP8</a>}
+__vp9file=${vp9:+open format <a href=\"${stem}_vp9.webm\">WebM/VP9</a>}
+__mp4file=${mp4:+closed format <a href=\"$stem.mp4\">MPEG-4/AVC</a>}
cat >"$stem.html" <<EOF
<!-- Video for Everybody, Kroc Camen of Camen Design -->