Skip to content

Commit

Permalink
experiment with a few default changes on the stream
Browse files Browse the repository at this point in the history
  • Loading branch information
JeDaYoshi committed Oct 16, 2024
1 parent eef0656 commit 602a5c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ VIDEO_WIDTH=1366
# The height of the video stream in px
VIDEO_HEIGHT=768
# The bitrate of the video stream in bits
VIDEO_BITRATE=3000000
VIDEO_BITRATE=4200000
# The Frames Per Second of the video stream (the lower it is, the higher performance is)
VIDEO_FPS=30
# The bitrate of the audio stream in bits
Expand Down
12 changes: 4 additions & 8 deletions src/browser/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,8 @@ export const janusStream = (env: NodeJS.ProcessEnv, videoPort: number, videoRtcp
ChildProcess => spawn('gst-launch-1.0', [
'-v',
'rtpbin', 'name=rtpbin', 'rtp-profile=avpf',
// use-damage=true uses too much CPU, use-damage=false stutters (when not 30/60 FPS)
// https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/809
// hi Amby, and thanks for your work at Hyperbeam :)
'ximagesrc', 'show-pointer=true', 'use-damage=true',
'!', `video/x-raw,framerate=${fps}/1`, '!', 'videoconvertscale',
'!', 'videoconvert', '!', 'videorate', '!', `video/x-raw,framerate=${fps}/1`,
'!', 'queue',
'!', 'vp8enc',
'deadline=1',
Expand All @@ -90,15 +87,14 @@ export const janusStream = (env: NodeJS.ProcessEnv, videoPort: number, videoRtcp
'token-partitions=4',
`keyframe-max-dist=${Number(fps)*2}`, // adjust once we add keyframe requests
'min-quantizer=0',
'max-quantizer=56',
'undershoot=95',
'max-quantizer=50',
'static-threshold=0',
'!', 'rtpvp8pay', 'pt=100', 'mtu=1204',
'!', 'rtpbin.send_rtp_sink_0',
'rtpbin.send_rtp_src_0', '!', 'udpsink', `host=${streamingIp}`, `port=${videoPort}`,
'rtpbin.send_rtcp_src_0', '!', 'udpsink', `host=${streamingIp}`, `port=${videoRtcpPort}`, 'sync=false', 'async=false',
'pulsesrc',
'!', 'audioresample',
'!', 'audio/x-raw,channels=2,rate=48000',
'!', 'audioconvert', '!', 'audioresample', '!', 'audio/x-raw,channels=2,rate=48000',
'!', 'queue',
'!', 'opusenc',
'audio-type=restricted-lowdelay',
Expand Down

0 comments on commit 602a5c0

Please sign in to comment.