$url=Read-Host "Input URL"
$wc=New-Object System.Net.WebClient
$source=$wc.DownloadString($url)
$source -match "<source src=""(.*?)""" | Out-Null
$fileurl=$matches[1]
$source -match """vid"":(.*?)," | Out-Null
$filename=$matches[1]+".ts"
&.\ffmpeg -i $fileurl -c copy $filename