How would that apply to a RPI 4(64bit) or Orange PI(32bit).
Where do i put the script?
thx.
Steen
I am not an expert, I just know that each PLUTO TV channel sends multiple hls (HTTP Live Streaming) media streams with different qualities and resolutions; these streams are interrupted to play ads, this affects the broadcast timestamps which drive normal players crazy including Kodi plugins and addons. Solving this to add them to tvheadend as normal TV channels has been a major challenge for me, I think I finally got it with this script:
Bash Display More#!/bin/sh # tvhdecode.sh script ######################## # # /storage/.config/tvhdecode.sh (for docker linuxserver/tvheadend containers) # # universal-script for play anything # # usage in tvheadend: pipe:///storage/.config/tvhdecode.sh {PLUTO,SAMSUNG,RAKUTEN,IPTV} [URL] # or pipe:///storage/.config/tvhdecode.sh [URL] # # Warnings: # - due to LE limitations is necessary to build a mini universe inside linuxserver/tvheadend container # - streamlink, ffmpeg and cvlc are installed and updated on container # - LE's storage directory is also mounted inside the container (-v /storage:/storage command) # - config directory of the container has the streamlink and cvlc configuration files # - decoding: first try only streamlink, after try streamlink+cvlc and finally try streamlink+ffmpeg+cvlc # ######################## streamlink --config /config/streamlink.conf $1 | \ ffmpeg -i pipe: -c copy -f mpegts pipe: | \ cvlc --config /config/cvlc.conf fd://0 exit ######################## # # streamlink.conf # ######################## # stdout # quiet # default-stream=1080p,720p,3100k,2100k,best # player-no-close # ffmpeg-ffmpeg=/usr/bin/ffmpeg # ffmpeg-video-transcode=copy # ffmpeg-audio-transcode=copy # ffmpeg-fout=mpegts # http-no-ssl-verify ######################## # # cvlc.conf # ######################## # network-caching=2000 # no-playlist-cork # quiet # repeat # sout-transcode-vcodec=copy # sout-transcode-acodec=copy # sout-standard-access=file # sout-standard-mux=ts # sout=#standard{dst=-} # no-video # no-audio ######################## # # pipedtvh.sh # # automatic piped playlist generator for docker linuxserver/tvheadend # # usage: pipedtvh.sh {PLUTO,SAMSUNG,RAKUTEN,IPTV} playlist.m3u -> created file: playlist.m3u.tvh.m3u # ######################## #!/bin/sh # pipedtvh.sh script for pipe playlist to tvheadend # if [[ -z $1 ]]; then # echo "PLAYLIST ERROR!" # else # sed '/#EXTM3U/s/http/TEMP/' $1 > $1.tvh.m3u # sed -i '/#EXTINF/!s/http/pipe:\/\/\/storage\/.config\/tvhdecode.sh http/' $1.tvh.m3u # sed -i '/#EXTM3U/s/TEMP/http/' $1.tvh.m3u # fi
I guess any programmer will understand my solution, the origin of the problem, and maybe he will be able to give a better solution for HLS streams with ads.