From 0243374cc25c831c43e815e044726f453b33a139 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Fri, 11 Jan 2019 07:42:16 +0200 Subject: [PATCH] add README --- README.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++ liq/scripts/smart | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7315e26 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +# IcyTV +This project is an attempt at continuous video streaming with [Liquidsoap](https://www.liquidsoap.info/) in order to create a basic WebTV type of stream. + +Included is a simple scheduling system which also draws a schedule over the fallback (default) stream. + +It streams video to a configured RTMP server, m'kay? + +## Requirements +* [Liquidsoap](https://www.liquidsoap.info/) +* `gstreamer` - I'm not sure which plugins you actually need, but I just install `gstreamer1.0-plugins-*` and it usually does the trick +* `ocamlsdl`, `fdkaac` and `theora` ocaml modules in addition to `liquidsoap`'s requirements +* [node.js](https://nodejs.org/) +* [youtube-dl](http://rg3.github.io/youtube-dl/index.html) to queue videos from websites like YouTube. +* An RTMP server +* (optional) A [Google Calendar](https://calendar.google.com) for your events, along with an API key from [here](https://console.developers.google.com/) +* Some patience and knowledge on how to Google your errors +* A relatively good machine that can handle continuous decoding and encoding of video +* ..just sheer luck tbh + +## Installation & Running +1. Follow the requirements +2. Clone this repository +3. `npm install` +4. Start the application using `node index.js` + +When running the application for the first time, it will create a `config.json` file that you'll have to modify. + +### In-application commands +The Node application features command line commands that you can input. + +* `start`, `stop`, `restart` - Start/stop/restart Liquidsoap +* `queue` - Queue a file, or pretty much anything supported by `youtube-dl` +* `skip` - Skip the currently playing media +* `status` - Reports the status of your Liquidsoap process +* `events` - Refreshes your calendar +* `reload` - Reloads the configuration file + +You can safely exit the application via `Ctrl+C` or `SIGINT` for you nerds out there. + +## Scheduling events +You just need a Google calendar and an API key. To schedule a queue, simply put `$:` followed directly by the media (e.g. a YouTube URL) you want queued when the event starts in the event's description. The first line in the description is also used in the schedule overlay. + +## License & Credits +This project is licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/legalcode). Feel free to modify and redistribute as you please. + +Some bits and pieces of code were "borrowed" from [Parasprite Radio](https://github.com/daniel-j/parasprite-radio). Go check it out. + +### My CPU is on fire!!! +You're actively decoding and encoding video, wtf are you screaming at me for? + +### It doesn't F\*\*\*ING work!!!!!11! +Read point 8 in [Requirements](#Requirements). diff --git a/liq/scripts/smart b/liq/scripts/smart index 28500ce..f7bd089 100755 --- a/liq/scripts/smart +++ b/liq/scripts/smart @@ -70,7 +70,7 @@ function outputVideo (video, cb) { }) } -if (arg.indexOf('youtube.com') !== -1 || arg.indexOf('youtu.be') !== -1) { +if (arg.indexOf('/') !== 0) { protocol(arg, formatter) } else { console.log(arg)