def _spawn_ffmpeg(self):
if self.streaming:
url = self._stream_url
elif self.playing:
url = self._song_context.song_url
else:
raise RuntimeError('Player is in an invalid state')
args = shlex.split(self._ffmpeg_command.format(shlex.quote(url)))
try:
self._ffmpeg = subprocess.Popen(args)
except FileNotFoundError as e:
raise RuntimeError('ffmpeg executable was not found') from e
except subprocess.SubprocessError as e:
raise RuntimeError('Popen failed: {0.__name__} {1}'.format(type(e), str(e))) from e
#
# Player FSM
#
评论列表
文章目录