I want to download a video whose url is not simple mp4 file, but its url is blob type for eg.
<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 the playing 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:
- 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
.m3u8extension. There may be many of them, but most likely the first you find is the one you are looking for. It may have any name, e.g.playlist.m3u8. - Open the request and under Headers subsection you will see request's full URL in 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 "Open Network Stream..." 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.
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
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:
I posted this already at some other websites and though why not share it with guys/gals at stackoverflow.
- Install the Video DownloadHelper extension on Firefox browser.
- With DownloadHelper activated, navigate to the webpage containing the video that you want to download.
- 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.
- Scroll onto the file format that you wish to download
- On the right hand side, you will see an arrow
- Click on that arrow to get more information regarding the current video and the selected format
- From the displayed window at the end of that arrow, scroll down and select "Details"
- 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
- 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.
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
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.
- Find the playlist/manifest with the developer tools network tab. There is always one, as that's how it works. It might have a m3u8 extension that you can type into the Filter.
- Give it to the youtube-dl tool. 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.
Wanted to add another answer specifically for Facebook blob videos, which seem to be tricky. The blob link seems to lead to multiple consecutive .mp4 streams, as if the video were broken up into hundreds of short pieces. There doesn't seem to be any single playlist like an f4m or m3u8.
For me, the only successful solution has been to use https://fbdown.net/index.php, and for private videos, I needed to use their video download helper (a free chrome extension). In theory they have a separate web page for downloading private vids, which involves copy-and-pasting the page's source into a text box. But that didn't work for me. The Chrome plugin does though. Plugin URL: https://chrome.google.com/webstore/detail/fbdown-video-downloader/fhplmmllnpjjlncfjpbbpjadoeijkogc
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
2) You will see something here and select the first item. In my example, it's an mpd file. then copy the Request URL.
3) 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
4) 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.
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).
You can simply right-click and save the blob as mp4.
When I was playing around with browser based video/audio recording the output blob was available to download directly.
来源:https://stackoverflow.com/questions/42901942/how-do-we-download-a-blob-url-video




