On Wed, Sep 01, 2021 at 08:14:02 +0200, Bo Berglund wrote: > 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?
There's often a lot of magic involved in extracting the video URLs from webpages - parsing JavaScript, downloading and parsing JSON files, re-using cookies and referrers, and so on. Please do use the tool youtube-dl, or the maintained fork yt-dlp, to extract these URL or even to download the actual videos. The tool figures out the formats, the URLs, and often even the de-encryption (not DRM though) of many many web pages. (It can even call ffmpeg to download, and will do so by default in many cases.) To get the (or a) URL: $ youtube-dl -g http://website-of-choice/page If youtube-dl doesn't support a certain page, I load the page in Chrome and look for the original file or m3u8 on the Network tab of the developer console (Ctrl+Shift+C), and then pass that to ffmpeg. Cheers, Moritz _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".