How do we download a blob url video

VideoBrowserBlobYoutube Dl

Video Problem Overview


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?

Video Solutions


Solution 1 - Video

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.

Solution 2 - Video

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 - Video

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 - Video

This is how I manage to "download" it:

  1. Use inspect-element to identify the URL of the M3U playlist file
  2. Download the M3U file
  3. 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

enter image description here

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:

enter image description here

Solution 5 - Video

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.

  1. View the source code of the video player iframe
  2. Search for mp4
  3. Copy link with token query
  4. Download before token expires

Source & step-by-step instructions here.

enter image description here

Solution 6 - Video

If you can NOT find the .m3u8 file you will need to do a couple of steps different.

  1. Go to the network tab and sort by Media

Sort by media

  1. You will see something here and select the first item. In my example, it's an mpd file. then copy the Request URL.

  2. Next, download the file using your favorite command line tool using the URL from step 2.

youtube-dl -f bestvideo+bestaudio https://url.com/destination/stream.mpd
  1. Depending on the encoding you might have to join the audio and video files together but this will depend on a video by video case.

Solution 7 - Video

  1. Find the playlist/manifest with the developer tools network tab. There is always one, as that's how it works. It might have an m3u8 extension that you can type into the Filter. (The youtube-dl tool can also find the m3u8 tool automatically some time give it a direct link to the webpage where the video is being displayed.)
  2. Give it to the youtube-dl tool (Download). It can download much more than just YouTube. It'll auto-download each segment then combine everything with FFmpeg then discard the parts. There is a good chance it supports the site you want to download from natively, and you don't even need to do step #1.
  3. If you find a site that is stubborn and you run into 403 errors... Telerik Fiddler to the rescue. It can catch and save anything transmitted (such as the video file) as it acts as a local proxy. Everything you see/hear can be downloaded, unless it's DRM content like Spotify.

Note: in the window, you can use youtube-dl.exe using "Command Prompt" or creating a batch file. i.e

Thanks

Solution 8 - Video

I posted this already at some other websites and though why not share it with guys/gals at stackoverflow.

  1. Install the Video DownloadHelper extension on Firefox browser.
  2. With DownloadHelper activated, navigate to the webpage containing the video that you want to download.
  3. Once the video is streaming, click on the DownloadHelper icon. It will give you a list of all file formats available on the current video.
  4. Scroll onto the file format that you wish to download
  5. On the right hand side, you will see an arrow
  6. Click on that arrow to get more information regarding the current video and the selected format
  7. From the displayed window at the end of that arrow, scroll down and select "Details"
  8. You now have all the details concerning the current video and the selected format. It is something like this.

Hit Details⊗ _needsAggregate _needsCoapp actions bitrate chunked descrPrefix durationFloat extension frameId fromCache group hls id isPrivate length masterManifest mediaManifest originalId referrer size status title topUrl url urlFilename

  1. Now, look at the specifics of the referrer in that Hit Details. That's the url you want. Copy it and paste on your favorite downloader.

Solution 9 - Video

If the blob is instantiated with data from an F4M manifest (check the Network Tab in Chrome's Developer Tools), you can download the video file using the php script posted here: https://n1njahacks.wordpress.com/2015/01/29/how-to-save-hds-flash-streams-from-any-web-page/

By putting:

  if ($manifest == '')
    $manifest = $_GET['manifest'];

before:

  if ($manifest)

you could even run it on a webserver, using requests with the query string: ?manifest=[manifest url].

Note that you'll probably want to use an FTP client to retrieve the downloaded video file and clean up after the script (it leaves all the downloaded video parts).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSidDView Question on Stackoverflow
Solution 1 - VideoVlad NikiforovView Answer on Stackoverflow
Solution 2 - VideofrederickjhView Answer on Stackoverflow
Solution 3 - VideoslmView Answer on Stackoverflow
Solution 4 - VideoidrositisView Answer on Stackoverflow
Solution 5 - VideochiappaView Answer on Stackoverflow
Solution 6 - VideoRickView Answer on Stackoverflow
Solution 7 - VideoFirsh - justifiedgrid.comView Answer on Stackoverflow
Solution 8 - VideoJohny FlodderView Answer on Stackoverflow
Solution 9 - VideoProtector oneView Answer on Stackoverflow