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

Bo Berglund bo.berglund at gmail.com
Wed Sep 1 09:14:02 EEST 2021


On Mon, 30 Aug 2021 22:56:49 +0300, Anatoly <anatoly at kazanfieldhockey.ru> wrote:

>On Mon, 30 Aug 2021 08:20:38 +0200
>Bo Berglund <bo.berglund at gmail.com> wrote:
>
>> On Sun, 29 Aug 2021 17:41:49 +0200, Reino Wijnsma
>> <rwijnsma at xs4all.nl> wrote:
>> 
>> >From where I am I don't think I'm allowed to access the stream.  
>> 
>> Yes, it seems like you are only allowed to *view* the video through
>> your browser embedded into the full page...
>>
>You just need to set "Referer" header in your http request to url of
>page that embeds that video.
>ffmpeg -referer "https://www.livenewsmag.com/msnbc-news-live-stream" -i
>"https://1420543146.rsc.cdn77.org/J2SMCND-re6j5PPYbi2Hiw==,1630371979/LS-ATL-54548-10/index.m3u8"
>-c copy msnbc-rec-1.mp4
>

THANK YOU VERY MUCH for this comment!

The -referer argument solved the problem of allowing access to the m3u8 stream.

Related question:
-----------------
How do I extract the proper m3u8 URL from the webpage in the best/safest way?
Some of these pages display a scrolling long list of items when one presses the
F12 function key in FireFox and it is not obvious to me what I should try.
And there are also URL:s ending with .ts in that scrolling list, but these
change all the time so they are probably just short sections of the video,
right?

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?


-- 
Bo Berglund
Developer in Sweden



More information about the ffmpeg-user mailing list