Skip to content

Instantly share code, notes, and snippets.

@danfinlay
Last active October 22, 2024 17:01
Show Gist options
  • Save danfinlay/7357098 to your computer and use it in GitHub Desktop.
Save danfinlay/7357098 to your computer and use it in GitHub Desktop.
How to download a streaming video with Google Chrome

How to download streaming video

Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.

Open Developer Tools

From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:

1.  (On a mac): Command-option-J
2.  (On a PC): Control-alt-J
3.  (In your menu on a mac): Open View > Developer > Developer Tools
4.  (On any Chrome machine): The far right menu button, to the right of the URL bar, you can press that, go down to "Tools", then open the "Developer Tools".

Monitor Network Traffic

By clicking the "Network" tab, you'll get a list of all files requested since you opened that tab. Our goal is to isolate the web request that returns the video of your choice. At this point, you can navigate to the video you want, and I'd probably press the "clear" button in the developer tools right before finally pressing the "Play" button on the video, so it can be one of the only transfers you see.

Identify the video transfer

It should be easy to recognize the video transfer: It has a mime type of video, it's a transfer that should take a lot longer than the rest, etc.

Once you've found it, click on the request name, which represents the HTTP request that was sent to the server for the video file.

Identify the Request URL

The first thing in the first tab of the request viewer should be the Request URL in the Headers tab. You can just copy this URL into another video, and now if you right click the video, it should include a Save option, unlike when the whole thing was wrapped in Flash or whatever.

Enjoy!

@jeppoo1
Copy link

jeppoo1 commented Aug 2, 2021

@MarkJThomas sometimes you have to reload the video page on your browser several times for the m3u8 and others to appear.

@steffiland
Copy link

Great, thx! No need to install a shitty snipping vid-dl-addon into chrome :)

@ari-xb
Copy link

ari-xb commented May 4, 2022

as @jeppoo1 mentioned, you need the very start(section) network request of the video/streaming.
a quick method that worked for me (Chrome & OSX) was to use the URL.m3u8 and simply rename it from .m3u8 to .mp4, hit enter, vid loads, right click 'save video as' or in video menu click download, done.

I also found the first video 'section' network request named "seg-1-v1-a1.ts" (look for something similar), clicked on it.
Right at the top "Request URL: https://embed-fastly.wistia.com/deliveries/sjdnajn3dk4i4usesfsjks.m3u8/seg-1-v1-a1.ts"
I put the above URL up to the ".m3u8" in the browser and it downloaded the .m3u8 (playlist) file, if you want it, or like I said at this point, rename it to .mp4

@Thedeur
Copy link

Thedeur commented May 16, 2022

Is there a way to download Sharepoint videos? Teams recordings specifically, which get saved to Sharepoint for only 3 weeks. I've found my way to this thread from Google, the current methods don't work.

@bintarakusuma
Copy link

Hi... have u found the method of dnlding nd decryption... I am searching fr this too rental mobil jogja...

@PetrusVermaak
Copy link

Have not found a working solution yet.

@mitzvahguy
Copy link

how to down load HTTP live stream HLS video/m3u8 streaming video/f4v embedded video step by step 1.down load chrome web extension from search on crome web store hls down loader. 2.open streaming video . the hls down loader will grab the root filelink on server. copy it.

or other option is developer tools>network>clear then press play tab . Just after video starts the developer tool window will show link to initial root file on server which ends with playlist on it .just like https://*****************.com/vod/definst/1_708.f4v/playlist.m3u8.

.3.install m3u8loader by yourok 1.2.146 on android phone from play store .or search web for it. 4. insert above link which ends with playlist.m3u8 in android soft ware at url link. click add .if web site of streaming media has user name and password ,them log in to it on android chrome browser. 5.press down load .It will down load file with out breaks as mp4 file . It will not have .ts extensions as multiple broken files it has resume function if link is broken 6. if you have to down load multiple file from same web site change number before .f4v and after 1_ in the link. you can get that number by moving cursor on to file that you want to download.

please let me know any problem

Thank you @dineshvjoshi -- your explanation of how to capture .m3u8 streaming video file type from BoxCast using HLS Downloader worked perfectly for me yesterday (March 2nd, 2023). I was able to capture the footage of a funeral service of a friend; thank you.

@grimes1
Copy link

grimes1 commented May 14, 2023

Downloading videos from certain websites can be stressful. It's almost the same situation with downloading Spotify playlists without premium.

@zafarnayab
Copy link

zafarnayab commented May 20, 2023

@danfinlay What if request are sent in segments, As in my case video request are sent in multiple segments.

Screenshot 2023-05-20 at 11 13 47 PM

@zaphod77
Copy link

zaphod77 commented Nov 13, 2023

99% of the time, if it's sent in segments, it's because there's an m3u8 file with a list of segments. the trick is to grab that file, which will tell you which segment is which. :) there are extensions to do that.

There is stuff this does NOT work on.

Specifically, there are cases where there IS no direct URL, and the only access to the video file is through a script that verifies both referrer and a one time token created when the player is opened. The player autoloads the url so by the time it's in network resources, the token is already used, and trying to copy the link doesn't work. even if you try to view source, by the time you see the token, it's too late, because the token is only valid to start the stream for a few seconds, even if it wasn't activated immediately.

How do you beat this one, and force the browser to download instead of play?

@nmaxcom
Copy link

nmaxcom commented Oct 22, 2024

@zaphod77 I'm a newbie in all of this, but probably you'd need something similar to what's used to rip Netflix videos and such. An entire app that talks to the server you want to get the media from as if it were Chrome. You give it your cookies and target and the code has to pretend to be streaming (as far as the server knows) but in fact is loading it to a local file.
Something like this: https://github.com/Divxeas/Netflix-videos-downloader1/blob/main/services/netflix.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment