Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do we download a blob url video [closed]

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?

like image 471
SidD Avatar asked Mar 20 '17 11:03

SidD


People also ask

How do you play blob videos?

From the menu bar, click the "Windows" tab > then “Activity”. Step 2. Head on to a website where the blob video is and play the video. Step 3.

How do I open blob URL in Chrome?

To open Blob URL on Chrome iOS with JavaScript, we can use the FileReader constructor. For instance, we write: const reader = new FileReader(); const out = new Blob(['abc'], { type: 'text/plain' }); reader. onload = (e) => { console.


2 Answers

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:

  1. 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.
  2. 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).
  3. 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.
  4. 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. enter image description here
  5. 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.
like image 108
Vlad Nikiforov Avatar answered Sep 20 '22 09:09

Vlad Nikiforov


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.

like image 22
frederickjh Avatar answered Sep 19 '22 09:09

frederickjh