Skip to content

Instantly share code, notes, and snippets.

🙈
Lexi is the love of my life, I love her more than she loves me

Sean DuBois Sean-Der

🙈
Lexi is the love of my life, I love her more than she loves me
Block or report user

Report or block Sean-Der

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f274fbf866872ede587d6f43415e3c3f
Dear colleagues,
A friend of mine just did a three-hour first-year lecture over my unnamed
SFU with 12 students. The students didn't switch on their camera (except
during the break), the lecturer was streaming three flows: audio, video,
and lecture slides.
The total amount of network traffic oscillated between 4Mbps and 10Mbps
(380kps to 800kbps for each receiver), which indicates that the congestion
control algorithm is working as designed. The CPU load oscillated between
View gist:900f448e7d1a292fce52c5d1cca60119
diff --git a/examples/viewer.js b/examples/viewer.js
index 508a795..43156d4 100644
--- a/examples/viewer.js
+++ b/examples/viewer.js
@@ -167,6 +167,8 @@ async function startViewer(localView, remoteView, formValues, onStatsReport, onR
} else {
console.log('[VIEWER] All ICE candidates have been generated');
+ console.log(viewer.peerConnection.localDescription);
+
View gist:04d2766ec9923b66903e8f25dedcb19b
diff --git a/camera.go b/camera.go
index 634944f..f42cd84 100644
--- a/camera.go
+++ b/camera.go
@@ -23,7 +23,7 @@ type Camera struct {
}
func (c *Camera) Stream(videoTrack *webrtc.Track) error {
- cmd := exec.Command("ffmpeg", "-framerate", "30", "-f", "v4l2", "-input_format", "h264", "-video_size", fmt.Sprintf("%vx%v", c.Width, c.Height), "-i", c.DevicePath, "-c", "copy", "-f", "h264", "pipe:1")
+ cmd := exec.Command("ffmpeg", "-framerate", "30", "-f", "v4l2", "-video_size", fmt.Sprintf("%vx%v", c.Width, c.Height), "-i", "/dev/video0", "-f", "h264", "-preset", "fast", "-profile:v", "baseline", "-pix_fmt", "yuv420p", "-tune", "zerolatency", "pipe:1")
View demo.js
/* eslint-env browser */
let pc = new RTCPeerConnection({
iceServers: [
{
urls: "stun:stun.l.google.com:19302"
}
]
});
let log = msg => {
View main.go
package main
import (
"fmt"
"time"
"github.com/pion/webrtc/v2"
"github.com/pion/webrtc/v2/examples/internal/signal"
)
View gist:14972d662ef8b2d105c440505171dda5
package main
import (
"fmt"
"time"
"github.com/pion/webrtc/v2"
"github.com/pion/webrtc/v2/examples/internal/signal"
)
@Sean-Der
Sean-Der / croc.diff
Created Nov 11, 2019
Pion DataChannel Bug + Croc
View croc.diff
diff --git a/src/webrtc/wasm/main.go b/src/webrtc/wasm/main.go
index 6048392..9b4eb6d 100644
--- a/src/webrtc/wasm/main.go
+++ b/src/webrtc/wasm/main.go
@@ -50,9 +50,11 @@ func createOfferer() (pc *webrtc.PeerConnection, err error) {
ordered := false
maxRetransmits := uint16(0)
+ var id uint16 = 5
options := &webrtc.DataChannelInit{
@Sean-Der
Sean-Der / main.go
Created Nov 11, 2019
Working Server + WASM Pion
View main.go
package main
import (
"fmt"
"github.com/pion/webrtc/v2"
)
func main() {
// Create two PeerConnections
View gist:fdf3458b0a322ad4a32d9e0c9d29adfb
package main
import (
"fmt"
"github.com/pion/webrtc/v2"
)
func main() {
// Create two PeerConnections
View dtls.diff
diff --git a/conn.go b/conn.go
index bf5a88e..33c805a 100644
--- a/conn.go
+++ b/conn.go
@@ -500,6 +500,7 @@ func (c *Conn) handleIncomingPacket(buf []byte) (*alert, error) {
}
if h.epoch < c.getRemoteEpoch() {
+ c.log.Debugf("retransmitting, got message from old epoch: %v %v", h.epoch, c.getRemoteEpoch())
if _, alertPtr, err := c.flightHandler(c); err != nil {
You can’t perform that action at this time.