I am working on screen sharing related project, and the only problem i encounter there is the need to display a screen shared from a PC or a Mac (Chromium browser, in fact an Electron app), on a Raspberry PI (i am using model 3 B, the most modern one). In my experiments, the project is just beginning, i am using RTCMultiConnection to share screen and watch it.
Problem is, it is uselessly slow (2-3 fps, sometimes with a 10 second delay) even with full HW acceleration enabled in Chromium which displays it, and i perfectly understand why: because it uses VP9 codec, for which no HW acceleration exists on Raspberry.
Question is: can i use H264 in RTCMultiConnection? If yes, how? I know WebRTC itself basically supports it.
Add following code in your HTML demo file:
Go to "dev" directory and open this file: dev/CodecsHandler.js#L5-L30 line 5 to 30.
Make sure that VP8 and VP9 line sare correct.
Maybe VP8 is 96 and VP9 is 98. So replace
rtpmap
accordingly. E.g.Make sure to test only using Firefox. I donno if Chrome stable channel also supports H264.
Fireox may require some flags. You can search
h264
flags onabout:config
Make sure to link
dev/CodecsHandler.js
in your HTML demo file, quickly afterdist/RTCMultiConnection.min.js
.