[FFmpeg-user] Can ffmpeg record video from this kind of URL?
Bo Berglund
bo.berglund at gmail.com
Wed Sep 1 20:00:52 EEST 2021
On Wed, 1 Sep 2021 16:30:00 +0300, anatoly at kazanfieldhockey.ru wrote:
>> Is there a command line call I can make to extract the m3u8 URL
>> automatically so
>> it can be used in a script only supplied the main page URL?
>To get url of the first m3u8 from the page (this page actually has only one)
>curl "https://www.livenewsmag.com/msnbc-news-live-stream/" | grep -o -e
>"https://.\+m3u8" | head -n 1
Thanks, this works inasmuch as it shows the URL on screen from where I can copy
the URL manually.
However it looks like this when executed:
$ curl "https://www.livenewsmag.com/msnbc-news-live-stream/" | grep -o -e
"https://.\+m3u8" | head -n 1
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 86975 100 86975 0 0 375k 0 --:--:-- --:--:-- --:--:-- 374k
https://1420543146.rsc.cdn77.org/tsOQo0dAAnGr5jKtXe_k5g==,1630526780/LS-ATL-54548-10/index.m3u8
So curl is outputting stuff during its probe that is also on the terminal
output...
But changing it to this:
$ curl -s "https://www.livenewsmag.com/msnbc-news-live-stream/" | grep -o -e
"https://.\+m3u8" | head -n 1
removes all that fluff and I get exactly the end result!
I have now cereated a script, which updates the URL-file with the current items
for the given URL.
This can be called before actually using the video URL for download making sure
the m3u8 URL is current.
Thanks again!
--
Bo Berglund
Developer in Sweden
More information about the ffmpeg-user
mailing list