Refer this commit, which contains the web demo to capture screen as video stream through RTC.
Copy the trunk/research/players/whip.html and trunk/research/players/js/srs.sdk.js to replace the develop branch source code.
./configure && make
./objs/srs -c conf/rtc2rtmp.conf
open http://localhost:8080/players/whip.html?schema=http
check Screen radio option.
click publish, then check the screen to share.
play the rtmp live stream: rtmp://localhost/live/livestream
check the video stuttering.
Cause
When capture screen by the chrome web browser, which send RTP packet with empty payload frequently, then all the cached RTP packets are dropped before next key frame arrive in this case.
The OBS screen stream and camera stream do not have such problem.
How to reproduce?
trunk/research/players/whip.html
andtrunk/research/players/js/srs.sdk.js
to replace thedevelop
branch source code../configure && make
./objs/srs -c conf/rtc2rtmp.conf
http://localhost:8080/players/whip.html?schema=http
Screen
radio option.publish
, then check the screen to share.rtmp://localhost/live/livestream
Cause
When capture screen by the chrome web browser, which send RTP packet with empty payload frequently, then all the cached RTP packets are dropped before next key frame arrive in this case.
The OBS screen stream and camera stream do not have such problem.
Add screen stream to WHIP demo