Code Monkey home page Code Monkey logo

hls-xmltv---home-broadcasting's Introduction

HLS / XMLTV Home broadcasting

HLS / XMLTV Home broadcasting is a home broadcasting system, it leverages FFMPEG & Nginx to broadcast your own do it yourself channels 24 hours a day across a home network

A M3U is auto generated from the FFMPEG HLS (M3U8) outputs A XMLTV is generated by probing the video files for their duration using FFPROBE, with this info it extrapolates and writes a valid matching XMLTV file

These M3U and XMLTV files are supported popular systems: I personally run it on TiviMate and a Enimga2 Box, but it will run on much much more

Major Features Include:

  • Querys TVMAZE to get episode descriptions etc...
  • Randomizing Episodes
  • Randomized Idents - The channel stays in order but "Idents" are injected between the episodes to recreate the channel surfing experience
  • Metadata & Probe Info Caching System

Important:

a TMPFS in the NGINX web directory is required to run this effectively

to quickly setup a ram disk:

$ mount -t tmpfs -o size=512m tmpfs /var/www/html/streams

to make it automatic when linux boots edit the /etc/fstab with something like this:

$ tmpfs       /var/www/html/streams tmpfs   nodev,nosuid,noexec,nodiratime,size=512M   0 0

Important 2:

Video files on the same channel all have to be the same format,

If yours don't,

I Recommend FFmpeg Batch AV Converter

here is the parameters i use to match 4:3 & 16:9 content in one go

-c:v libx264 -crf 23 -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2" -c:a aac -b:a 128K -ar 48K -ac 2

Requirements

  • BASH
  • NGINX
  • FFMPEG / FFPROBE
  • PYTHON
  • JQ (LINUX PACKAGE - needed to query TV_MAZE, will still run without it but it will fallback to just filenames)

Setup

  • Make sure all the required software mentioned above are installed
  • Clone the repository into your machine
  • Edit the config file with your installations info
  • Add your channel playlists to concat_files directory (see example for formating)
  • Run cron.sh to launch all channels (gives pretty output)

This Is Alpha Software so expect occational bugs

For the Curious this is what it looks like when setup on TiviMate

HLS / XMLTV Home broadcasting

License

Docker Versions

Confusingly they both have the same name but they have different approches:

My personal docker version, matches development machine and pulls master branch, image is about 125mb

Created by chasx003, it has a fixed version and had its variables rewritten to docker variables, image is about 157mb

hls-xmltv---home-broadcasting's People

Contributors

deanochips 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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hls-xmltv---home-broadcasting's Issues

label:"good first issue" How to keep channels repeating themself

Hello and first of all... Thank you!

I just found this software and worked on it tonight and am very excited! It is working really well.
I need to look into this much deeper, but wondered what your method is for refreshing the channel? I assume you have cron job every hour or so running cron.sh or maybe even shorter i.e 15 mins?

It will be difficult, but I think it's possible to keep track of the end time of a channel and save this to a variable. This variable would be compared for the next channel and stores the first upcoming end time. This way at the end of running the app, the variable would have the end time of the channel finishing first.

In this way the script can run as a service and would refresh whenever the current time reaches the variable stored (shortest channel end time).

Cheers!

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.