1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-28 01:12:19 +02:00

Interact with telnet to select the stream id

This commit is contained in:
Yohann D'ANELLO
2020-10-13 00:52:08 +02:00
parent 95fcedf2fa
commit 727865f444
2 changed files with 59 additions and 16 deletions

View File

@ -73,6 +73,15 @@ func ingestFrom(inputChannel chan srt.Packet) {
panic(err)
}
// Receive raw video output and convert it to ASCII art, then forward it TCP
if telnet.Cfg.Enabled {
output, err := ffmpeg.StdoutPipe()
if err != nil {
panic(err)
}
go telnet.ServeAsciiArt(srtPacket.StreamName, output)
}
if err := ffmpeg.Start(); err != nil {
panic(err)
}
@ -109,15 +118,6 @@ func ingestFrom(inputChannel chan srt.Packet) {
}
}()
// Receive raw video output and convert it to ASCII art, then forward it TCP
if telnet.Cfg.Enabled {
output, err := ffmpeg.StdoutPipe()
if err != nil {
panic(err)
}
go telnet.ServeAsciiArt(output)
}
// Receive audio
go func() {
for {