Ahoj chlapi, tak jsem ten skript vyzkousel a pise mi to tohle... Co zase delam blbe?
Kam do tempu se ma ten playlist stahnout? Nikde ho tam totiz nemuzu najit.
Diky za Vasi pomoc
2018-09-01 23:16:14.956 mpegts: o2tv.playlist.m3u8 - ČT sport HD in O2TV - tuning on IPTV
2018-09-01 23:16:14.960 spawn: Executing "/storage/.kodi/userdata/addon_data/service.playlist.o2tv/test.sh"
2018-09-01 23:16:14.961 subscription: 000B: "scan" subscribing to mux "o2tv.playlist.m3u8 - ČT sport HD", weight: 6, adapter: "IPTV", network: "O2TV", service: "Raw PID Subscription"
2018-09-01 23:16:14.965 iptv: stdin pipe unexpectedly closed: No data
2018-09-01 23:16:29.956 mpegts: o2tv.playlist.m3u8 - ČT sport HD in O2TV - scan no data, failed
2018-09-01 23:16:29.956 subscription: 000B: "scan" unsubscribing
Skript vypada takto...
Kam do tempu se ma ten playlist stahnout? Nikde ho tam totiz nemuzu najit.
Diky za Vasi pomoc
2018-09-01 23:16:14.956 mpegts: o2tv.playlist.m3u8 - ČT sport HD in O2TV - tuning on IPTV
2018-09-01 23:16:14.960 spawn: Executing "/storage/.kodi/userdata/addon_data/service.playlist.o2tv/test.sh"
2018-09-01 23:16:14.961 subscription: 000B: "scan" subscribing to mux "o2tv.playlist.m3u8 - ČT sport HD", weight: 6, adapter: "IPTV", network: "O2TV", service: "Raw PID Subscription"
2018-09-01 23:16:14.965 iptv: stdin pipe unexpectedly closed: No data
2018-09-01 23:16:29.956 mpegts: o2tv.playlist.m3u8 - ČT sport HD in O2TV - scan no data, failed
2018-09-01 23:16:29.956 subscription: 000B: "scan" unsubscribing
Skript vypada takto...
Kód:
#! /bin/bash
source=$*
tempplaylist=$(mktemp -u)".m3u8"
stream=$(grep -A 1 "${source}$" /storage/.kodi/userdata/addon_data/service.playlist.o2tv/o2tv.generic.m3u8 | head -n 2 | tail -n 1)
wget -qO ${tempplaylist} ${stream}
streamcount=$(cat ${tempplaylist} | grep -Eo "(http|https)://[\da-z./?A-Z0-9\D=_-]*" | wc -l)
streamcount=$((streamcount-1))
if [ "$streamcount" = "-1" ]; then streamcount=0; fi
ffmpeg -protocol_whitelist file,http,https,tcp,tls -fflags +genpts -loglevel fatal -i ${tempplaylist} -probesize 32 -reconnect_at_eof 1 -reconnect_streamed 1 -c copy -map p:${streamcount}? -f mpegts -tune zerolatency -bsf:v h264_mp4toannexb,dump_extra -mpegts_service_type digital_tv pipe:1