From 503649a6da92dfb022faeb570e9f0ce10861b1cf Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 10 Oct 2020 14:19:42 +0200 Subject: [PATCH] Use FFMPEG settings that are recommended by pion, better performances, see #3 --- stream/webrtc/ingest.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stream/webrtc/ingest.go b/stream/webrtc/ingest.go index 840879d..3f43ef0 100644 --- a/stream/webrtc/ingest.go +++ b/stream/webrtc/ingest.go @@ -46,9 +46,9 @@ func ingestFrom(inputChannel chan srt.Packet) { }() ffmpeg = exec.Command("ffmpeg", "-hide_banner", "-loglevel", "error", "-re", "-i", "pipe:0", - "-an", "-vcodec", "libvpx", //"-cpu-used", "5", "-deadline", "1", "-g", "10", "-error-resilient", "1", "-auto-alt-ref", "1", + "-an", "-vcodec", "libvpx", "-cpu-used", "5", "-deadline", "1", "-g", "10", "-error-resilient", "1", "-auto-alt-ref", "1", "-f", "rtp", "rtp://127.0.0.1:5004", - "-vn", "-acodec", "libopus", //"-cpu-used", "5", "-deadline", "1", "-g", "10", "-error-resilient", "1", "-auto-alt-ref", "1", + "-vn", "-acodec", "libopus", "-cpu-used", "5", "-deadline", "1", "-g", "10", "-error-resilient", "1", "-auto-alt-ref", "1", "-f", "rtp", "rtp://127.0.0.1:5005") input, err := ffmpeg.StdinPipe()