opus test

This commit is contained in:
zuckerberg 2021-09-06 14:01:36 -04:00
parent ec016a2186
commit d83b55799e
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ class Transcoder(StreamSource):
def __init__(self, upstream): def __init__(self, upstream):
self.process = ( ffmpeg self.process = ( ffmpeg
.input('pipe:') .input('pipe:')
.output('pipe:', format='mp3') .output('pipe:', format='opus', **{'b:a': 96000})
.run_async(pipe_stdin=True, pipe_stdout=True, pipe_stderr=True) .run_async(pipe_stdin=True, pipe_stdout=True, pipe_stderr=True)
) )
logger.add(self.process.stderr, "transcoder.log") logger.add(self.process.stderr, "transcoder.log")

View File

@ -14,7 +14,7 @@ class Uploader(object):
def connect(self): def connect(self):
self.process = ( ffmpeg self.process = ( ffmpeg
.input('pipe:', re=None) .input('pipe:', re=None)
.output("icecast://source:hackme@" + self.host + "/" + self.stream, format='mp3', content_type="audio/mpeg") .output("icecast://source:hackme@" + self.host + "/" + self.stream, format='opus', content_type="audio/ogg")
.run_async(pipe_stdin=True, pipe_stderr=True) .run_async(pipe_stdin=True, pipe_stderr=True)
) )
logger.add(self.process.stderr, "uploader.log") logger.add(self.process.stderr, "uploader.log")