open file correctly

This commit is contained in:
zuckerberg 2021-09-06 17:12:09 -04:00
parent d5eca0a039
commit 636fd12b5f

View File

@ -15,7 +15,7 @@ class Transcoder(StreamSource):
if os.path.exists(fifoFile): if os.path.exists(fifoFile):
os.remove(fifoFile) os.remove(fifoFile)
os.mkfifo(fifoFile) os.mkfifo(fifoFile)
self.file = open(fifoFile, 'a') self.file = open(fifoFile, 'w+b')
self.process = ( ffmpeg self.process = ( ffmpeg
.input(fifoFile) .input(fifoFile)
.output('pipe:', format='mp3') .output('pipe:', format='mp3')