#!/bin/bash # Copyright (C) 2007–2023 Petr Písař # Copyright (C) 2023 Pali Rohár # This is free software. You may redistribute copies of it under the terms of # the GNU General Public License . # There is NO WARRANTY, to the extent permitted by law. VERSION='37' ## CHANGELOG # # Version 37 # * Add nova, nova-cinema, nova-action, nova-fun, nova-lady, and nova-gold. # # Version 36 # * markiza* updated, markiza-krimi added, a dependency on "markiza_cli" # external program was removed. # # Version 35 # * rtvs24*, rtvso*, rtvs-nrsr*, rtvs-live*, rtvs-sport* added, rtvs3* removed. # * ta3* fixed. # * noe-* fixed and renumbered, noe-plus* addded. # # Version 34 # # * Set a program name as a title to the players # * Fix ct* stream URLs. A new ctstream-31 is necessary. # * Add ct*-a6500 stream rates for all Czech Television channels. # # Version 33 # * Set an HTTP referrer for playing markiza* programs. # # Version 32 # * Added markiza, markiza-dajto, markiza-doma. They require markiza_cli # external script from . # # Version 31 # * Pass -fixed-vo -playlist options to MPlayer if an URL is a M3U8 playlist. # This enables MPlayer to access programs with an extended M3U playlist. Please # note that MPlayer does not support them properly. This is a bug in MPlayer # and you should use a different player, e.g. MPV. # * Split rtvs* to bitrates (e.g. rtvs1-5300). # * Upadate tvba (requires MPV with youtube-dl). # * Add TV JOJ (joj-*). # * Add TV JOJ Plus (jojplus-*) # * Add TV WAU (wau-1000, wau-1500) # * Add TA3 (e.g. ta3-2700) # * Add -l option for listing program is a machine-readable format. # # Version 30 # * stv1 and stv2 replaced with rtvs1, rtvs2, and rtvs3. # # Version 29 # * Update nhk-world-* addresses. # # Version 28 # * Recognize mpv030 value of PLAYER. MPV 0.30.0 changed syntax of a --cache # option. # # Version 27 # * nhk-world-* replaced with nhk-world-300, nhk-world-770, and nhk-world-1180. # Effective since 2019-12-17. # # Version 26 # * ct-a* streams updated # * nhk-world updated and a new bistream added # * noe-* updated and renamed to new bitstream values # # Version 25 # * Russia Today updated and renamed to rustd-news-* # * Russia Today Documentary added (rustd-doc-*) # * ctart-a3500 added (3.5-Mbps Czech TV Art) # * ctart-* updated # * ČT D addedd (ctd-* added) # * Support for mpv >= 0.9 player added (`mpv09' identifier) # * tvba updated # * ocko renamed to ocko-* # * tvb1 removed # * ruv removed # * rustavi2-1 and rustavi2-2 removed # * nckyo removed # * meteopress removed # # Version 24 # * Update ct2-a* bitrate values # * ct4-a3500 added (3.5-Mbps Czech TV 4) # * NHK World updated, nhk-world-* renamed according to new stream bit rates. # * All Livestation channels removed (they were changed into heavy javascript # bloat requiring login through social services). # * All Voyo channels remove (they require an account and money). # * tvziva removed (station bankkrupted). # * All RTPM Czech TV streams removed (brodcaster does not support them anymore) # * Support for mpv player added (`mpv' for pre-0.8 versions, and `mpv08' for # 0.8 and newer which do not have --no-consolecontrols option). # # Version 23 # * NHK World updated, nhk-world-h* renamed to nhk-world-512, nhk-world-256, # nhk-world-128 # # Version 22 # * Update NHK World URLs, rename European hub (nhk-world-h) to nhk-world-hnl, # add American one (nhk-world-hca) # * Add streams for Czech Television Art (ctart-*) # ct2-a* lists bitrate in bits, not in kilobits # * nasa-edu and nasa-public-* updated # * nasa-media removed # # Version 21 # * Adjust ct1-a* streams for new bit-rate identifiers # # Version 20 # * kctv addedd # * tvb1 updated # * Update livestation helper # # Version 19 released # * Streams available from voyo.sk added (thanks to Pali Rohár, dajto-* do not # work for me, geographical restriction probably) # * markiza-h added (2-Mbps version of markiza) # # Version 18 released # * The media player is configurable now. Use /etc/televizerc or ~/.televizerc # to override default configuration. Syntax is described in usage output. # # Version 17 released # * markiza updated (thanks to Pali Rohár) # # Version 16 released # * Update ČT24 and ČT1 HTTP/H264 stream rates # # Version 15 released # * nhk-world-h updated # * jpopsuki updated # # Version 14 released # * Put back livestation helper removed by accident # # Version 13 released # * Fix Deutsche Welle stations # * Fix livestation helper # # Version 12 released # * Add Czech TV Apple formats (ct1-a*, ct2-a*, ct24-a*, ct4-a*) # * Fix ct4-h100 # # Version 11 released # * Add ဒီမိုကရေတစ်မြန်မာ့အသံ (dvb) # * Add Bloomber TV (bloomberg) # * Livestation streams readded: aljazeerar, aljazeeren, bbcworldnews # * Add Deagu MBC (mbc-daegu) # * Add Arirang daily news (arirang-news). This is not a live stream. # * Add Arirang Korea (arirang-korea) # * Add Arirang World (arirang-world) # * NHK World replaced with high bit-rate version as old URL has been defunct # * Add libyatv as livestation helper has been resurrected # # Version 10 released # * Readd Rustavi2 in two instances (rustavi2-1, rustavi2-2) # * Remove stv3 as operator ceased the channel # * Update Russia Today as 3 different bitrates (rustd-300, rustd-500, # rustd-1000) # * Remove publictv as owner ceased operation # * Update markiza # * Update ktv # * Add Hope TV streams in H264 (hopetv-100, hopetv-300, hopetv-600) # * Update Georgian Public Brodcasting TV (add 3 servers) # * Add Deutsche Welle TV Arabia (dwtv-arabia) # * Add Deutsche Welle TV Asia (dwtv-asia) # * Add Deutsche Welle TV Europe (dwtv-europe) # * Remove dwtven (English version of Deutsche Welle) # * Remove 3.5-Mbps Czech TV streams as they do not exist # * Update cctv4 # * Update belarus # * Update alsharq # * Update aliraq # * Update ocko # # Version 9 released # * Replace nasa stream with new NASA TV streams # (differ on special occasions only) # * Update ct1, ct2, ct4, ct24. They require external ctstream script. # # Version 8 released # * CT Windows Media and Real Media stream removed # * CT1 H264 streams added # * CT2 H264 streams added # * CT4 H264 streams added # * CT24 H264 streams added # * Remove z1 as owner ceased broadcasting # * nhk-world-l stream added (English dubbed NHK World) # * nckyo added # # Version 7 released # * Update Czech (state) TV helper because web pages have changed, migrate all # stations to ivysilani-helper() # * Remove Czech TV streams for gone olympic games # * Add tvziva # * Add gimi # * Update nasa URL # # Version 6 released # * Czech TV playlist extraction adjusted to accept IP address # * Winter Olympic Games brodcasted by Czech TV fixed # * Readded z1 and ocko as latest MPlayer (2010-02-13) supports RTMP streams # # Version 5 released # * ctzoh added # (only trial spot currently, company is going to offer 8 streams) # * lux added # * removed helperlivestaion() channels because they moved to RTMP # * psctv removed as free access has been terminated # # Version 4 released # * cropping fixed on ct4-rpal # * ct1-rl, ct4-rl, ct4-rh fixed # * ct1-rpal and ct2-rpal a has correct size now # (or mplayer/ffmpeg has been fixed), resizing video filters removed. # * Failure of helper-ct() handled properly # * quoting improved in helper-livestation() # # Version 3 released # * helper-ct() fixed to accept newly deployed CDN servers with up to three # digit serial number. Thanks to Radovan Drazny . # * Typos fixed # # Version 2 released # * Columns made wider. # * Al Jazeera in English (aljazeeren) and in Arabic (aljazeerar) added. # * Euronews in German (euronewsde) added. Stream is broken currently. # * Livestation streams started using simple token autorization. # * helper-livestream() added and given programs fixed. # # Version 1 released # See for some streams of # Czech stations. # Default values CACHE=2048 DIRECT_STREAM=1 PLAYER='mplayer' # Load configuration test -f /etc/televizerc && source /etc/televizerc test -f ~/.televizerc && source ~/.televizerc # Usage death message function help() { local FMT='%-10s %-16s %s\n' cat<
. Program je šířen BEZ JAKÉKOLI ZÁRUKY, jak jen zákon dovoluje. COPY exit 1; } # List known programs in machine readable format. Each line is program. Each # line consists of a program identifier, a space, and a human-readable # description up to the and of the line. function list() { for ((I=0; ${#PRGM[@]} - I; I=I+1)); do printf "%s %s\n" "${PRGM[$I]}" "${TITLE[$I]}" done exit 0; } # Adds a TV program to the list by a stream URL. function addtv() { local I=$((${#PRGM[@]})) PRGM[$I]="$1" TITLE[$I]="$2" URL[$I]="$3" EXTRA[$I]="$4" } # Adds TV to the list by URL helper function. # The function will be executed and it must set stream URL into MYURL variable # and the function must terminate successfully. function caltv() { local I=$((${#PRGM[@]})) PRGM[$I]="$1" TITLE[$I]="$2" HELPER[$I]="$3" EXTRA[$I]="$4" } # Adds TV to the list by streamer function. # The function will be executed and its standard output will be connected to # a media player. function strtv() { local I=$((${#PRGM[@]})) PRGM[$I]="$1" TITLE[$I]="$2" STREAMER[$I]="$3" EXTRA[$I]="$4" } function streamer-ct() { if [ "$#" != 2 ]; then echo "$0: bad invocation" 1>&2 return 1 fi local CHANNEL="$1" local RATE="$2" local PAGE="http://www.ceskatelevize.cz/zive/${CHANNEL}/" ctstream -v -A -s "$PAGE" "$RATE" } # Return value of element from XML string function get_element() { local ELEMENT="$1" local TEXT="$2" echo "$TEXT" | grep -o "<${ELEMENT}>[^<]*" | \ sed 's/[^>]*>\([^<]*\).*/\1/' | sed 's/&/\&/g' } # Pass a URL to a multi-bitrate M3U playlist before a dedirection and a desired bitrate. function helper-livebox() { if [ "$#" != 2 ]; then echo "$0: bad invocation" return 1 fi local MBITRATE_URL="$1" local BITRATE="$2" local MBITRATE_DATA MBITRATE_DATA=$(wget -O - "$MBITRATE_URL") MYURL=$(echo "$MBITRATE_DATA" | grep "/chunklist_b${BITRATE}.m3u8$") ISAPLAYLIST=1 } function helper-markiza() { if [ "$#" != 1 ]; then echo "$0: bad invocation" return 1 fi local CHANNEL="$1" local DATA DATA=$(wget -O - "https://media.cms.markiza.sk/embed/${CHANNEL}-live") MYURL=$(echo "$DATA" | sed -ne '/:{"HLS":\[{"src":/s/.*:{"HLS":\[{"src":"//;s/".*//;s/\\\//\//gp') ISAPLAYLIST=1 } function helper-nova() { if [ "$#" != 1 ]; then echo "$0: bad invocation" return 1 fi local CHANNEL="$1" local DATA DATA=$(wget -O - "https://media.cms.nova.cz/embed/${CHANNEL}-live") MYURL=$(echo "$DATA" | sed -ne 's/.*"source":{"sources":\[{"src":"//;s/".*//;s/\\\//\//gp') ISAPLAYLIST=1 } function helper-rtvs() { if [ "$#" != 2 ]; then echo "$0: bad invocation" return 1 fi local CHANNEL="$1" local BITRATE="$2" local JSON_DATA MBITRATE_URL REDIRECT_URL JSON_DATA=$(wget -O - "http://www.rtvs.sk/json/live5f.json?c=${CHANNEL}&b=mozilla&p=linux&v=47&f=1&d=1") MBITRATE_URL=$(echo "$JSON_DATA" | sed -ne '/"src" :/s/.*"\(https\?:\/\/[^"]*\).*/\1/p') helper-livebox "$MBITRATE_URL" "$BITRATE" } function helper-ta3() { if [ "$#" != 1 ]; then echo "$0: bad invocation" return 1 fi local BITRATE="$1" local JSON_DATA MBITRATE_URL REDIRECT_URL JSON_DATA=$(wget -O - 'http://embed.livebox.cz/ta3_v2/live-source.js') MBITRATE_URL=$(echo "$JSON_DATA" | sed -ne '/\[{"src" :/ s/.*\[{"src"\s*:\s*"\(\/\/[^"]*\).*/http:\1/p') helper-livebox "$MBITRATE_URL" "$BITRATE" } function helper-dwelle() { if [ "$#" != 2 ]; then echo "$0: bad invocation" return 1 fi local NAME="$1" local RATE="$2" local STREAMER FILE SMIL SMIL=$(wget -O - "http://www.metafilegenerator.de/DWelle/${NAME}/flv/tv.smil") STREAMER=$(echo "$SMIL" | grep -o 'base="[^"]*"' | sed 's/[^"]*"\([^"]*\).*/\1/') FILE=$(echo "$SMIL" | grep "bandwidth=\"${RATE}\"" | grep -o 'src="[^"]*"' | sed 's/[^"]*"\([^"]*\).*/\1/') MYURL="${STREAMER}${FILE} live=1" } function helper-noe() { local CHANNEL="$1" local HEIGHT="$2" local BASE_URL="https://n105.quickmedia.tv/${CHANNEL}-abr/${CHANNEL}-abr/" local TOPM3U=$(wget -O - "${BASE_URL}playlist_dvr.m3u8") local URL_PATH=$(printf '%s' "$TOPM3U" | sed -n -E '/RESOLUTION=[[:digit:]]*x'"${HEIGHT}"'/{N;s/.*\n//;p;q}') MYURL="${BASE_URL}${URL_PATH}" } # Process argument as date(1) format string. Usefull to insert nowaday date function helper-injecttime() { if [ "$#" != 1 ]; then echo "$0: bad invocation" return 1 fi MYURL=$(date "+${1}") if [ "$?" -ne 0 ]; then echo "Could not format date: $1" return 1 fi } # TV programs definition addtv "aliraq" "Al-Iraqiya" "http://212.7.196.74:80/iraqia" # This works: rtmpdump -v -r rtmp://livestfslivefs.fplive.net/aljazeeraflashlive-live/aljazeera_en_veryhigh addtv "alsharq" "AlSharqiya TV" "rtmp://ns6.indexforce.com/live/mystream" addtv "althingi" "Althingi" "http://netvarp.althingi.is/beint" caltv "arirang-news" "Arirang daily news" "helper-injecttime mms://121.156.66.59/News_2200/2200News_300k_%F.asf" addtv "arirang-korea" "Arirang Korea" "mms://s1.arirang.co.kr/Korea_Live" addtv "arirang-world" "Arirang World" "mms://s1.arirang.co.kr/World_Live" addtv "aqape" "Aqape TV" "mms://wms.dominiocreativo.com/agapetv" addtv "belarus" "Беларусь-ТВ" "mms://livecast.tvr.by/video" addtv "cctv4" "CCTV 4" "mms://4.71.37.8/cctv4-200" strtv "ct1-a500" "ČT1 HTTP/H264 500k" "streamer-ct ct1 628000" strtv "ct1-a1000" "ČT1 HTTP/H264 1M" "streamer-ct ct1 1160000" strtv "ct1-a2000" "ČT1 HTTP/H264 2M" "streamer-ct ct1 2176000" strtv "ct1-a3500" "ČT1 HTTP/H264 3,5M" "streamer-ct ct1 3712000" strtv "ct1-a6500" "ČT1 HTTP/H264 6,5M" "streamer-ct ct1 6272000" strtv "ct2-a500" "ČT2 HTTP/H264 500k" "streamer-ct ct2 628000" strtv "ct2-a1000" "ČT2 HTTP/H264 1M" "streamer-ct ct2 1160000" strtv "ct2-a2000" "ČT2 HTTP/H264 2M" "streamer-ct ct2 2176000" strtv "ct2-a3500" "ČT2 HTTP/H264 3,5M" "streamer-ct ct2 3712000" strtv "ct2-a6500" "ČT2 HTTP/H264 6,5M" "streamer-ct ct2 6272000" strtv "ct24-a500" "ČT24 HTTP/H264 500k" "streamer-ct ct24 628000" strtv "ct24-a1000" "ČT24 HTTP/H264 1M" "streamer-ct ct24 1160000" strtv "ct24-a2000" "ČT24 HTTP/H264 2M" "streamer-ct ct24 2176000" strtv "ct24-a3500" "ČT24 HTTP/H264 3,5M" "streamer-ct ct24 3712000" strtv "ct24-a6500" "ČT24 HTTP/H264 6,5M" "streamer-ct ct24 6272000" strtv "ct4-a500" "ČT4 HTTP/H264 500k" "streamer-ct ct4 628000" strtv "ct4-a1000" "ČT4 HTTP/H264 1M" "streamer-ct ct4 1160000" strtv "ct4-a2000" "ČT4 HTTP/H264 2M" "streamer-ct ct4 2176000" strtv "ct4-a3500" "ČT4 HTTP/H264 3,5M" "streamer-ct ct4 3712000" strtv "ct4-a6500" "ČT4 HTTP/H264 6,5M" "streamer-ct ct4 6272000" strtv "ctart-a500" "ČTart HTTP/H264 500k" "streamer-ct ct6 628000" strtv "ctart-a1000" "ČTart HTTP/H264 1M" "streamer-ct ct6 1160000" strtv "ctart-a2000" "ČTart HTTP/H264 2M" "streamer-ct ct6 2176000" strtv "ctart-a3500" "ČTart HTTP/H264 3,5M" "streamer-ct ct6 3712000" strtv "ctart-a6500" "ČTart HTTP/H264 6,5M" "streamer-ct ct6 6272000" strtv "ctd-a500" "ČT D HTTP/H264 500k" "streamer-ct ct5 628000" strtv "ctd-a1000" "ČT D HTTP/H264 1M" "streamer-ct ct5 1160000" strtv "ctd-a2000" "ČT D HTTP/H264 2M" "streamer-ct ct5 2176000" strtv "ctd-a3500" "ČT D HTTP/H264 3,5M" "streamer-ct ct5 3712000" strtv "ctd-a6500" "ČT D HTTP/H264 6,5M" "streamer-ct ct5 6272000" caltv "dwtv-amerika-l" "Deutsche Welle TV Amerika 85 kb/s" "helper-dwelle tv-northamerica low" caltv "dwtv-amerika-m" "Deutsche Welle TV Amerika 500 kb/s" "helper-dwelle tv-northamerica medium" caltv "dwtv-arabia-l" "Deutsche Welle TV Arabia 85 kb/s" "helper-dwelle tv-arabia low" caltv "dwtv-arabia-m" "Deutsche Welle TV Arabia 500 kb/s" "helper-dwelle tv-arabia medium" caltv "dwtv-asia-l" "Deutsche Welle TV Asia 85 kb/s" "helper-dwelle tv-asia low" caltv "dwtv-asia-m" "Deutsche Welle TV Asia 500 kb/s" "helper-dwelle tv-asia medium" caltv "dwtv-europe-l" "Deutsche Welle TV Europe 85 kb/s" "helper-dwelle tv-europa low" caltv "dwtv-europe-m" "Deutsche Welle TV Europe 500 kb/s" "helper-dwelle tv-europa medium" caltv "dwtv-europe-h" "Deutsche Welle TV Europe 1.2 Mb/s" "helper-dwelle tv-europa high" caltv "dwtv-lamerica-l" "Deutsche Welle TV Latinoamérica 85 kb/s" "helper-dwelle tv-latinoamerica low" caltv "dwtv-lamerica-m" "Deutsche Welle TV Latinoamérica 500 kb/s" "helper-dwelle tv-latinoamerica medium" addtv "france24fr" "France24 Français" "mms://stream1.france24.yacast.net/f24_livefr" addtv "gimi" "TV Gimi" "http://stream5.visual.cz/tvgimi" addtv "gpb1-g1" "Georgian Public Broadcast 1 server 1" "mms://80.241.246.154/1tv" addtv "gpb1-g2" "Georgian Public Broadcast 1 server 2" "mms://80.241.246.158/1tv" addtv "gpb1-usa" "Georgian Public Broadcast 1 USA server" "mms://80.241.246.158/1tv" addtv "hopetv-h" "Hope TV 896 kb/s" 'http://mediaserver.hopetv.cz/hopetv_high?MSWMExt=.asf' addtv "hopetv-l" "Hope TV 390 kb/s" 'http://mediaserver.hopetv.cz/hopetv_mid?MSWMExt=.asf' addtv "hopetv-600" "Hope TV 600 kb/s" 'rtmp://stream2.mediawork.cz/hopetv/hopetv1' addtv "hopetv-300" "Hope TV 300 kb/s" 'rtmp://stream2.mediawork.cz/hopetv/hopetv2' addtv "hopetv-100" "Hope TV 100 kb/s" 'rtmp://stream2.mediawork.cz/hopetv/hopetv3' addtv "joj-1000" "TV JOJ 1M" 'https://nn.geo.joj.sk/live/hls/joj-360.m3u8' addtv "joj-1500" "TV JOJ 1,5M" 'https://nn.geo.joj.sk/live/hls/joj-540.m3u8' addtv "joj-2000" "TV JOJ 2M" 'https://nn.geo.joj.sk/live/hls/joj-720.m3u8' addtv "jojplus-1000" "TV JOJ Plus 1M" 'https://nn.geo.joj.sk/live/hls/jojplus-360.m3u8' addtv "jojplus-1500" "TV JOJ Plus 1,5M" 'https://nn.geo.joj.sk/live/hls/jojplus-540.m3u8' addtv "jpopsuki" "JPopsuki TV" 'http://jpopsuki.fm:8800/;stream.nsv' addtv "kctv" "조선중앙TV" 'http://112.170.78.145:50000/chosun' addtv "ktv" "Kurdistan TV" "rtmp://www.kurdistantv.info/live/livestream live=1" addtv "lux" "TV Lux" "http://streaming.tvlux.sk/tvluxlive/" "-aspect 4:3" caltv "markiza" "Markíza" 'helper-markiza markiza' '-referrer https://media.cms.markiza.sk/' caltv "markiza-dajto" "Markíza dajto" 'helper-markiza dajto' '-referrer https://media.cms.markiza.sk/' caltv "markiza-doma" "Markíza doma" 'helper-markiza doma' '-referrer https://media.cms.markiza.sk/' caltv "markiza-krimi" "Markíza krimi" 'helper-markiza krimi' '-referrer https://media.cms.markiza.sk/' addtv "mbc-daegu" "Daegu MBC" "http://211.115.127.29:80/live" caltv "nova" "Nova" 'helper-nova nova' '-referrer https://media.cms.nova.cz/' caltv "nova-cinema" "Nova Cinema" 'helper-nova nova-cinema' '-referrer https://media.cms.nova.cz/' caltv "nova-action" "Nova Action" 'helper-nova nova-action' '-referrer https://media.cms.nova.cz/' caltv "nova-fun" "Nova Fun" 'helper-nova nova-fun' '-referrer https://media.cms.nova.cz/' caltv "nova-lady" "Nova Lady" 'helper-nova nova-lady' '-referrer https://media.cms.nova.cz/' caltv "nova-gold" "Nova Gold" 'helper-nova nova-gold' '-referrer https://media.cms.nova.cz/' addtv "nasa-edu" "NASA TV Education" 'rtmp://infozen.fc.llnwd.net/infozen/edu_400 live=1' # Playlist 'http://www.nasa.gov/multimedia/isslivestream.asx' addtv "nasa-iss" "NASA TV ISS" "mms://a1709.l1856953708.c18569.g.lm.akamaistream.net/D/1709/18569/v0001/reflector:53708" addtv "nasa-public-200" "NASA TV Public 200k" "rtmp://infozen.fc.llnwd.net/infozen/nasa_200 live=1" addtv "nasa-public-400" "NASA TV Public 400k" "rtmp://infozen.fc.llnwd.net/infozen/nasa_400 live=1" addtv "nasa-public-1000" "NASA TV Public 1M" "rtmp://infozen.fc.llnwd.net/infozen/nasa_1000 live=1" # Playlist https://nhkworld.webcdn.stream.ne.jp/www11/nhkworld-tv/global/2003458/live.m3u8 addtv "nhk-world-300" "NHK World 300k" "https://nhkwlive-xjp.akamaized.net/hls/live/2003458/nhkwlive-xjp-en/index_200k.m3u8" addtv "nhk-world-770" "NHK World 770k" "https://nhkwlive-xjp.akamaized.net/hls/live/2003458/nhkwlive-xjp-en/index_600k.m3u8" addtv "nhk-world-1180" "NHK World 1180k" "https://nhkwlive-xjp.akamaized.net/hls/live/2003458/nhkwlive-xjp-en/index_1M.m3u8" caltv "noe-700" "TV Noe 700k" "helper-noe noe 288" caltv "noe-1100" "TV Noe 1,1M" "helper-noe noe 432" caltv "noe-1900" "TV Noe 1,9M" "helper-noe noe 576" caltv "noe-3700" "TV Noe 3,7M" "helper-noe noe 720" caltv "noe-plus-700" "TV Noe+ 700k" "helper-noe noe-2 288" caltv "noe-plus-1100" "TV Noe+ 1,1M" "helper-noe noe-2 432" caltv "noe-plus-1900" "TV Noe+ 1,9M" "helper-noe noe-2 576" caltv "noe-plus-3700" "TV Noe+ 3,7M" "helper-noe noe-2 720" addtv "ocko-500" "TV Óčko 600k" "rtmp://194.79.52.77/ockoi/ockoHQ3" addtv "ocko-1000" "TV Óčko 1M" "rtmp://194.79.52.77/ockoi/ockoHQ2" addtv "ocko-2500" "TV Óčko 2,5M" "rtmp://194.79.52.77/ockoi/ockoHQ1" addtv "rustd-doc-500" "Russia Today Documentary 500k" "rtsp://hdn.octoshape.net/er-rt/ch5_240p" addtv "rustd-doc-700" "Russia Today Documentary 700k" "rtsp://hdn.octoshape.net/er-rt/ch5_320p" addtv "rustd-doc-1000" "Russia Today Documentary 1M " "rtsp://hdn.octoshape.net/er-rt/ch5_480p" addtv "rustd-doc-1500" "Russia Today Documentary 1,5M " "rtsp://hdn.octoshape.net/er-rt/ch5_720p" addtv "rustd-news-500" "Russia Today News 500k" "rtsp://hdn.octoshape.net/er-rt/ch1_240p" addtv "rustd-news-700" "Russia Today News 700k" "rtsp://hdn.octoshape.net/er-rt/ch1_320p" addtv "rustd-news-1000" "Russia Today News 1M " "rtsp://hdn.octoshape.net/er-rt/ch1_480p" addtv "rustd-news-1500" "Russia Today Documentary 1,5M " "rtsp://hdn.octoshape.net/er-rt/ch1_720p" caltv "rtvs1-950" "RTVS Jednotka 950k" "helper-rtvs 1 950272" caltv "rtvs1-1700" "RTVS Jednotka 1,5M" "helper-rtvs 1 1667072" caltv "rtvs1-2700" "RTVS Jednotka 2,5M" "helper-rtvs 1 2691072" caltv "rtvs1-5300" "RTVS Jednotka 5,3M" "helper-rtvs 1 5251072" caltv "rtvs2-950" "RTVS Dvojka 950k" "helper-rtvs 2 950272" caltv "rtvs2-1700" "RTVS Dvojka 1,5M" "helper-rtvs 2 1667072" caltv "rtvs2-2700" "RTVS Dvojka 2,5M" "helper-rtvs 2 2691072" caltv "rtvs2-5300" "RTVS Dvojka 5,3M" "helper-rtvs 2 5251072" caltv "rtvs24-950" "RTVS 24 950k" "helper-rtvs 3 950272" caltv "rtvs24-1700" "RTVS 24 1,5M" "helper-rtvs 3 1667072" caltv "rtvs24-2700" "RTVS 24 2,5M" "helper-rtvs 3 2691072" caltv "rtvs24-5300" "RTVS 24 5,3M" "helper-rtvs 3 5251072" caltv "rtvso-950" "RTVS O 950k" "helper-rtvs 4 950272" caltv "rtvso-1700" "RTVS O 1,5M" "helper-rtvs 4 1667072" caltv "rtvso-2700" "RTVS O 2,5M" "helper-rtvs 4 2691072" caltv "rtvso-5300" "RTVS O 5,3M" "helper-rtvs 4 5251072" caltv "rtvs-nrsr-950" "RTVS NRSR 950k" "helper-rtvs 5 950272" caltv "rtvs-nrsr-1700" "RTVS NRSR 1,5M" "helper-rtvs 5 1667072" caltv "rtvs-nrsr-2700" "RTVS NRSR 2,5M" "helper-rtvs 5 2691072" caltv "rtvs-nrsr-5300" "RTVS NRSR 5,3M" "helper-rtvs 5 5251072" caltv "rtvs-live-950" "RTVS Live 950k" "helper-rtvs 6 950272" caltv "rtvs-live-1700" "RTVS Live 1,5M" "helper-rtvs 6 1667072" caltv "rtvs-live-2700" "RTVS Live 2,5M" "helper-rtvs 6 2691072" caltv "rtvs-live-5300" "RTVS Live 5,3M" "helper-rtvs 6 5251072" caltv "rtvs-sport-950" "RTVS Šport 950k" "helper-rtvs 15 950272" caltv "rtvs-sport-1700" "RTVS Šport 1,5M" "helper-rtvs 15 1667072" caltv "rtvs-sport-2700" "RTVS Šport 2,5M" "helper-rtvs 15 2691072" caltv "rtvs-sport-5300" "RTVS Šport 5,3M" "helper-rtvs 15 5251072" caltv "ta3-950" "TA3 950k" "helper-ta3 950272" caltv "ta3-1700" "TA3 1,7M" "helper-ta3 1667072" caltv "ta3-2700" "TA3 2,7M" "helper-ta3 2691072" addtv "tvba" "TV Bratislava" "https://youtu.be/xzH8v2VNc7M" addtv "wau-1000" "TV WAU 1M" 'https://nn.geo.joj.sk/live/hls/wau-360.m3u8' addtv "wau-1500" "TV WAU 1,5M" 'https://nn.geo.joj.sk/live/hls/wau-540.m3u8' # Parse the parameters if [ "$1" = '-l' ]; then list; fi if [ \( $# = 0 \) -o \( "${1:0:1}" = '-' \) ]; then help; fi # Search for a TV program if [ $# -ge 1 ]; then for ((I=0; ${#PRGM[@]} - I; I=I+1)); do if [ "$1" = "${PRGM[$I]}" ]; then # The TV program found MYURL="${URL[$I]}"; if test -z "$MYURL" && test -n "${HELPER[$I]}"; then # URL undefined, try to get it by a helper ${HELPER[$I]}; if [ $? -gt 0 ]; then echo "Chyba: Nelze získat URL proudu: Pomocná funkce ${HELPER[$I]} selhala" exit 1; fi fi if test -z "$MYURL" && test -n "${STREAMER[$I]}"; then # URL undefined, use an existing streamer MYSTREAMER="${STREAMER[$I]}" fi MYEXTRA="${EXTRA[$I]}"; MYTITLE="${TITLE[$I]}"; break; fi done if test -z "${MYURL}" && test -z "$MYSTREAMER"; then echo "Chyba: Program „$1“ nebyl nalezen" echo 'Nápovědu získáte zavoláním programu bez parametrů.' exit 1 fi fi shift; # Go test -n "$DIRECT_STREAM" && unset http_proxy if test -n "$MYURL"; then if [ "${MYURL: -5}" = '.m3u8' ]; then ISAPLAYLIST=1; fi case "$PLAYER" in mplayer|mplayer2) set -x "$PLAYER" -cache "$CACHE" -title "$MYTITLE" $MYEXTRA "$@" \ ${ISAPLAYLIST:+-fixed-vo -playlist} "$MYURL" ;; mpv|mpv08) set -x mpv --cache "$CACHE" --title "$MYTITLE" $MYEXTRA "$@" "$MYURL" ;; mpv09) set -x mpv --cache="$CACHE" --title="$MYTITLE" $MYEXTRA "$@" "$MYURL" ;; mpv030) set -x mpv --cache=yes --demuxer-max-bytes="${CACHE}k" --title="$MYTITLE" \ $MYEXTRA "$@" "$MYURL" ;; *) set -x "$PLAYER" "$@" "$MYURL" ;; esac else case "$PLAYER" in gst123) echo "Přehrávač „$PLAYER“ neumí přehrávat ze standardního vstupu." exit 1 ;; mplayer|mplayer2) $MYSTREAMER | \ "$PLAYER" -cache "$CACHE" -title "$MYTITLE" $MYEXTRA "$@" \ -noconsolecontrols - ;; mpv) $MYSTREAMER | \ "$PLAYER" --cache "$CACHE" --title "$MYTITLE" $MYEXTRA "$@" \ --no-consolecontrols - ;; mpv08) $MYSTREAMER | \ mpv --cache "$CACHE" --title "$MYTITLE" $MYEXTRA "$@" - ;; mpv09) $MYSTREAMER | \ mpv --cache="$CACHE" --title="$MYTITLE" $MYEXTRA "$@" - ;; mpv030) $MYSTREAMER | \ mpv --cache=yes --demuxer-max-bytes="${CACHE}k" \ --title="$MYTITLE" $MYEXTRA "$@" - #mpv $MYEXTRA "$@" - ;; *) $MYSTREAMER | "$PLAYER" "$@" /dev/stdin ;; esac fi # vim: textwidth=0