From 770862cb7d3408aa9ce0007a505f788d2554e616 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 13 Oct 2020 10:46:04 +0200 Subject: [PATCH] Don't use -re ffmpeg option: the video speed is already cadenced by the streamer. Fix #16 --- stream/webrtc/ingest.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stream/webrtc/ingest.go b/stream/webrtc/ingest.go index 51e0112..0c4f9bb 100644 --- a/stream/webrtc/ingest.go +++ b/stream/webrtc/ingest.go @@ -25,7 +25,6 @@ func ingestFrom(inputChannel chan srt.Packet) { for { var err error = nil srtPacket := <-inputChannel - log.Println(len(inputChannel)) switch srtPacket.PacketType { case "register": go registerStream(&srtPacket) @@ -80,7 +79,7 @@ func registerStream(srtPacket *srt.Packet) { } }() */ - ffmpegArgs := []string{"-re", "-i", "pipe:0", + ffmpegArgs := []string{"-hide_banner", "-loglevel", "error", "-i", "pipe:0", "-an", "-vcodec", "libvpx", "-crf", "10", "-cpu-used", "5", "-b:v", "6000k", "-maxrate", "8000k", "-bufsize", "12000k", // TODO Change bitrate when changing quality "-qmin", "10", "-qmax", "42", "-threads", "4", "-deadline", "1", "-error-resilient", "1", "-auto-alt-ref", "1",