本帖最後由 john_linux 於 2021-11-22 22:21 編輯
想變自己部pi做now新聞台機項盒
via HKEPC IR Pro 3.6.1 - Android(3.3.1)
apple_999911 發表於 2021-11-22 09:26 PM 
#千祈唔好copy全部command之後一次過貼上,否則我唔負責。
#part 1- sudo apt install jq ffmpeg vlc
複製代碼 #part 2
#ref: https://askubuntu.com/questions/ ... -ssl-security-level- #開文字編輯器
- sudo nano /etc/ssl/openssl.cnf
複製代碼 #You need to add this to the beginning of your config file- openssl_conf = default_conf
複製代碼 #And then this to the end- [default_conf]
- ssl_conf = ssl_sect
- [ssl_sect]
- system_default = system_default_sect
- [system_default_sect]
- MinProtocol = TLSv1.2
- CipherString = DEFAULT:@SECLEVEL=1
複製代碼- export OPENSSL_CONF=/etc/ssl/openssl.cnf
複製代碼 #part 3- #貼上以下內容
- until $(curl --output /dev/null --silent --head --fail http://duckduckgo.com); do
- printf '.'
- sleep 5
- done
- LINK=`curl -X POST -d '{"channelno":"332","mode":"prod","audioCode":"","format":"HLS","callerReferenceNo":"20140702122500"}' -H 'Content-Type: application/json' https://hkt-mobile-api.nowtv.now.com/09/1/getLiveURL | jq -r ".asset.hls.adaptive[0]"`
- ffmpeg -re -i $LINK -fflags +genpts+igndts -c copy -f mpegts udp://localhost:1234 &
- vlc udp://@:1234
複製代碼 ###如果冇error,上面只需做1次,下面就每次睇now tv新聞台都做1次。
#如果睇now tv新聞台睇到error(或者一開就error),記住reboot能治百病(誤)。#參考並修改自:(3樓有寫) |