BLOB URL 비디오를 어떻게 다운로드합니까?
url이 simple mp4 파일이 아닌 비디오를 다운로드하고 싶지만 해당 URL은 예를 들어 blob 유형입니다.
<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>
재생중인 비디오를 다운로드하는 데 사용할 수있는 크롬 확장 프로그램이나 소프트웨어가 있습니까?
방금 대부분의 웹 사이트에서 작동하는 일반적인 솔루션을 생각해 냈습니다. Chrome에서만이 작업을 시도했지만 Dev Tools는 거의 동일 하므로이 방법은 다른 브라우저에서도 작동합니다.
단계 :
- 관심있는 비디오가있는 페이지 에서 브라우저의 개발 도구 (일반적으로 F12 또는 Ctrl-Shift-I )를 마우스 오른쪽 버튼으로 클릭 한 다음 팝업 메뉴에서 검사 하십시오.
- 네트워크 탭으로 이동 한 다음 페이지를 다시로드하십시오. 이 탭은 요청 목록으로 채워집니다 (최대 100 개 또는 그 이상).
- 요청 이름을 검색하고
.m3u8
확장명이 있는 요청을 찾으십시오 . 그중 많은 것이있을 수 있지만, 가장 먼저 찾은 것이 당신이 찾고있는 것일 것입니다. 예를 들어, 이름이있을 수 있습니다playlist.m3u8
. - 요청을 열고 헤더 하위 섹션 아래 에서 요청 URL 필드 에 요청의 전체 URL이 표시됩니다 . 복사하십시오.
- m3u8에서 비디오를 추출하십시오. 그것을 시도하는 많은 방법이 있습니다, 내가 당신에게 시도한 사람들을 줄 것이다,하지만 당신은 "m3u8에서 비디오 다운로드"에 의해 더 구글 할 수 있습니다.
- 옵션 1. VLC 플레이어가 설치되어있는 경우 " Open Network Stream ... "메뉴 옵션을 사용하여 URL을 VLC에 공급하십시오 . 여기서는이 부분에 대해 자세히 다루지 않겠 습니다 . 예를 들어 여기 에는 여러 곳에 여러 가지 포괄적 인 안내서가 있습니다 . 페이지가 작동하지 않으면 언제든지 "vlc download online video"를 통해 다른 페이지를 Google에 연결할 수 있습니다.
- 옵션 2. 명령 행에 더 익숙하다면 이 수퍼 유저 질문에 지시 된대로 FFMPEG 또는 고유 한 스크립트를 사용하십시오 .
비디오 호스팅 위치 및 방법에 따라 프로세스가 다를 수 있습니다. 그것을 아는 것은 질문에 더 자세히 대답하는 데 도움이 될 수 있습니다.
예로서; Vimeo에서 Blob 링크가있는 비디오를 다운로드하는 방법입니다.
- 비디오 플레이어 iframe의 소스 코드보기
- mp4 검색
- 토큰 쿼리로 링크 복사
- 토큰이 만료되기 전에 다운로드
이것이 내가 "다운로드"하는 방법입니다.
- inspect-element를 사용하여 M3U 재생 목록 파일의 URL을 식별하십시오.
- M3U 파일 다운로드
- VLC를 사용하여 M3U 파일 읽기, 비디오 스트리밍 및 MP4 변환
Firefox에서 M3U 파일은 application / vnd.apple.mpegurl 유형으로 나타 납니다.
M3U 파일의 내용은 다음과 같습니다.
VLC medial player를 열고 Media => Convert 옵션을 사용하십시오. (저장된) M3U 파일을 소스로 사용하십시오.
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.
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
- 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.
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.
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 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)
쿼리 문자열이있는 요청을 사용하여 웹 서버에서 실행할 수도 있습니다 ?manifest=[manifest url]
.
FTP 클라이언트를 사용하여 다운로드 한 비디오 파일을 검색하고 스크립트 후에 정리해야합니다 (다운로드 한 모든 비디오 부분은 그대로 두어야 함).
마우스 오른쪽 버튼을 클릭하고 blob을 mp4로 저장할 수 있습니다.
브라우저 기반 비디오 / 오디오 녹음을 가지고 놀았을 때 출력 블롭을 직접 다운로드 할 수있었습니다.
참고 URL : https://stackoverflow.com/questions/42901942/how-do-we-download-a-blob-url-video
'IT박스' 카테고리의 다른 글
JMS 및 AMQP-RabbitMQ (0) | 2020.07.17 |
---|---|
C ++에서 Trigraph 시퀀스의 목적은 무엇입니까? (0) | 2020.07.17 |
Java에서 익명의 내부 클래스를 정적으로 만들 수 있습니까? (0) | 2020.07.17 |
차이점 : std :: runtime_error vs std :: exception () (0) | 2020.07.17 |
원점이 0에서 시작하도록 강제 (0) | 2020.07.17 |