From bb334124bedfd7988c746130b9787b6da2989cac Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Sun, 30 Apr 2017 13:12:05 +0900 Subject: [PATCH] Adding support for format selection for Stream theme / extension, as well as the ability to change CSS theme from stream page --- templates/themes/stream/info.php | 25 +++++++- templates/themes/stream/stream.html | 88 +++++++++++++++++++++++------ 2 files changed, 93 insertions(+), 20 deletions(-) diff --git a/templates/themes/stream/info.php b/templates/themes/stream/info.php index 081b29ca..d522032d 100644 --- a/templates/themes/stream/info.php +++ b/templates/themes/stream/info.php @@ -34,19 +34,26 @@ 'title' => 'OGV stream URL', 'name' => 'ogvurl', 'type' => 'text', - 'default' => 'https://lainchan.org/radio_assets/lainstream.ogg' + 'default' => 'https://lainchan.org/icecast/lainstream.ogg' ); $theme['config'][] = Array( 'title' => 'RTMP stream URL', 'name' => 'rtmpurl', 'type' => 'text', - 'default' => 'rtmp://lainchan.org/live/stream' + 'default' => 'rtmp://lainchan.org/show/stream' ); $theme['config'][] = Array( 'title' => 'RTMP Video.JS stream URL', 'name' => 'rtmpvideojsurl', 'type' => 'text', - 'default' => 'rtmp://lainchan.org/live/&stream' + 'default' => 'rtmp://lainchan.org/show/&stream' + ); + + $theme['config'][] = Array( + 'title' => 'RTMP HLS stream URL', + 'name' => 'hlsurl', + 'type' => 'text', + 'default' => 'https://lainchan.org:8080/hls/stream.m3u8' ); $theme['config'][] = Array( @@ -68,6 +75,18 @@ 'type' => 'text', 'default' => '/live/subs?app=live&name=stream' ); + $theme['config'][] = Array( + 'title' => 'Formats', + 'name' => 'formats', + 'type' => 'text', + 'default' => 'hls ogg rtmp' + ); + $theme['config'][] = Array( + 'title' => 'Default Format', + 'name' => 'defaultformat', + 'type' => 'text', + 'default' => 'hls ogg rtmp' + ); // Unique function name for building everything diff --git a/templates/themes/stream/stream.html b/templates/themes/stream/stream.html index eb7b0c2b..2c6b66e3 100644 --- a/templates/themes/stream/stream.html +++ b/templates/themes/stream/stream.html @@ -1,4 +1,3 @@ -{% filter remove_whitespace %} @@ -7,17 +6,17 @@ {{ settings.title }} - {% if config.meta_keywords %}{% endif %} - - {% if config.url_favicon %}{% endif %} - - - {% if config.font_awesome %}{% endif %} + + {% include 'header.html' %} + - + + @@ -58,10 +87,19 @@ if (typeof sd !== 'undefined') {
+
-

+

FORMAT: +

+

Now Streaming RTMP unknown

Now Streaming OGV unknown

Current RTMP viewers: unknown

Current OGV viewers: unknown

-

Raw stream URLs for Mplayer, mpv, VLC, etc:

+

Raw stream URLs for Mplayer, mpv, VLC, browser etc:

+

HLS: {{ settings.hlsurl }}

RTMP : {{ settings.rtmpurl }}

OGV : {{ settings.ogvurl }}

@@ -83,8 +134,9 @@ if (typeof sd !== 'undefined') {

For RTMP

Use obs or ffmpeg to stream

E.g. ffmpeg -re -i filename -c copy -f flv {{ settings.rtmpurl }}?key=KEYGOESHERE

-

obs url field: rtmp://lainchan.org/live/

-

obs key field: stream?key=KEYGOESHERE

+

obs url field: rtmp://lainchan.org/show/

+

obs key field: stream?user=&pass=

+

For OGV Icecast cat filename | oggfwd -p lainchan.org 8000 /lainstream.ogg


@@ -97,7 +149,9 @@ if (typeof sd !== 'undefined') {
Tinyboard Copyright © 2010-2014 Tinyboard Development Group
vichan Copyright © 2012-2015 vichan-devel

- +
+ -{% endfilter %}