Giter Site home page Giter Site logo

plutotv-tvheadend's Introduction

plutoTV-tvheadend

Perl-Script to generate m3u and xmltv-epg from PlutoTV-API.
Works best using streamlink in current version.

There are two ways to use these scripts:

  • you can generate a static m3u8 by using the plutotv-generate.pl-script with params
  • you can start plutotv-localserver.pl as local HTTP-Server and call it via URLs

I recommend using plutotv-localserver.pl to ensure that the channel list (m3u8) is always up-to-date.

install used modules

sudo cpan install DateTime DateTime::Format::Strptime JSON JSON:Parse HTTP::Request URI::Escape LWP::UserAgent UUID::Tiny File::Which

when using plutotv-localserver.pl also: sudo cpan install HTTP::Request::Params HTTP::Daemon HTTP::Status HTTP::Request::Common HTTP::Cookies Net::Address::IP::Local

usage

perl plutotv-generate.pl [--createm3u] [--usebash] [--useffmpeg | --usestreamlink]

or

perl plutotv-localserver.pl [--localonly] [--port <portnumber>] [--usestreamlink] (or start as systemd-daemon)

meaning of params

plutotv-generate.pl

parameter effect
--createm3u create playlist-file plutotv.m3u8 and xmltv-file plutotv-epg.xml
--usebash create bash-file for each pluto-tv-channel for starting service
--useffmpeg will use ffmpeg-pipe instead of using original URL to channel
--usestreamlink same as --useffmpeg, but using streamlink instead of ffmpeg

plutotv-localserver.pl

parameter effect
--localonly will configure server to listen on localhost 127.0.0.1
--port <number> set listening-port for server (default: 9000)
--usestreamlink provide playlist with call for streamlink instead ffmpeg

available endpoints for localserver

endpoint task
/playlist path to get m3u8-file
/master3u8?id= path to get playlist.m3u8 for given channelid
/channel?id= path to get ts via ffmpeg or streamlink for given channelid
/epg path to get xmltv-epg-file

how to load xmltv-guide into tvheadend

  • Go to menu option "Configuration" > "Channel/EPG" > "EPG Grabber Modules" and enable "External: XMLTV"
  • Go to menu option "Configuration" > "Channel/EPG" > "Channel" > "Map services" > "Map all services" and map the services
  • Run the following command twice:

cat plutotv-epg.xml | socat - UNIX-CONNECT:/var/lib/hts/.hts/tvheadend/epggrab/xmltv.sock

more

PlutoTV only delivers timelines 6h in future. So epg has to be fetched at least every 6 hours: crontab: 15 */6 * * * perl plutotv-generate.pl

or

15 */6 * * * wget http://localhost:9000/epg -O plutotv-epg.xml

plutotv-tvheadend's People

Contributors

mclenburg avatar toggm avatar

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.