diff options
Diffstat (limited to 'bin/capture+encode+serve')
-rwxr-xr-x | bin/capture+encode+serve | 7 |
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', |