Categories: Development

How to download videos of websites with FFmpeg

IF you don’t know or have FFmpeg installed here is the post for you, otherwise follow along to learn how to grab videos from news or sports websites.

I like to use Chrome for this as I find their developer tools easier to handle than firefoxes. Navigate to the website or video page and open up the developer console, either by right clicking and clicking “inspect” or pressing ctrl+shift+i

Now click on the network tab, type in “m3u8” and make sure ‘all’ is selected. Now click play on the video and you should see some URL’s pop up.

9 times out of 10 it will be the first URL and/or the one that has “master” in it, right click this and click copy.

Chrome developer console m3u8 url

Now open up your FFmpeg batch command and past the link as the input (-i) and since mostly these videos are short you’re going to want lossless quality so a batch command like this is ideal:

ffmpeg -i "https://somem3u8linkfromwebsite.master.m3u8" -c:v libx264 -preset slow -crf 22 "saveas.mp4"

Save it and then double click it to download the video!

NOTE: If nothing comes up when filtering m3u8 in the network tab try “mp4” and sometimes the different URL’s will be for different qualities so pay notice to this.

Share

Recent Posts

Kennington reservoir drained drone images

A drained and empty Kennington reservoir images from a drone in early July 2024. The…

2 years ago

Merrimu Reservoir drone images

Merrimu Reservoir from drone. Click images to view larger.

2 years ago

Early September spring shots

Some early September spring shots from a bushwalk, It is still too early for wildflowers.

3 years ago

Cloning an NVMe to SK Hynix Platinum P41 NVMe

I recently needed to clone over a smaller NVMe to a 2TB SK Hynix Platinum…

3 years ago

Using Laravel’s deleteDirectory to delete folders and their contents

If you ever needed a simple solution in Laravel to delete an entire directory and…

3 years ago

How to allow only 1 user to register in a Laravel application

How to enforce only one user to register or be registered in a Laravel web…

3 years ago