summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/capture+encode+serve4
-rwxr-xr-xbin/decode+edit+encode4
-rwxr-xr-xbin/decode+edit+loop+encode+stream4
-rwxr-xr-xbin/encodevideo+loop+stream4
-rwxr-xr-xbin/loop+encode+stream4
-rwxr-xr-xbin/stream4
6 files changed, 12 insertions, 12 deletions
diff --git a/bin/capture+encode+serve b/bin/capture+encode+serve
index 29688f1..ad97c24 100755
--- a/bin/capture+encode+serve
+++ b/bin/capture+encode+serve
@@ -48,7 +48,7 @@ my $FRAMERATE = 25;
my $AUDIORATE = 48000;
# TODO: Vary vpx quality based on height
-my $SPEED_VPX = 15;
+my $SPEED_VP8 = 15;
# inspired by Apple HLS recommendations
# TODO: Externalize to site-specific configfile
@@ -115,7 +115,7 @@ my %PIPELINE = (
},
VP8 => {
VENC => [
- "vp8enc threads=4 cpu-used=$SPEED_VPX deadline=1000000 end-usage=1 target-bitrate=$VBITRATE undershoot=95 keyframe-max-dist=999999 max-quantizer=56 deadline=5000 static-threshold=500",
+ "vp8enc threads=4 cpu-used=$SPEED_VP8 deadline=1000000 end-usage=1 target-bitrate=$VBITRATE undershoot=95 keyframe-max-dist=999999 max-quantizer=56 deadline=5000 static-threshold=500",
'video/x-vp8',
$QUEUE,
'rtpvp8pay',
diff --git a/bin/decode+edit+encode b/bin/decode+edit+encode
index 73f4a68..96b7081 100755
--- a/bin/decode+edit+encode
+++ b/bin/decode+edit+encode
@@ -11,7 +11,7 @@ OUTPUT=../tmp/omni/show0/earth.webm
HEIGHT=360
# TODO: Vary vpx quality based on height
-SPEED_VPX=4
+SPEED_VP8=4
# inspired by Apple HLS recommendations
if [ $HEIGHT -le 234 ]; then VBITRATE=145000;
@@ -36,7 +36,7 @@ ffmpeg -hide_banner -threads auto -y -re \
[bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20[v]" \
-map '[v]' \
-pix_fmt yuv420p \
- -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VPX" \
+ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VP8" \
-b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \
-undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \
-max-intra-rate 0 \
diff --git a/bin/decode+edit+loop+encode+stream b/bin/decode+edit+loop+encode+stream
index a620eb1..d0888fb 100755
--- a/bin/decode+edit+loop+encode+stream
+++ b/bin/decode+edit+loop+encode+stream
@@ -22,7 +22,7 @@ ITERATIONS=${3-0} # endless by default
HEIGHT=360
# TODO: Vary vpx quality based on height
-SPEED_VPX=15
+SPEED_VP8=15
# inspired by Apple HLS recommendations
if [ $HEIGHT -le 234 ]; then VBITRATE=145000;
@@ -47,7 +47,7 @@ ffmpeg -hide_banner -threads auto -re \
[bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20[v]" \
-map '[v]' \
-pix_fmt yuv420p \
- -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VPX" \
+ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VP8" \
-b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \
-undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \
-max-intra-rate 0 \
diff --git a/bin/encodevideo+loop+stream b/bin/encodevideo+loop+stream
index a8a5f76..b0c5c4c 100755
--- a/bin/encodevideo+loop+stream
+++ b/bin/encodevideo+loop+stream
@@ -17,7 +17,7 @@ FIRSTPORT=${2:-5002} # even number - next 3 ports used too
HEIGHT=360
# TODO: Vary vpx quality based on height
-SPEED_VPX=15
+SPEED_VP8=15
# inspired by Apple HLS recommendations
if [ $HEIGHT -le 234 ]; then VBITRATE=145000;
@@ -35,7 +35,7 @@ ffmpeg -hide_banner -threads auto -re \
-stream_loop -1 -i "$INPUT" \
-map '0:v' \
-pix_fmt yuv420p \
- -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VPX" \
+ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VP8" \
-b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \
-undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \
-max-intra-rate 0 \
diff --git a/bin/loop+encode+stream b/bin/loop+encode+stream
index 567ca82..4151789 100755
--- a/bin/loop+encode+stream
+++ b/bin/loop+encode+stream
@@ -23,7 +23,7 @@ ABITRATE_OPUS=48000
HEIGHT=360
# TODO: Vary vpx quality based on height
-SPEED_VPX=15
+SPEED_VP8=15
# inspired by Apple HLS recommendations
if [ $HEIGHT -le 234 ]; then VBITRATE=145000;
@@ -44,7 +44,7 @@ ffmpeg -hide_banner -threads auto -re \
-f rtp -payload_type 111 "rtp://$IP:$FIRSTPORT?pkt_size=1200" \
-map '0:v' \
-pix_fmt yuv420p \
- -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VPX" \
+ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VP8" \
-b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \
-undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \
-max-intra-rate 0 \
diff --git a/bin/stream b/bin/stream
index 48b4c92..a326003 100755
--- a/bin/stream
+++ b/bin/stream
@@ -89,7 +89,7 @@ HEIGHTS_WEBM="$HEIGHT"
HEIGHTS_MPEG="$HEIGHT"
# TODO: Vary vpx quality based on height
-SPEED_VPX=15
+SPEED_VP8=15
# inspired by Apple HLS recommendations
# TODO: Externalize to site-specific configfile
@@ -183,7 +183,7 @@ ffmpeg -hide_banner -threads auto \
-codec:a libopus -ac "$ACHANNELS" -ar "$AFRAMERATE_OPUS" -b:a "$ABITRATE_OPUS" } \
${HASVIDEO:+\
-pix_fmt yuv420p \
- -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VPX" \
+ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VP8" \
-b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \
-undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \
-max-intra-rate 0 \