stream.ffmpegmux: fix support for avconv, avconv will be used if ffmpeg is not found

This commit is contained in:
beardypig 2017-01-12 12:36:30 +00:00
parent 6cce32a58d
commit 8aee9d4c80
2 changed files with 5 additions and 3 deletions

View File

@ -60,7 +60,7 @@ class Streamlink(object):
"stream-timeout": 60.0,
"subprocess-errorlog": False,
"subprocess-errorlog-path": None,
"ffmpeg-ffmpeg": is_win32 and "ffmpeg.exe" or "ffmpeg",
"ffmpeg-ffmpeg": None,
"ffmpeg-video-transcode": "copy",
"ffmpeg-audio-transcode": "copy"
})

View File

@ -36,7 +36,7 @@ class MuxedStream(Stream):
class FFMPEGMuxer(object):
__commands__ = ['ffmpeg', 'avconv']
__commands__ = ['ffmpeg', 'ffmpeg.exe', 'avconv', 'avconv.exe']
@staticmethod
def copy_to_pipe(self, stream, pipe):
@ -107,7 +107,9 @@ class FFMPEGMuxer(object):
@classmethod
def command(cls, session):
command = [session.options.get("ffmpeg-ffmpeg")]
command = []
if session.options.get("ffmpeg-ffmpeg"):
command.append(session.options.get("ffmpeg-ffmpeg"))
for cmd in command or cls.__commands__:
try:
pbs.create_command(cmd)