Merge branch 'master' into dev

This commit is contained in:
jb-alvarado 2019-06-10 11:18:25 +02:00
commit 0286f94c2a
3 changed files with 12 additions and 12 deletions

View File

@ -3,8 +3,6 @@
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
This is a playout application based on python and ffmpeg.
The purpose with ffplayout is to provide a 24/7 broadcasting solution that plays a *json* playlist for every day, while keeping the current playlist editable.
#### Check [ffplayout-gui](https://github.com/ffplayout/ffplayout-gui): web-based GUI for ffplayout.
@ -15,7 +13,7 @@ Features
- have all values in a separate config file
- dynamic playlist
- replace missing playlist or clip with a dummy clip
- playing clips from watched folder
- playing clips from [watched folder](https://github.com/ffplayout/ffplayout-engine/wiki/Watch-Folder)
- send emails with error message
- overlay a logo
- trim and fade the last clip, to get full 24 hours, if the duration is less then 6 seconds add a dummy clip
@ -34,7 +32,7 @@ Features
Requirements
-----
- python version 3.5+
- python module **watchdog**
- python module **watchdog** (onyl when `playlist_mode = False`)
- **ffmpeg** and **ffprobe** (**ffplay** if you want to play on desktop)
- RAM and CPU depends on video resolution, minimum 4 threads and 3GB RAM for 720p are recommend

View File

@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
# set playlist_mode to false if you want to play clips from the [FOLDER] section
# set playlist_mode to False if you want to play clips from the [FOLDER] section
# sometimes it can happen, that a file is corrupt but still playable,
# this can produce an streaming error over all following files

View File

@ -41,9 +41,6 @@ from subprocess import PIPE, CalledProcessError, Popen, check_output
from threading import Thread
from types import SimpleNamespace
from watchdog.events import PatternMatchingEventHandler
from watchdog.observers import Observer
# ------------------------------------------------------------------------------
# read variables from config file
# ------------------------------------------------------------------------------
@ -667,19 +664,19 @@ class MediaWatcher:
self._media.add(event.src_path)
print('Add file to media list: "{}"'.format(event.src_path))
logger.info('Add file to media list: "{}"'.format(event.src_path))
def on_moved(self, event):
self._media.remove(event.src_path)
self._media.add(event.dest_path)
print('Moved file from "{}" to "{}"'.format(event.src_path,
logger.info('Move file from "{}" to "{}"'.format(event.src_path,
event.dest_path))
def on_deleted(self, event):
self._media.remove(event.src_path)
print('Removed file from media list: "{}"'.format(event.src_path))
logger.info('Remove file from media list: "{}"'.format(event.src_path))
def stop(self):
self.observer.stop()
@ -1080,6 +1077,7 @@ def main():
watcher = None
get_source = GetSourceIter(encoder)
else:
logger.info("start folder mode")
media = MediaStore(_folder.extensions)
media.fill(_folder.storage)
@ -1118,4 +1116,8 @@ def main():
if __name__ == '__main__':
if not _general.playlist_mode:
from watchdog.events import PatternMatchingEventHandler
from watchdog.observers import Observer
main()