summaryrefslogtreecommitdiff
path: root/bin/capture+encode+serve
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-05-16 14:11:52 +0200
committerJonas Smedegaard <dr@jones.dk>2017-05-16 14:12:24 +0200
commit5919275dde112187c5aeedeb7b4a76de8a7eb3dd (patch)
treeff0ab343c2ea65adfd5bb585ae2d6f09e6349e49 /bin/capture+encode+serve
parent3fe329a251c3b2dae13d3cc9663da231f5f49db4 (diff)
Introduce variables SPEED_VPX SPEED_H264.
Diffstat (limited to 'bin/capture+encode+serve')
-rwxr-xr-xbin/capture+encode+serve7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/capture+encode+serve b/bin/capture+encode+serve
index 83af18c..e87310f 100755
--- a/bin/capture+encode+serve
+++ b/bin/capture+encode+serve
@@ -47,6 +47,9 @@ my $HEIGHT = 240;
my $FRAMERATE = 25;
my $AUDIORATE = 48000;
+my $SPEED_VPX = 15;
+my $SPEED_X264 = 'ultrafast';
+
my $VBITRATE;
# inspired by Apple HLS recommendations
@@ -75,7 +78,7 @@ my %PIPELINE = (
# * let x264 use low-latency sliced-threads (i.e. don't disable treads)
VENC => [
- "x264enc speed-preset=ultrafast tune=zerolatency bitrate=800 byte-stream=true key-int-max=15 intra-refresh=true option-string=\"slice-max-size=8192:vbv-maxrate=80:vbv-bufsize=10\"",
+ "x264enc speed-preset=$SPEED_H264 tune=zerolatency bitrate=800 byte-stream=true key-int-max=15 intra-refresh=true option-string=\"slice-max-size=8192:vbv-maxrate=80:vbv-bufsize=10\"",
'video/x-h264,profile=baseline',
$QUEUE,
'rtph264pay',
@@ -86,7 +89,7 @@ my %PIPELINE = (
},
VP8 => {
VENC => [
- "vp8enc threads=4 cpu-used=15 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_VPX 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',