Giter Club home page Giter Club logo

ffplayout-docker's Introduction

ffplayout

License: GPL v3

ffplayout-engine (ffplayout)

ffplayout is a 24/7 broadcasting solution. It can playout a folder containing audio or video clips, or play a JSON playlist for each day, keeping the current playlist editable.

The ffplayout applications are mostly designed to run as system services on Linux. But in general they should run on any platform supported by Rust.

Check the releases for pre compiled version.

Features

  • have all values in a separate config file
  • dynamic playlist
  • replace missing playlist or clip with single filler or multiple fillers from folder, if no filler exists, create dummy clip
  • playing clips in watched folder mode
  • send emails with error message
  • overlay a logo
  • overlay text, controllable through ffplayout-frontend (needs ffmpeg with libzmq and enabled JSON RPC server)
  • loop playlist infinitely
  • remote source
  • trim and fade the last clip, to get full 24 hours
  • when playlist is not 24 hours long, loop fillers until time is full
  • set custom day start, so you can have playlist for example: from 6am to 6am, instate of 0am to 12pm
  • normal system requirements and no special tools
  • no GPU power is needed
  • stream to server or play on desktop
  • log to files or color output to console
  • add filters to input, if is necessary to match output stream:
    • yadif (deinterlacing)
    • pad (letterbox or pillarbox to fit aspect)
    • fps (change fps)
    • scale (fit target resolution)
    • aevalsrc (if video have no audio)
    • apad (add silence if audio duration is to short)
    • tpad (add black frames if video duration is to short)
  • output:
    • stream
    • desktop
    • HLS
    • null (for debugging)
  • JSON RPC server, to get information about what is playing and to control it
  • live ingest
  • image source (will loop until out duration is reached)
  • extra audio source, has priority over audio from video (experimental *)
  • multiple audio tracks (experimental *)
  • Stream Copy mode (experimental *)
  • custom filters globally in config, or in playlist for specific clips
  • import playlist from text or m3u file, with CLI or frontend
  • audio only, for radio mode (experimental *)
  • Piggyback Mode, mostly for non Linux systems (experimental *)
  • generate playlist based on template (experimental *)
  • During playlist import, all video clips are validated and, if desired, checked to ensure that the audio track is not completely muted.

For preview stream, read: /docs/preview_stream.md

* Experimental features do not guarantee the same stability and may fail under unusual circumstances. Code and configuration options may change in the future.

ffplayout-api (ffpapi)

ffpapi serves the frontend and it acts as a REST API for controlling the engine, manipulate playlists, add settings etc.

Requirements

  • RAM and CPU depends on video resolution, minimum 4 threads and 3GB RAM for 720p are recommend
  • ffmpeg v5.0+ and ffprobe (ffplay if you want to play on desktop)
  • if you want to overlay text, ffmpeg needs to have libzmq

Install

Check install for details about how to install ffplayout.


JSON Playlist Example

{
    "channel": "Test 1",
    "date": "2019-03-05",
    "program": [{
            "in": 0,
            "out": 647.68,
            "duration": 647.68,
            "source": "/Media/clip1.mp4"
        }, {
            "in": 0,
            "out": 890.02,
            "duration": 890.02,
            "source": "/Media/clip2.mp4",
            "custom_filter": "eq=gamma_b=0.6:gamma_g=0.7[c_v_out]"
        }, {
            "in": 0,
            "out": 149,
            "duration": 149,
            "source": "/Media/clip3.mp4",
            "category": "advertisement"
        }, {
            "in": 0,
            "out": 114.72,
            "duration": 114.72,
            "source": "/Media/image1.jpg",
        }, {
            "in": 0,
            "out": 230.30,
            "duration": 230.30,
            "source": "/Media/image2.jpg",
            "audio": "/Media/audio1.mp3"
        }, {
            "in": 0,
            "out": 2531.36,
            "duration": 2531.36,
            "source": "https://example.org/big_buck_bunny.webm",
            "category": ""
        }
    ]
}

Warning

(Endless) streaming over multiple days will only work if config has a day_start value and the length value is 24 hours. If you only need a few hours for each day, use a cron job or something similar.


HLS output

For outputting to HLS, output parameters should look like:

out:
    ...

    output_param: >-
        ...

        -flags +cgop
        -f hls
        -hls_time 6
        -hls_list_size 600
        -hls_flags append_list+delete_segments+omit_endlist+program_date_time
        -hls_segment_filename /var/www/html/live/stream-%09d.ts /var/www/html/live/stream.m3u8

JSON RPC

The ffplayout engine can run a simple RPC server. A request looks like:

curl -X POST -H "Content-Type: application/json" -H "Authorization: ---auth-key---" \
    -d '{"control":"next"}' \
    127.0.0.1:7070

At the moment this commends are possible:

