英文:
Scraping and downloading M4S Segmented Audio & Video Files
问题
以下是您要翻译的内容:
"My school refers students to watch lectures on this short course platform. To access them, certain credentials have to be entered. Videos are embedded as GoolPlayer, with Flowplayer.js script used and they don't give the option to download the videos.
This is a link to the video (need to copy and paste it, clicking it won't work):
https://www.gool.co.il/%D7%94%D7%A0%D7%93%D7%A1%D7%90%D7%99%D7%9D-%D7%AA%D7%9C-%D7%90%D7%91%D7%99%D7%91/%D7%94%D7%A0%D7%93%D7%A1%D7%90%D7%99-%D7%90%D7%93%D7%A8%D7%9B%D7%9C%D7%95%D7%AA-%D7%95%D7%A2%D7%99%D7%A6%D7%95%D7%91-%D7%A4%D7%A0%D7%99%D7%9D/%D7%A1%D7%98%D7%98%D7%99%D7%A7%D7%94-~~%D7%A1%D7%95%D7%92%D7%A8%D7%99%D7%99%D7%9D2~~%D7%9E%D7%9B%D7%A0%D7%99%D7%A7%D7%94-%D7%94%D7%A0%D7%93%D7%A1%D7%99%D7%AA~~%D7%A1%D7%95%D7%92%D7%A8%D7%99%D7%99%D7%9D1~~/%D7%9E%D7%91%D7%95%D7%90-%D7%9C%D7%A1%D7%98%D7%98%D7%99%D7%A7%D7%94-(%D7%9E%D7%9B%D7%A0%D7%99%D7%A7%D7%94-%D7%94%D7%9E%D7%9B%D7%A0%D7%99%D7%A7%D7%94-%D7%94%D7%A0%D7%93%D7%A1%D7%99%D7%AA)#77794
Observing the network in Chrome, you can find chunks of the video and audio split into segments, with request URL as such:
https://5a153f939af4b.streamlock.net/academy/77794/chunk_ctvideo_ridp0va0br68335_cinit_w270836820_pd60000_qdElEPTQzMjY4OSZ2aWRlb1ZpZXc9MSZhY2Nlc3NUb2tlbj0wOTc1ZWRkOTU4NDc4MzAyYmQ0MjAxN2JhODFhZTY0Ng==_mpd.m4s
I have tried quite a few Chrome and Firefox extensions to try and download the videos without any luck. Also tried a few M4S scripts on GitHub.
The best thing I found that did do that trick was InviDownloader, an open-source program, BUT can't seem to grab all segments because of the files' name, it changes in a random order, so the program can only grab the first and last one.
Any thoughts or ideas on how can the video be downloaded?"
英文:
My school refers students to watch lectures on this short course platform. To access them, certain credentials have to be entered. Videos are embedded as GoolPlayer, with Flowplayer.js script used and they don't give the option to download the videos.
This is a link to the video (need to copy and paste it, clicking it won't work):
https://www.gool.co.il/%D7%94%D7%A0%D7%93%D7%A1%D7%90%D7%99%D7%9D-%D7%AA%D7%9C-%D7%90%D7%91%D7%99%D7%91/%D7%94%D7%A0%D7%93%D7%A1%D7%90%D7%99-%D7%90%D7%93%D7%A8%D7%99%D7%9B%D7%9C%D7%95%D7%AA-%D7%95%D7%A2%D7%99%D7%A6%D7%95%D7%91-%D7%A4%D7%A0%D7%99%D7%9D/%D7%A1%D7%98%D7%98%D7%99%D7%A7%D7%94-~~%D7%A1%D7%95%D7%92%D7%A8%D7%99%D7%99%D7%9D2~~%D7%9E%D7%9B%D7%A0%D7%99%D7%A7%D7%94-%D7%94%D7%A0%D7%93%D7%A1%D7%99%D7%AA~~%D7%A1%D7%95%D7%92%D7%A8%D7%99%D7%99%D7%9D1~~/%D7%9E%D7%91%D7%95%D7%90-%D7%9C%D7%A1%D7%98%D7%98%D7%99%D7%A7%D7%94-(%D7%9E%D7%9B%D7%A0%D7%99%D7%A7%D7%94-%D7%94%D7%A0%D7%93%D7%A1%D7%99%D7%AA)#77794
Observing the network in Chrome, you can find chunks of the video and audio split into segnments, with request url as such:
I have tried quite a few chrome and firefox extensions to try and download the videos without any luck. Also tried a few M4S scripts on github.
The best thing I found that did do that trick was InviDownloader, an opensource program, BUT, can't seem to grab all segments because of the files name, it changes in a random order, so the program can only grab the first and last one.
Any thoughts or ideas on how can the video be downloaded?
答案1
得分: 1
-
要从gool下载视频,您需要获取在首次加载视频时传输给您的mpd文件。该文件负责生成加载视频时看到的m4s文件的链接。
-
获得文件后,您需要手动编辑它并将用于获取mpd文件的基本URL添加到mpd文件内的每个链接中。
例如,这个链接
chunk_ctvideo_rid$RepresentationID$_cs$Time$_w113767869_pd60000_qdElEPTU4NTcmdmlkZW9WaWV3PTEmYWNjZXNzVG9rZW49N2VhMzg5ZjRhNzJmNGFiMWE2NWU2NTI3Y2RjNTdhZTE=_mpd.m4s
将变成
https://5a153f939af4b.streamlock.net/bagrut/36808/chunk_ctvideo_rid$RepresentationID$_cs$Time$_w113767869_pd60000_qdElEPTU4NTcmdmlkZW9WaWV3PTEmYWNjZXNzVG9rZW49N2VhMzg5ZjRhNzJmNGFiMWE2NWU2NTI3Y2RjNTdhZTE=_mpd.m4s
- 现在您有一个有效的mpd文件。
要播放它,您可以使用 vlc
。
例如:vlc manifest.mpd
要将mpd文件编码为视频文件,您可以使用 cvlc
或 ffmpeg
(请注意,ffmpeg需要编译时启用一些可能未在预构建版本中启用的功能。[nixpkgs中的ffmpeg-full 对我有效])。
示例:
cvlc manifest.mpd --sout '#transcode{vcodec=h264,acodec=mp3}:std{access=file,mux=mp4,dst=output.mp4}' --play-and-exit
ffmpeg -i manifest.mpd -c copy output.mp4
英文:
-
To download videos from gool you want to get the mpd file that is transferred to you when you first load the video. That file is responsible for generating the links to the m4s files that you see while loading more of the video.
-
After obtaining the file, you'll want to manually edit it and add the base url that was used to get the mpd file to each of the links inside the mpd file.
for example this link
chunk_ctvideo_rid$RepresentationID$_cs$Time$_w113767869_pd60000_qdElEPTU4NTcmdmlkZW9WaWV3PTEmYWNjZXNzVG9rZW49N2VhMzg5ZjRhNzJmNGFiMWE2NWU2NTI3Y2RjNTdhZTE=_mpd.m4s
will become
https://5a153f939af4b.streamlock.net/bagrut/36808/chunk_ctvideo_rid$RepresentationID$_cs$Time$_w113767869_pd60000_qdElEPTU4NTcmdmlkZW9WaWV3PTEmYWNjZXNzVG9rZW49N2VhMzg5ZjRhNzJmNGFiMWE2NWU2NTI3Y2RjNTdhZTE=_mpd.m4s
- Now you have a valid mpd file.
To play it you can use vlc
.
For example: vlc manifest.mpd
To encode the mpd file to a video file, you can use either cvlc
or ffmpeg
(note, ffmpeg needs to compiled with some features that might not be enabled in prebuilts. [ffmpeg-full from nixpkgs works for me])
examples:
cvlc manifest.mpd --sout '#transcode{vcodec=h264,acodec=mp3}:std{access=file,mux=mp4,dst=output.mp4}' --play-and-exit
ffmpeg -i manifest.mpd -c copy output.mp4
答案2
得分: 1
你可以使用流媒体检测器 https://addons.mozilla.org/en-US/firefox/addon/hls-stream-detector/
来检测MPD链接,然后使用 youtube-dl
下载视频。了解更多信息,请参阅此处 https://forum.videohelp.com/threads/388942-How-do-I-download-m4s-segment-videos-and-combine-them-to-mp4-format
。
英文:
you can detect mpd link by Stream Detector https://addons.mozilla.org/en-US/firefox/addon/hls-stream-detector/
and then download video with youtube-dl
Read more about it there https://forum.videohelp.com/threads/388942-How-do-I-download-m4s-segment-videos-and-combine-them-to-mp4-format
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论