API to download MS Teams video recordings

10,314

Solution 1

There is no specific API or chrome extension for this but it is possible using destreamer. Prerequisite: Node 8.0 or higher

Steps for downloading the video:

  1. Download zip files of these repositories Destreamer Youtube-dl

  2. Now in a new folder copy all the contents of these repositories. The folder structure is like Folder Structure. Do not worry about files with same names as they are not important. So when windows asks you to decide what to do just skip it.

  3. Download ffmpeg as described in this link ffmpeg download. Also add it to the environment variables as described in this link.

  4. Download chromium from this link chromium and just paste the folder present in zip file anywhere.

  5. In the folder described in step 2 open src/destreamer.ts and edit code as code edit on line 55 in the pic and replace the path with your own chromium path.

  6. Open cmd and navigate to the main folder that we created in step 1 and run npm install. After successful installation of node_modules run npm run build. After successful build run
    destreamer.cmd -i "https://web.microsoftstream.com/video/VIDEO-1". (You need double quotations for link). This will launch chromium and ask you to login. Enter your MS account credentials. On successful login your download will start.

Note: In powershell you need to write ./destreamer.cmd instead of destreamer.cmd. In linux you need to write ./destreamer.sh.

You can also refer to destreamer github repository described in step 1 for other download options such as custom path download, re-encode, different format, etc.

Solution 2

Video recordings in Teams are actually stored in Microsoft Stream (another one of the services in Office 365) but unfortunately there's currently no API for accessing Stream itself (it's on the roadmap for release later this calendar year, see here (page 2 at the moment).

Share:
10,314
KurroGB
Author by

KurroGB

Updated on June 22, 2022

Comments

  • KurroGB
    KurroGB almost 2 years

    Is there any programmatic way to access and download the already-stored video recordings from MS Teams? I have been reading MS Graph API documentation, but could not find anything related to this.

  • KurroGB
    KurroGB almost 4 years
    Aha, I see. And is there any option to workarround this? I mean something like "search" endpoint to get the id of the video, or any automatic way of building the shareable download link... just wondering in order not to discard it without exploring all options :-(. Thank you!
  • Hilton Giesenow
    Hilton Giesenow almost 4 years
    not that I'm personally aware of, I'm afraid. Perhaps someone else will be able to give more on that.
  • Yusuf Khan
    Yusuf Khan almost 4 years
    seems browser login only valid for 60 min, is there any way i can downloads my all team video(~300 videos) at once ?
  • 1ight_yagami
    1ight_yagami almost 4 years
    @YusufKhan I think browser validation part can't be changed but you can download multiple video files at once by giving text file as an input option. You can check the syntax on destreamer github repo,.
  • Kubuntuer82
    Kubuntuer82 over 3 years
    I solved the problem following only points 1, 3 and 6, perhaps you should update your answer (in particular there is no need to edit code)... anywa, many thanks, you saved the day!