'{"media":"current"}'  # get infos about current clip
'{"media":"next"}'  # get infos about next clip
'{"media":"last"}'  # get infos about last clip
'{"control":"next"}'   # jump to next clip
'{"control":"back"}'   # jump to last clip
'{"control":"reset"}'  # reset playlist to old state
'{"control":"text", \
  "message": {"text": "Hello from ffplayout", "x": "(w-text_w)/2", "y": "(h-text_h)/2", \
  "fontsize": 24, "line_spacing": 4, "fontcolor": "#ffffff", "box": 1, \
  "boxcolor": "#000000", "boxborderw": 4, "alpha": 1.0}}' # send text to drawtext filter from ffmpeg

Output from {"media":"current"} show:

{
    "media": {
        "category": "",
        "duration": 154.2,
        "out": 154.2,
        "in": 0.0,
        "source": "/opt/tv-media/clip.mp4"
    },
    "index": 39,
    "mode": "playlist",
    "ingest": false,
    "played": 67.80771999300123,
}

If you are in playlist mode and move backwards or forwards in time, the time shift is saved so the playlist is still in sync. Bear in mind, however, that this may make your playlist too short. If you do not reset it, it will automatically reset the next day.

Founding

If you like this project and would like to make a donation, please use one of the options provided. Please note that donations are not intended to get support or features! Donations are only a sign of appreciation.

ffplayout-docker's People

Contributors

jb-alvarado avatar jrsmile avatar mtseluiko avatar spencerhughes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ffplayout-docker's Issues

ffplayer-frontend image fails to build

Describe the bug
ffplayer-frontend fails to build because of missing python binary. If you add python3 to the Dockerfile, it fails because it is missing make, and if you install make it failes with a file not found error.

To Reproduce
Steps to reproduce the behavior:

  1. Clone repo
  2. Run docker-compose build
  3. See error

Expected behavior
Container would build successfully.

Logging

Before installing python3
before-python3.txt

After installing python3
after-python3.txt

After installing make
after-make.txt

Server (please complete the following information):

  • OS: debian and ubuntu
  • Version: 10 and 21.10
  • Docker version 20.10.11, build dea9396 on Ubuntu
  • Docker version 20.10.11, build dea9396 on Debian

Relase Version (please complete the following information):

  • Version: [e.g. v3.0.0]

Additional context
Add any other context about the problem here.

Support SRT out?

Hello @jb-alvarado ,

I've been trying out the playout and I have so far been able to receive the rtmp via vlc.

However when I change this to HLS or to SRT, I am unable to pull it.

ffplay- srt

Is there something I am doing wrong? Also, I don't understand

  1. where to put the 'output' file
  2. which folder to put it in
  3. what configurations to put in
  4. what format - is it similar to the srs.conf file? Is there a sample?

Thank you.

One Success! One Failure!

@jb-alvarado ,

So i can confirm that my stream - rtmp - has reached my server. When I click the green big play button, I am able to publish and push even as the logging shows. So that one is successful.

Now, I am unfortunately unable to see any indication in the GUI that there is streaming.

no_indication

How come these numbers and progress bar remains static? They do not update.

Help. Thank you.

install issue

we tried the old install method with issues
then tried docker and the same.

is there an issue in the script that affects both ways of installing the system?

Default Password

Hello

Very very new to this. I'm happy i found it.

Can someone tell me what the default password is? I've tried admin:admin but i get "Error: Request failed with status code 404"

Please assist.

Thank you

GUI dissapears after reboot and does not load

Successful install yesterday using a different flavor of Linux.
Booted up to test more today and the GUI on 8088 not working
using the docker ps command it shows everything EXCEPT the 8088 one

docker er2

any suggestions/ideas why it does not auto load on reboot?

hls_output

Direct hls output without srs is not working.

Playout not "playing"

Hi @jb-alvarado

I am also facing this issue. I have set the playout to play from 'storage' and not playlist because I am not to sure how to do the playlist (instructions aren't very clear to me).

If you see the image, this is what I get

playout

So the buttons don't work, and only the player is able to play.

What steps do I take to correct it?

Thank you

media url is empty

I am trying to access media file in front end but it is showing empty
Screenshot 1942-09-08 at 1 46 07 AM
.

Unable to see playlist

First of all, thank you very much for the ffplayout repos. This saves a lot of time instead of building something from scratch.

After I bring up the service using "docker-compose up -d", I am able to pull up the UI (http://localhost:8088) and see the controls. Unfortunately, I was not able to see the playlist. I was wondering if I had to anything else as pre-requisites?
Note: There were no errors in the docker-compose up execution.

ERROR

ERROR: Service 'ffplayout-engine' failed to build: The command '/bin/sh -c cd /opt && wget "https://github.com/ffplayout/ffplayout-engine/archive/v${version}.zip" && unzip "v${version}.zip" && mv "ffplayout_engine-${version}" 'ffplayout-engine' && rm "v${version}.zip" && cd ffplayout-engine && pip install --no-cache-dir -r requirements-base.txt && mkdir /etc/ffplayout' returned a non-zero code: 1

Using docker, any dependencies?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.