Merge branch 'master' into dev
This commit is contained in:
commit
0286f94c2a
@ -3,8 +3,6 @@
|
|||||||
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
|
[![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)
|
[![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.
|
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.
|
#### 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
|
- have all values in a separate config file
|
||||||
- dynamic playlist
|
- dynamic playlist
|
||||||
- replace missing playlist or clip with a dummy clip
|
- 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
|
- send emails with error message
|
||||||
- overlay a logo
|
- 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
|
- 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
|
Requirements
|
||||||
-----
|
-----
|
||||||
- python version 3.5+
|
- 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)
|
- **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
|
- RAM and CPU depends on video resolution, minimum 4 threads and 3GB RAM for 720p are recommend
|
||||||
|
|
||||||
|
@ -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,
|
# sometimes it can happen, that a file is corrupt but still playable,
|
||||||
# this can produce an streaming error over all following files
|
# this can produce an streaming error over all following files
|
||||||
|
16
ffplayout.py
16
ffplayout.py
@ -41,9 +41,6 @@ from subprocess import PIPE, CalledProcessError, Popen, check_output
|
|||||||
from threading import Thread
|
from threading import Thread
|
||||||
from types import SimpleNamespace
|
from types import SimpleNamespace
|
||||||
|
|
||||||
from watchdog.events import PatternMatchingEventHandler
|
|
||||||
from watchdog.observers import Observer
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# read variables from config file
|
# read variables from config file
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@ -667,19 +664,19 @@ class MediaWatcher:
|
|||||||
|
|
||||||
self._media.add(event.src_path)
|
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):
|
def on_moved(self, event):
|
||||||
self._media.remove(event.src_path)
|
self._media.remove(event.src_path)
|
||||||
self._media.add(event.dest_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))
|
event.dest_path))
|
||||||
|
|
||||||
def on_deleted(self, event):
|
def on_deleted(self, event):
|
||||||
self._media.remove(event.src_path)
|
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):
|
def stop(self):
|
||||||
self.observer.stop()
|
self.observer.stop()
|
||||||
@ -1080,6 +1077,7 @@ def main():
|
|||||||
watcher = None
|
watcher = None
|
||||||
get_source = GetSourceIter(encoder)
|
get_source = GetSourceIter(encoder)
|
||||||
else:
|
else:
|
||||||
|
logger.info("start folder mode")
|
||||||
media = MediaStore(_folder.extensions)
|
media = MediaStore(_folder.extensions)
|
||||||
media.fill(_folder.storage)
|
media.fill(_folder.storage)
|
||||||
|
|
||||||
@ -1118,4 +1116,8 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
if not _general.playlist_mode:
|
||||||
|
from watchdog.events import PatternMatchingEventHandler
|
||||||
|
from watchdog.observers import Observer
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user