[FFmpeg-user] Can ffmpeg record video from this kind of URL?

Reino Wijnsma rwijnsma at xs4all.nl
Thu Sep 2 00:31:13 EEST 2021


On 2021-09-01T08:14:02+0200, Bo Berglund <bo.berglund at gmail.com> 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?

On 2021-08-29T17:41:49+0200, Reino Wijnsma <rwijnsma at xs4all.nl> wrote:
> $ ffmpeg -hide_banner -i "$(xidel -s "https://www.livenewsmag.com/msnbc-news-live-stream/" -e 'parse-json(//script/extract(.,"playerInstance.setup\((.+)\)",1,"s"),{"liberal":true()})/file')"

???

Instead of parsing the (pseudo) JSON, you can also try to extract the HLS manifest directly:

$ xidel -s "https://www.livenewsmag.com/msnbc-news-live-stream/" -e 'extract(//script,"https.+m3u8")'
https://1420543146.rsc.cdn77.org/0YMlFFbIvOHfq9uQgKZexg==,1630548377/LS-ATL-54548-10/index.m3u8

-- 
Reino



More information about the ffmpeg-user mailing list