How do we download a blob url video
Solution 1
I just came up with a general solution, which should work on most websites. I tried this on Chrome only, but this method should work with any other browser, though, as Dev Tools are pretty much the same in them all.
Steps:
- Open the browser's Dev Tools (usually F12, or Ctrl-Shift-I, or right-click and then Inspect in the popup menu) on the page with the video you are interested in.
- Go to Network tab and then reload the page. The tab will get populated with a list of requests (may be up to a hundred of them or even more).
- Search through the names of requests and find the request with
.m3u8
extension. There may be many of them, but most likely the first or largest is the one you are looking for. It may have any name, e.g.playlist.m3u8
. - Click its name to open the request. Under the Headers subsection you will see request's full URL in the Request URL field. Copy it.
- Extract the video from m3u8. There are many ways to do it, I'll give you those I tried, but you can google more by "download video from m3u8".
- Option 1. If you have VLC player installed, feed the URL to VLC using the "Open Network…" menu option. I'm not going to go into details on this part here, there are a number of comprehensive guides in many places, for example, here. If the page doesn't work, you can always google another one by "vlc download online video".
- Option 2. If you are more into command line, use FFMPEG or your own script, as directed in this SuperUser question.
Solution 2
Use the HLS Downloader Google Chrome extension to get the link to the M3U playlist. Its icon in the browser bar will show the number of playlists found on the current webpage. Clicking on the icon you can then see a list of the playlist link and then use the copy button next to a link to copy it.
Then use the youtube-dl program to download the file.
youtube-dl --all-subs -f mp4 -o "file-name-to-save-as.mp4" "https://link-from-Google_Chrome-HLS_Downloader_extension"
Explanation of command line options:
-f mp4 = Output format mp4
--all-subs = Download all subtitles
-o "file-name-to-save-as.mp4" = Name of the file to save the video as.
"https://link-from-Google_Chrome-HLS_Downloader_extension" = This is the link to the playlist you copied from the HLS Downloader extension.
If you use the same configuration options all the time for youtube-dl you may want to take a look at the configuration options for youtube-dl, as this can save you a lot of typing.
The HLS Downloader extension is free and open source under the MIT license if you want to see the code it can be found on its project page on Github.
Solution 3
There are a variety of ways to get the URL .m3u8
either by viewing the source of a page, looking at the Network tab in the Developer Tools in Chrome, or using a plugin such as HDL/HLS Video Downloader.
With the .m3u8 URL in hand you can then use ffmpeg
to download the video to a file like so:
$ ffmpeg -i 'https://url/to/some/file.m3u8' -bsf:a aac_adtstoasc \
-vcodec copy -c copy -crf 50 file.mp4
Solution 4
This is how I manage to "download" it:
- Use inspect-element to identify the URL of the M3U playlist file
- Download the M3U file
- Use VLC to read the M3U file, stream and convert the video to MP4
In Firefox the M3U file appeared as of type application/vnd.apple.mpegurl
The contents of the M3U file would look like:
Open VLC medial player and use the Media => Convert option. Use your (saved) M3U file as the source:
Solution 5
The process can differ depending on where and how the video is being hosted. Knowing that can help to answer the question in more detail.
As an example; this is how you can download videos with blob links on Vimeo.
- View the source code of the video player iframe
- Search for mp4
- Copy link with token query
- Download before token expires
SidD
Updated on July 08, 2022Comments
-
SidD almost 2 years
I want to download a video whose URL is not a simple MP4 file, but rather a blob type for example:
<video id="playerVideo" width="450px" autoplay="autoplay" height="338px" style="height:100%;width:100%;" class="mejs-rai-e" src="blob:http://www.example.com/d70a74e1-0324-4b9f-bad4-84e3036ad354"> </video>
Is there any chrome extension or software which can be used to download videos from blob URLs?
-
eapo over 6 yearsThis method works well even if the filetype in the
url
isn't .mp4, just check the header of the file and rename it. -
Admin over 5 yearsGreat tip! It seems that there's no need to download the
m3u8
file - you can just paste the external url as the source. -
Arnaud Tournier over 5 yearsOption 3 is : use the playlist URL directly with youtube-dl, it is very simple !
-
azizj about 5 yearsHow would you use youtube-dl to do it? just
youtube-dl https://....m3u8"
? -
azizj about 5 yearsAlso, does this work for private videos?
-
Gibado almost 5 yearsyoutube-dl also works for mpd files.
-
patricK almost 5 yearsAll time I got 403 when downloading m3u8.. Tryed with youtube-dl, firefox extension, vlc player.. What can I do?
-
Vlad Nikiforov almost 5 yearsLooks like a primitive protection from unauthorized downloads, where the server blocks requests where HTTP Referer header is not set to site name. CURL is your friend: curl -O -e example.com example.com/playlist.3u8
-
Searene over 4 years@patricK You can try adding referer, example:
youtube-dl --add-header Referer: https://www.google.com/referer-page https://google.com/video.m3u8
-
Zhou XF over 4 yearsmind if I ask, how did you open the search bar in the network module and search for the "m3u8"key words.
-
Vlad Nikiforov over 4 years@ZhouXF I usually just hit Ctrl-F (Cmd-F for Mac) while in the network section.
-
pcarvalho about 4 yearson the network tab there's a secondary tab for "Media". it's easier to get the m3u8 file from just a few items.
-
Christopher about 4 yearsThis works really nicely except in my case the MP4 had no sound? Is there a way to resolve this?
-
frederickjh about 4 yearsI have not had his happen. It must be something with the file you are downloading. I believe that the mp4 standard supports multiple audio tracks. Check that there is not another audio track and that the first one is silence.
-
Justin Emlay about 4 yearsGreat extention! so much easier then doing all the run around yourself with m3u8 files and just strait blob files. However I didn't need whatever that youtube thing was. HLS Downloader gives me the video files directly.
-
Robin Hartmann about 4 yearsAnd Option 4: use JDownloader 2 to download the playlist URL, in my opinion this is the easiest way.
-
Sir Von Berker about 4 yearstry adding -x within the options
-
Gwyneth Llewelyn about 4 yearsIn my case, I've tried HLS Downloader with Twitter, and it worked as @Justin said: it gave the video file directly. But I have also tried the suggestions proposed by @Vlad on the other answer — basically doing all the steps manually — with the same results (i.e. getting a working
.MP4
file). -
Gwyneth Llewelyn about 4 years@AzizJaved aye, exactly like that. I haven't tested it on private videos, but if you can see the page where they are, then they work exactly as on a public video. What matters is what you see on the browser: if you can see it, you can copy it. Simple! 😉
-
Firsh - justifiedgrid.com almost 4 yearsDo you guys want an article from me on downloading encrypted HLS videos? It's basically step 3 but with ffmpeg to decrypt and combine ts segments.
-
Canelo Digital almost 4 yearsBest approach yet. The only disadvantage I've encounterfed whas that the 8 minutes m3u8 was divided in 5 second steps, and there was a SSL certificate issue, so I had to press pretty much times "accept certificate"...
-
godblessstrawberry almost 4 yearshere's how you download when you get url with
m3u8
-- just runffmpeg -i "http://example.com/video_url.m3u8" -c copy -bsf:a aac_adtstoasc "output.mp4"
(you need to install it obviously) -
Elias Hasle over 3 yearsI don't know about other platforms, but for Twitter, previewing the .m3u8 file in the "preview" tab of the above view will reveal the URL to the underlying video (.ts) file (relative to the location of the .m3u8 file), which can then be downloaded. I must say Twitter really kills videos with compression (perhaps adjusting severity of compression dynamically by video popularity, server load etc.?)
-
Khadim Ali over 3 yearsA month ago, I was able to download the blob video using this technique. Today, when I tried again for the same video I am not able to find any m3u8 extension file.
-
emazzotta over 3 yearsif there's no audio I recommend setting the video + audio in the
-f
parameter. E.g.-f bestvideo+bestaudio
this solved the problem for me. You can check via the-F
parameter what video and audio options are available. Some sites have videos with different video qualities but with the audio track separated from the video. -
Khadim Ali over 3 yearsUpdate to my comment above. For that blobbed video URL, I had found a .mpd file in media files of the networking tab. The .mpd Request URL was there and I had been able to use that URL to download the video using VLC's network streaming/converting feature.
-
Ryan over 3 years@godblessstrawberry Thanks! You should post this as an answer.
-
relidon over 3 yearsI get "Could not send HEAD request". I am trying to download the subtitles for this trailer at greatcourses
-
frederickjh about 3 years@relidon It looks like the site is blocking the download from outside the web browser. They may be looking for a cookie. I am getting 403 an 405 not allowed HTTP errors. I was able to download it just using the HLS downloader extension. Since it actually has close captions and not subtitles they are embedded in the video. I was able to enable them for playback in VLC.
-
relidon about 3 years@frederickjh would there be a way to find those close captions within the browser (in network tab or something)? or does close captions actually mean they wouldn't be available?
-
relidon about 3 yearsI just downloaded the video using HLS, you are correct. Is there a way to then separate the cc from the downloaded file?
-
coder about 3 yearsStep 5 alternative:you can put the URL copied from the request URL and put it at the browser search bar and it will dwnload the video ( tested in chrome )
-
frederickjh about 3 years@relidon on linux you can use
ccextractor
to do this. -
André M. Faria about 3 yearsHello, this don't work with events.on24, but it's a great extension, helped me a lot
-
AFK about 3 yearsthis works perfectly for O'Reilly Live Events
-
AbHiNaV AgRaWaL almost 3 yearsIf my video has multiple .m3u8 links, how can we concatenate all our downloads into one for a seamless live video experience? I suppose screen share and live talking together will have 2 different .m3u8 files getting generated and so on for others as well. How can all be concatenated?
-
Kamlesh over 2 yearsthere is no mp4 keyword found. Not solved my issue.
-
Kamlesh over 2 years@godblessstrawberry I did not find any
m3u8
extension file inNetwork
tab ofDeveloper Tools
in chrome browser. Could you please suggest me what is the issue? Thanks -
Kamlesh over 2 years@VladNikiforov I did not find any
m3u8
extension file indeveloper tools
of chrome browser. FYI I can play video and video url is Blob type. I am 100% sure. Any suggestion what is the issue and solution? Thanks a lot. -
Kamlesh over 2 yearsNot found any m3u8 file in
developer tools
in chrome. Any suggestion? Thanks -
Kamlesh over 2 years@rick Rick here what is youtube-dl? My videos are not of Youtube website. Please suggest. Thanks
-
Kamlesh over 2 years
HLS Downloader
link url is broken, google says "The requested URL was not found on this server. That’s all we know" Kindly update the link or remove the link. Thanks a lot. -
godblessstrawberry over 2 years@Kamlesh maybe this could help stackoverflow.com/a/55071769/1665293
-
Loenix over 2 yearsNot working with facebook blob video in comments.
-
Wiktor Stribiżew over 2 yearsThis sometimes fails to download the full video, unfortunately, maybe the timeout threshold is too small and I do not know where it can be adjusted.
-
Vlad Nikiforov over 2 years@Loenix, facebook videos are often easy to download if you switch to mobile version (replace "www." with "m." in the URL).
-
Kamlesh over 2 yearsThanks @godblessstrawberry I have already visited this solution, not solved my problem yet, thanks again.
-
Mikel over 2 yearsThe
HLS Downloader
extension was removed from Chrome Store but it's available for Firefox -
2540625 over 2 yearsThese steps need much more detail to follow.
-
2540625 over 2 years@Kamlesh
youtube-dl
can be installed by brew, and it works on blobs in general, not just from YouTube. -
Mars2024 almost 2 yearsThis worked perfectly for me: I downloaded Homebrew, and brew install ffmpeg, and youtubedl, and used this command youtube-dl --all-subs -f mp4 -o "Testing.mp4" "m.media-amazon.com/images/S/…", and it worked