Skip to content

Instantly share code, notes, and snippets.

@mfd
Last active July 29, 2026 08:55
Show Gist options
  • Select an option

  • Save mfd/c990a01d626847a6d7e823dceca598e1 to your computer and use it in GitHub Desktop.

Select an option

Save mfd/c990a01d626847a6d7e823dceca598e1 to your computer and use it in GitHub Desktop.
Download any video from Microsoft Teams, SharePoint and OneDrive
2teams() {
NOW=$(date +"%Y-%m-%d_%H%M")
if [ ! -z $2 ] ; then
echo $NOW"_"$2.mp4
ffmpeg -i $1 -codec copy $NOW"_"$2.mp4
else
echo $NOW"_teamsvid".mp4
ffmpeg -i $1 -codec copy $NOW"_teamsvideo".mp4
fi
}

Download any video from Microsoft Teams, SharePoint and OneDrive

Videos like

- https://{ORGID}.sharepoint.com/personal/{USERID}/_layouts/15/stream.aspx?id={VIDEOID}%2Emp4&ga=1
- https://{ORGID}.sharepoint.com/:v:/p/{USERID}/{VIDEOID}
  1. Run video from SharePoint corporate account or OneDrive,
  2. In Chrome open Web inspector and in Network filter by videomanifest
  3. Copy this url
  4. Run ffmpeg -i "%URL%" -codec copy outputvideo.mp4

chrome

@brendangooden

brendangooden commented May 21, 2026

Copy link
Copy Markdown

Anyone having issues with 401 could checkout my Chrome Extension as I recently fixed this.

https://github.com/brendangooden/ms-teams-sharepoint-downloader

https://teamsvideotranscriptexporter.com/

Video / Audio download

  • In-browser download — Video+Audio (MP4), Audio Only (M4A), or Video Only. No extra tools needed.
  • Editable filename — auto-derived from the page title.
  • Floating banner widget as a fallback for when the SharePoint command bar re-renders or hides the button.

Transcript download

  • Automatic detection — the extension watches for the transcript metadata call and adds a Download Transcript button.
  • Three formats — RAW JSON, standard WebVTT, or Grouped VTT (consecutive lines from the same speaker collapsed into a block).
  • Live preview of each format in the modal.
  • Last-used format remembered across sessions.
  • Clear dialog if the meeting was never transcribed, instead of a silent failure.
{78F4CBE1-75D2-4EFB-AA87-14BCE0517283} Screenshot 2026-05-21 142245

@majid3612

Copy link
Copy Markdown

Anyone having issues with 401 could checkout my Chrome Extension as I recently fixed this.

https://github.com/brendangooden/ms-teams-sharepoint-downloader

https://teamsvideotranscriptexporter.com/

Video / Audio download

  • In-browser download — Video+Audio (MP4), Audio Only (M4A), or Video Only. No extra tools needed.
  • Editable filename — auto-derived from the page title.
  • Floating banner widget as a fallback for when the SharePoint command bar re-renders or hides the button.

Transcript download

  • Automatic detection — the extension watches for the transcript metadata call and adds a Download Transcript button.
  • Three formats — RAW JSON, standard WebVTT, or Grouped VTT (consecutive lines from the same speaker collapsed into a block).
  • Live preview of each format in the modal.
  • Last-used format remembered across sessions.
  • Clear dialog if the meeting was never transcribed, instead of a silent failure.

{78F4CBE1-75D2-4EFB-AA87-14BCE0517283} Screenshot 2026-05-21 142245

Great job!
Thanks!

@rockofclay

Copy link
Copy Markdown

S

Anyone having issues with 401 could checkout my Chrome Extension as I recently fixed this.

https://github.com/brendangooden/ms-teams-sharepoint-downloader

https://teamsvideotranscriptexporter.com/

