Multi-DJ livestream toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

32 lines
929 B

from ..filters import FFmpegInput, FFmpegChain, FFmpegFilter
from .base import OBSSource
@OBSSource.type('image_source')
class ImageSource(OBSSource):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.infile = None
def load(self, data):
self.infile = data['settings']['file']
def to_ffmpeg(self, scene):
return [FFmpegChain(inputs=[FFmpegInput(self.infile)])]
@OBSSource.type('ffmpeg_source')
class FFmpegSource(OBSSource):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.infile = None
self.loop = False
def load(self, data):
self.infile = data['settings']['local_file']
self.loop = data['settings']['looping']
def to_ffmpeg(self, scene):
return [FFmpegChain(
FFmpegFilter('realtime'),
inputs=[FFmpegInput(self.infile, re=None)]
)]