forked from sunsettrack4/zattoo_tvh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipe.sh
8 lines (8 loc) · 1.71 KB
/
pipe.sh
1
2
3
4
5
6
7
8
session=$(<user/session)
curl -i -s -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Accept: application/x-www-form-urlencoded" --cookie "$session" --data "stream_type=hls&https_watch_urls=True×hift=10800" https://PROVIDER/zapi/watch/live/CID_CHANNEL | grep "{" | sed 's/.*"stream": {"url": "//g;s/", .*//g;' > work/chlink && PIPE=$(sed '/zahs/{s/https:/http:/g;s/zahs.tv.*/zahs.tv/g;s/\//\\\//g;};/akamaized/{s/https:/http:/g;s/akamaized.net.*/akamaized.net/g;s/\//\\\//g;}' work/chlink) && curl -s $(<work/chlink) | \
# grep -E "live-8000|live-5000|live-3000|live-2999|live-1500" | sed "2,5d;s/.*/#\!\/bin\/bash\n\/usr\/bin\/ffmpeg -loglevel fatal -i $PIPE\/& -vcodec copy -acodec copy -f mpegts -tune zerolatency -preset normal -metadata service_name='CHANNEL_NAME' pipe:1/g;" > chpipe.sh
# grep -E "live-3000|live-2999|live-1500" | sed "2,3d;s/.*/#\!\/bin\/bash\n\/usr\/bin\/ffmpeg -loglevel fatal -i $PIPE\/& -vcodec copy -acodec copy -f mpegts -tune zerolatency -preset normal -metadata service_name='CHANNEL_NAME' pipe:1/g;" > chpipe.sh
# grep "live-1500" | sed "s/.*/#\!\/bin\/bash\n\/usr\/bin\/ffmpeg -loglevel fatal -i $PIPE\/& -vcodec copy -acodec copy -f mpegts -tune zerolatency -preset normal -metadata service_name='CHANNEL_NAME' pipe:1/g;" > chpipe.sh
# grep "live-900" | sed "s/.*/#\!\/bin\/bash\n\/usr\/bin\/ffmpeg -loglevel fatal -i $PIPE\/& -vcodec copy -acodec copy -f mpegts -tune zerolatency -preset normal -metadata service_name='CHANNEL_NAME' pipe:1/g;" > chpipe.sh
# grep "live-600" | sed "s/.*/#\!\/bin\/bash\n\/usr\/bin\/ffmpeg -loglevel fatal -i $PIPE\/& -vcodec copy -acodec copy -f mpegts -tune zerolatency -preset normal -metadata service_name='CHANNEL_NAME' pipe:1/g;" > chpipe.sh
bash chpipe.sh