-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathffmpegplayer.py
More file actions
31 lines (25 loc) · 854 Bytes
/
ffmpegplayer.py
File metadata and controls
31 lines (25 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
from videoplayer import VideoPlayerProcess
class FFmpegPlayer(VideoPlayerProcess):
def __init__(self, settings = None):
super().__init__(settings)
def get_arguments(self):
args = [self.get_command()]
args.append('-fs') # Fullscreen
args.append('-an') # Disable audio
args.append('-sn') # Disable subtitles
args.append('-noborder') # Borderless window
args.append('-exitonkeydown')
args.extend(['-loop', '0']) # Loop forever
args.extend(['-loglevel', 'quiet']) # Disable verbose output
args.append(self.path)
return args
@staticmethod
def get_name():
return 'FFmpeg'
@staticmethod
def get_extensions():
return ['avi', 'mov', 'mkv', 'mp4', 'm4v']
@staticmethod
def get_command():
return 'ffplay'