Skip to content

Commit 602a5c0

Browse files
committed
experiment with a few default changes on the stream
1 parent eef0656 commit 602a5c0

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ VIDEO_WIDTH=1366
1111
# The height of the video stream in px
1212
VIDEO_HEIGHT=768
1313
# The bitrate of the video stream in bits
14-
VIDEO_BITRATE=3000000
14+
VIDEO_BITRATE=4200000
1515
# The Frames Per Second of the video stream (the lower it is, the higher performance is)
1616
VIDEO_FPS=30
1717
# The bitrate of the audio stream in bits

src/browser/utils.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,8 @@ export const janusStream = (env: NodeJS.ProcessEnv, videoPort: number, videoRtcp
7474
ChildProcess => spawn('gst-launch-1.0', [
7575
'-v',
7676
'rtpbin', 'name=rtpbin', 'rtp-profile=avpf',
77-
// use-damage=true uses too much CPU, use-damage=false stutters (when not 30/60 FPS)
78-
// https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/809
79-
// hi Amby, and thanks for your work at Hyperbeam :)
8077
'ximagesrc', 'show-pointer=true', 'use-damage=true',
81-
'!', `video/x-raw,framerate=${fps}/1`, '!', 'videoconvertscale',
78+
'!', 'videoconvert', '!', 'videorate', '!', `video/x-raw,framerate=${fps}/1`,
8279
'!', 'queue',
8380
'!', 'vp8enc',
8481
'deadline=1',
@@ -90,15 +87,14 @@ export const janusStream = (env: NodeJS.ProcessEnv, videoPort: number, videoRtcp
9087
'token-partitions=4',
9188
`keyframe-max-dist=${Number(fps)*2}`, // adjust once we add keyframe requests
9289
'min-quantizer=0',
93-
'max-quantizer=56',
94-
'undershoot=95',
90+
'max-quantizer=50',
91+
'static-threshold=0',
9592
'!', 'rtpvp8pay', 'pt=100', 'mtu=1204',
9693
'!', 'rtpbin.send_rtp_sink_0',
9794
'rtpbin.send_rtp_src_0', '!', 'udpsink', `host=${streamingIp}`, `port=${videoPort}`,
9895
'rtpbin.send_rtcp_src_0', '!', 'udpsink', `host=${streamingIp}`, `port=${videoRtcpPort}`, 'sync=false', 'async=false',
9996
'pulsesrc',
100-
'!', 'audioresample',
101-
'!', 'audio/x-raw,channels=2,rate=48000',
97+
'!', 'audioconvert', '!', 'audioresample', '!', 'audio/x-raw,channels=2,rate=48000',
10298
'!', 'queue',
10399
'!', 'opusenc',
104100
'audio-type=restricted-lowdelay',

0 commit comments

Comments
 (0)