Video / Audio download

  • In-browser download — Video+Audio (MP4), Audio Only (M4A), or Video Only. No extra tools needed.
  • Editable filename — auto-derived from the page title.
  • Floating banner widget as a fallback for when the SharePoint command bar re-renders or hides the button.

Transcript download

  • Automatic detection — the extension watches for the transcript metadata call and adds a Download Transcript button.
  • Three formats — RAW JSON, standard WebVTT, or Grouped VTT (consecutive lines from the same speaker collapsed into a block).
  • Live preview of each format in the modal.
  • Last-used format remembered across sessions.
  • Clear dialog if the meeting was never transcribed, instead of a silent failure.

{78F4CBE1-75D2-4EFB-AA87-14BCE0517283} Screenshot 2026-05-21 142245

It works, but the audio quality is very bad.

@Kungergely

Copy link
Copy Markdown

Anyone who doesn't feel like downloading a Chrome extension can use yt-dlp with the following syntax:
yt-dlp -f "dash-vcopy+dash-audcopy" --cookies-from-browser firefox "SHAREPOINT_PAGE_URL"
Provided you use Firefox of course. Also, make sure you have FFmpeg specified in the %PATH% environment variable as well, otherwise yt-dlp won't be able to merge the resulting two files (the audio and the video file). I highly recommend leaving the format specifier in as well as the downloads didn't work properly for me without them.

@shebenu

shebenu commented Jun 29, 2026

Copy link
Copy Markdown

Anyone who doesn't feel like downloading a Chrome extension can use yt-dlp with the following syntax: yt-dlp -f "dash-vcopy+dash-audcopy" --cookies-from-browser firefox "SHAREPOINT_PAGE_URL" Provided you use Firefox of course. Also, make sure you have FFmpeg specified in the %PATH% environment variable as well, otherwise yt-dlp won't be able to merge the resulting two files (the audio and the video file). I highly recommend leaving the format specifier in as well as the downloads didn't work properly for me without them.

error 401

@shebenu

shebenu commented Jun 29, 2026

Copy link
Copy Markdown

Anyone having issues with 401 could checkout my Chrome Extension as I recently fixed this.

https://github.com/brendangooden/ms-teams-sharepoint-downloader

https://teamsvideotranscriptexporter.com/

Video / Audio download

  • In-browser download — Video+Audio (MP4), Audio Only (M4A), or Video Only. No extra tools needed.
  • Editable filename — auto-derived from the page title.
  • Floating banner widget as a fallback for when the SharePoint command bar re-renders or hides the button.

Transcript download

  • Automatic detection — the extension watches for the transcript metadata call and adds a Download Transcript button.
  • Three formats — RAW JSON, standard WebVTT, or Grouped VTT (consecutive lines from the same speaker collapsed into a block).
  • Live preview of each format in the modal.
  • Last-used format remembered across sessions.
  • Clear dialog if the meeting was never transcribed, instead of a silent failure.

{78F4CBE1-75D2-4EFB-AA87-14BCE0517283} Screenshot 2026-05-21 142245

stuck with audio

@MrBass

MrBass commented Jul 11, 2026

Copy link
Copy Markdown

None of the command line options worked for me - 401: Unauthorized, which really is to be expected if there's no auth token in the URL.

I ended up using the excellent Chrome extension that @brendangooden has posted above. Installed it, refreshed my browser and downloaded the video first time. The transcript stuff is an added bonus.

Cheers @brendangooden! 🥃

@groovyle

Copy link
Copy Markdown

For the manual peeps, I tried this with a Teams recording (https://xxx-my.sharepoint.com/...) :

  1. Do the steps until trimming the URL up to &format=dash
  2. For that videomanifest URL in the Network tab, check its Request Headers. Copy the X-SPOPacToken
image
  1. Append &access_token=<copied_token> into your URL
  2. Do the rest of the steps

Note: my video was under 100MB and download was fast, so I encountered no problems.
But while I was debugging around and reloading the page, I noticed this token would change, so it might have an expiry, which might interfere with long downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment