If you’re able to watch the video online (stream) then logically you must be able to download it.

A few video / streaming websites can put up a lot of protection to make sure the video is not downloaded, but at the end of the day you could always record it playing from your phone like a CAM version of a movie lol, or even setup a screen recorder.

But I’m better than that, and want to get the source of the video for best audio/video quality.

So usually it’s quite easy to grab a video off facebook for example, you can just google “facebook video downloader” and same for youtube, although I do like 4k Video Downloader, it’s a nice app.

Or you just go to the Developer tools in the browser and inspect the video player element and you’ll find the url source there, for example the video on my home page:

But this time I came across a blob file:

<video src=”blob:url”

So I started checking how to download blob files, but doesn’t seem like you can, as it’s created from JS code and stored in your browsers memory.

So I checked the Network tab in the Developer Tools, and saw that it must be here, after some reading, I found that if you filtered by “m3u8” this gives you the so what playlist of the video file as the streaming video is broken up into smaller videos.

Once you’ve copied the Request URL, open up VLC player (every Nerd has this) -> Open Network, paste the URL, and tick Streaming/Saving.

Go into Settings and click Browse to save the file in your preferred location.

Click open and you’ll see the VLC progress/player bar moving which indicates it’s saving the file, took about 30s for a 4min video, so could be a little while for a big stream.

Alternative method:

Also if there is no .m3u8 playlist file, wget is your saviour.

You’ll notice in your Network tab in Developer tools, filtered by Media, you’ll notice a load of .ts video files.

Make sure you had the Developer Tools open when loading the page with the video, as you could miss the beginning of the video’s files.

This went from 124.ts to 149.ts so we execute this command:

wget -r https://cdn.example.com/123/abc{124..149}.ts

These files should have downloaded, now use ls and cd to get into the correct directory and combine the files by making a list:

echo 'AT_2055066-audio_eng=128000-video=1001000-'{124..149}.ts | tr " " "\n" > tslist

and then combing the files from the list:
while read line; do cat $line >> output.ts; done < tslist

Hope someone finds this interesting/useful (:

Categories: Code

11 Comments

David · December 30, 2018 at 7:56 pm

I just wanted to say Thanks! It was very helpful.
: )

Tang · February 10, 2019 at 5:58 am

It works! Thank you!

Hasan Omar · June 2, 2019 at 11:09 am

Thanks a lot very handful and informative.

chm · June 19, 2019 at 8:25 pm

It’s been long since you posted this but I’ll share what i found out on my quest for getting blob videos 😉

Once you have m3u8 url you can use ffmpeg to download it like so:
ffmpeg -i https://v.pinimg.com/videos/v2/hls/19/ff/25/19ff25df442024770db2b0c4ec6cb75d_mobile.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4

I found it in a gist on github but can’t find the author anymore. Sorry.

    root · July 2, 2019 at 12:59 am

    Thanks for sharing (:

Rob · August 25, 2019 at 2:06 am

what about this?
https://www.osmosis.org/learn/Myocardial_infarction
can you help me?

    root · September 12, 2019 at 9:32 am

    This seems more tricky because of the authentication it uses, I would suggest loading the whole video and finding the ts files in your browsers cache folder then merging all the files together.

      Rob · September 27, 2019 at 12:14 pm

      Thanks for your solution.

Rob · August 27, 2019 at 8:43 pm

Why did you clean my comment?

    root · September 12, 2019 at 9:31 am

    The comment wasn’t cleaned, just hadn’t been approved yet.

      Rob · September 27, 2019 at 12:14 pm

      Oh yes. Sorry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.