1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 20:52:20 +00:00

Don't use -re ffmpeg option: the video speed is already cadenced by the streamer. Fix #16

This commit is contained in:
Yohann D'ANELLO 2020-10-13 10:46:04 +02:00
parent 3ce82c5d61
commit 770862cb7d

View File

@ -25,7 +25,6 @@ func ingestFrom(inputChannel chan srt.Packet) {
for { for {
var err error = nil var err error = nil
srtPacket := <-inputChannel srtPacket := <-inputChannel
log.Println(len(inputChannel))
switch srtPacket.PacketType { switch srtPacket.PacketType {
case "register": case "register":
go registerStream(&srtPacket) 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 "-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", "-qmin", "10", "-qmax", "42", "-threads", "4", "-deadline", "1", "-error-resilient", "1",
"-auto-alt-ref", "1", "-auto-alt-ref", "1",