Shell脚本获取虎牙直播视频流
作者:互联网
url='https://www.huya.com/adgll' stream=$( curl -sk $url | grep -Eo '"stream": "(.*)"' ) streamJson=$( echo {$stream} | jq -M -r '.stream | @base64d' ) HlsUrls=( $(echo $streamJson | jq -M -r '.data[].gameStreamInfoList[]|.sFlvUrl +"/"+ .sStreamName+"."+.sFlvUrlSuffix +"?"+.sFlvAntiCode' | sed 's/amp;//g') ) ffplay -hide_banner -user_agent "HYSDK(Windows, 20000308)" -i "${HlsUrls[0]}" -vf scale=-1:720
标签:Shell,stream,url,视频流,jq,echo,虎牙,+.,streamJson 来源: https://www.cnblogs.com/nlsoft/p/13494205.html