我正在嘗試使用 src url 下載影片blob:https%3A//www.youtube.com/23aea5c8-9ae2-40dc-9417-e675ea99b386
。
是否有一個可以遵循的流程來下載所有此類影片?
答案1
我找到了一種下載影片的方法blob url
(Vimeo
閱讀這裡我明白怎麼做)。我在這裡寫下簡單的步驟。我正在使用谷歌瀏覽器:
- 打開
More Tools
→Developer Tools
檢查影片標籤中是否有這樣的內容:
<video preload="" src="blob:https://player.vimeo.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"></video>
- 複製 iframe 標籤的 src,如果有的話,類似
http://player.vimeo.com/video/XYZ
如果找到了就可以直接進入第 7 點,否則按照步驟 4、5、6 進行操作。 https://skyfire.vimeocdn.com/.../master.json?base64_init=1
現在在頁面內尋找此字串(使用開發人員視圖),您應該在 javascript 函數內找到它,如下所示:(function(e,a){var t={"cdn_url":"https://f.vimeocdn.com","view":1,"request":{"files":{"dash":{"origin":"gcs","url":"https://48skyfiregce-a.akamaihd.net/.../master.json?base64_init=1","cdn":"
將 url 欄位中的連結複製到新的 Chrome 標籤上,例如
https://48skyfiregce-a.akamaihd.net/.../master.json?base64_init=1
使用瀏覽器開啟它,它將開啟一個如下所示的 json 檔案:{ "clip_id": XYZ, "base_url": "../", "video": [ { ... ... ...
現在用你的 id 寫一個 url,
XYZ
如下所示:https://player.vimeo.com/video/XYZ
- 將影片標籤內的內容替換
blob:https://player.vimeo.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
為最後一個 URL(在上一個步驟 #6 中建立的 URL)。 現在您會注意到視訊標籤內的 src 欄位神奇地發生了變化(如果沒有變化,請多次嘗試步驟 7)...
<video preload="none" src="https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/XX/XXX/X/XXXXXXXX/XXXXXXXXX.mp4?token=abcdefg"></video>
使用該新連結直接下載,如下所示: https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/XX/XXX/X/XXXXXXXX/XXXXXXXXX.mp4?token=abcdefg
答案2
<video src="blob:https://www.example.tv/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx">
<source src="https://cdn.example.tv/api/media/tv/xyzxyz/index" type="application/x-mpegurl">
</video>
我也有blob:
URL video/@src
,但透過在播放期間觀看Developer tools
>Network
發現這video/source/@src
是播放清單的 URL m3u8
。
m3u8
可以透過以下任一方式輕鬆下載支援的影片:
ffplay -i "https://cdn.example.tv/api/media/tv/xyzxyz/1080/index.m3u8"
ffmpeg -i "https://cdn.example.tv/api/media/tv/xyzxyz/1080/index.m3u8" -codec copy file.mkv
tl;dr - blob URL 聽起來像是您想要獲取的二進位文件,但可能有更簡單的方法來獲取視訊。只需在播放影片時查看開發工具中的「網路」標籤即可查看實際取得的內容。
答案3
這個答案適用於 Twitter URL -
- 右鍵單擊視頻,然後單擊檢查元素 -
你會發現這樣的程式碼
<div id="playerContainer" class="player-container full-screen-enabled" data-config="{"is_360":false,"duration":28617,"scribe_widget_origin":true,"heartbeatEnabled":true,"video_url":"https:\/\/video.twimg.com\/ext_tw_video\/844504104512749568\/pu\/pl\/e91Du5N2TZ09ZaW_.m3u8","disable_embed":"0","videoInfo":{"title":null,"description":null,"publisher":{"screen_name":"MountainButorac","name":"Mountain Butorac","profile_image_url":"https:\/\/pbs.twimg.com\/profile_images\/808318456701521920\/vBvlAASx_normal.jpg"}},"cardUrl":"https:\/\/t.co\/SdSorop3uN","content_type":"application\/x-mpegURL","owner_id":"14120461","looping_enabled":true,"show_cookie_override_en":true,"visit_cta_url":null,"scribe_playlist_url":"https:\/\/twitter.com\/MountainButorac\/status\/844505243538931714\/video\/1","source_type":"consumer","image_src":"https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/844504104512749568\/pu\/img\/FFt3qkbeOh0RlGfZ.jpg","heartbeatIntervalInMs":5000.0,"use_tfw_live_heartbeat_event_category":true,"video_loading_timeout":45000.0,"status":{"created_at":"Wed Mar 22 11:05:14 +0000 2017","id":844505243538931714,"id_str":"844505243538931714","text":"Took my Goddaughter to meet the pope. She stole his hat! https:\/\/t.co\/SdSorop3uN","truncated":false,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":844504104512749568,"id_str":"844504104512749568","indices":[57,80],"media_url":"http:\/\/pbs.twimg.com\/ext_tw_video_thumb\/844504104512749568\/pu\/img\/FFt3qkbeOh0RlGfZ.jpg","media_url_https":"https:\/\/pbs.twimg.com\/ext_tw_video_thumb\/844504104512749568\/pu\/img\/FFt3qkbeOh0RlGfZ.jpg","url":"https:\/\/t.co\/SdSorop3uN","display_url":"pic.twitter.com\/SdSorop3uN","expanded_url":"https:\/\/twitter.com\/MountainButorac\/status\/844505243538931714\/video\/1","type":"photo","sizes":{"small":{"w":340,"h":604,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":576,"h":1024,"resize":"fit"},"medium":{"w":576,"h":1024,"resize":"fit"}}}]},"source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"favorited":false,"retweeted":false,"possibly_sensitive":false,"lang":"en"},"show_cookie_override_all":true,"video_session_enabled":false,"media_id":"844504104512749568","view_counts":null,"statusTimestamp":{"local":"4:05 AM - 22 Mar 2017"},"media_type":1,"user":{"screen_name":"MountainButorac","name":"Mountain Butorac","profile_image_url":"https:\/\/pbs.twimg.com\/profile_images\/808318456701521920\/vBvlAASx_bigger.jpg"},"watch_now_cta_url":null,"tweet_id":"844505243538931714"}" data-source-type="consumer">
2.將上面的程式碼複製貼上到notepad++中。更換所有"
和"
\/
和/
在記事本++中。 (使用 CTRL+H)
你會得到類似的東西
{
"is_360": false,
"duration": 28617,
"scribe_widget_origin": true,
"heartbeatEnabled": true,
"video_url": "https://video.twimg.com/ext_tw_video/844504104512749568/pu/pl/e91Du5N2TZ09ZaW_.m3u8",
"disable_embed": "0",
"videoInfo": {
"title": null,
"description": null,
"publisher": {
"screen_name": "MountainButorac",
"name": "Mountain Butorac",
"profile_image_url": "https://pbs.twimg.com/profile_images/808318456701521920/vBvlAASx_normal.jpg"
}
},
"cardUrl": "https://t.co/SdSorop3uN",
"content_type": "application/x-mpegURL",
"owner_id": "14120461",
"looping_enabled": true,
"show_cookie_override_en": true,
"visit_cta_url": null,
"scribe_playlist_url": "https://twitter.com/MountainButorac/status/844505243538931714/video/1",
"source_type": "consumer",
"image_src": "https://pbs.twimg.com/ext_tw_video_thumb/844504104512749568/pu/img/FFt3qkbeOh0RlGfZ.jpg",
"heartbeatIntervalInMs": 5000.0,
"use_tfw_live_heartbeat_event_category": true,
"video_loading_timeout": 45000.0,
"status": {
"created_at": "Wed Mar 22 11:05:14 +0000 2017",
"id": 844505243538931714,
"id_str": "844505243538931714",
"text": "Took my Goddaughter to meet the pope. She stole his hat! https://t.co/SdSorop3uN",
"truncated": false,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],
"urls": [],
"media": [{
"id": 844504104512749568,
"id_str": "844504104512749568",
"indices": [57, 80],
"media_url": "http://pbs.twimg.com/ext_tw_video_thumb/844504104512749568/pu/img/FFt3qkbeOh0RlGfZ.jpg",
"media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/844504104512749568/pu/img/FFt3qkbeOh0RlGfZ.jpg",
"url": "https://t.co/SdSorop3uN",
"display_url": "pic.twitter.com/SdSorop3uN",
"expanded_url": "https://twitter.com/MountainButorac/status/844505243538931714/video/1",
"type": "photo",
"sizes": {
"small": {
"w": 340,
"h": 604,
"resize": "fit"
},
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 576,
"h": 1024,
"resize": "fit"
},
"medium": {
"w": 576,
"h": 1024,
"resize": "fit"
}
}
}]
},
"source": "\u003ca href=\"http://twitter.com/download/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c/a\u003e",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"lang": "en"
},
"show_cookie_override_all": true,
"video_session_enabled": false,
"media_id": "844504104512749568",
"view_counts": null,
"statusTimestamp": {
"local": "4:05 AM - 22 Mar 2017"
},
"media_type": 1,
"user": {
"screen_name": "MountainButorac",
"name": "Mountain Butorac",
"profile_image_url": "https://pbs.twimg.com/profile_images/808318456701521920/vBvlAASx_bigger.jpg"
},
"watch_now_cta_url": null,
"tweet_id": "844505243538931714"
}
從上面的JSON格式,看到值視訊位址
https://video.twimg.com/ext_tw_video/844504104512749568/pu/pl/e91Du5N2TZ09ZaW_.m3u8
這裡的問題是,2016 年 8 月 1 日之後,Twitter 不再使用 .mp4 視頻,而是轉換為新的 HLS、自適應流格式,具有.m3u8檔案副檔名。
.m3u8 檔案基本上只是一個文字檔案包裝器,它們非常小(300-500 位元組),當您使用文字編輯器打開它們時,它們包含指向不同視訊大小的鏈接
- 在notepad++中開啟檔案m3u8,它會包含這樣的程式碼
EXTM3U EXT-X-獨立段 EXT-X-STREAM-INF:程式 ID=1,頻寬=256000,解析度=180x320,CODECS=“mp4a.40.2,avc1.42001f” /ext_tw_video/844504104512749568/pu/pl/180x320/_Z42SY5zwMlLdFYx.m3u8 EXT-X-STREAM-INF:程式 ID = 1,頻寬 = 832000,解析度 = 360x640,CODECS =“mp4a.40.2,avc1.42001f” /ext_tw_video/844504104512749568/pu/pl/360x640/-Phfjbbx2yinirLi.m3u8
- 根據您的解析度需要複製上面的相應連結。重複相同的步驟,直到完成.ts文件。下載.ts文件(影片檔)。
答案4
這是來自的 blob 視頻Facebook。需要最低限度的技術專業知識。
- 在影片中,點擊右上角的三個點然後單擊'複製連結'。連結將如下所示: https://fb.watch/1F3iBykxNf/
- 在瀏覽器中開啟網址。
- 現在您可以右鍵單擊影片命中框。 右鍵單擊影片命中框,然後按一下'複製當前時間的影片 URL'。 URL 將如下所示: https://www.facebook.com/686268088027568/videos/784217565526864/?t=0
- 將該 URL 貼到https://fbdown.net/。對我來說,我可以獲得一個 mp4 影片。
我與 fbdown.net 沒有關係。