Skip to content

Instantly share code, notes, and snippets.

@mfd
Last active October 21, 2026 08:08
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

@majid3612

Copy link
Copy Markdown

I fixed error 401 in this branch: https://github.com/majid3612/SharePointVideoDownloader/tree/feature/already-installed-browser-support
dotnet run -- --browser-path "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" -v -u "https://your-tenant-my.sharepoint.com/.../stream.aspx?id=..." --capture -o "meeting.mp4" --ffmpeg-path "PATH-TO-YOUR-ffmpeg.exe"

Capture: no video element appeared within 30 s.

Elaborate more on the issue. Logs, screenshots, etc. of what you get...

@LuqmanAlattas

LuqmanAlattas commented May 19, 2026 •

Copy link
Copy Markdown

nvm I used the same url with yt-dlp and it works. Don't know what the issue with ffmpeg

can you share me the steps how to download with yt-dlp

sorry for the late reply, First I used homebrew on my Mac to download yt-dlp here

then I used this command

yt-dlp "<YOUR_VIDEO_URL>" -o "C:\Your\Destination\Path\Video.mp4"

to get the video link, follow the steps from @poptropica12 above

@fernandohenriquecm-ops

Copy link
Copy Markdown

any update?

@shebenu

shebenu commented May 21, 2026

Copy link
Copy Markdown

Workaround (What is currently work for me)
Navigate to the directory of the video
Open "Developer Tools" and navigate to the "Network" tab
Use the Preview feature to preview the desired video
Filter out the entry with the keyword videomanifest like before
Copy the respective URL
Examine the URL to check whether the access_token query parameter exists
Remove the rest of the query parameters starting from altManifestMetadata
Execute the FFMPEG command

@poptropica12 Could you please explain point 3 and 4 in more detail?
I'm not sure if the preview option I'm using is the one I should be using.

When you navigate to the video directory, right-click on the particular video you desire, which should open a context menu, and on the context menu, you should see a Preview option available (It is recommended to turn on "Developer Tools" right before this step). image

that's working for me (yt-dlp + teams for web)

@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.

@NickOveracker

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.

HERO (works on my machine with the particular infrastructure I'm downloading from)

@Marcela-Marques

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

All I get is Video manifest URL not captured yet. Please wait a moment and try again, or refresh the page.

@Kungergely

Kungergely commented Sep 17, 2026 •

Copy link
Copy Markdown

So just to reiterate (especially to @shebenu and @MrBass): my method works still, I've just finished downloading a M$ Teams recording that was literally made just a couple days ago:

C:\References>%USERPROFILE%\AppData\Roaming\Python\Python313\Scripts\yt-dlp -f "dash-vcopy+dash-audcopy" --cookies-from-browser firefox "https://company-my.sharepoint.com/personal/firstname_lastname_company_com/_layouts/15/stream.aspx?id=%2Fpersonal%2Ffirstname%5Flastname%5Fcompany%5Fcom%2FDocuments%2FAufnahmen%2FVideo%20Name%2D20260914%5F140420%2DMeeting%20Recording%2Emp4&referrer=StreamWebApp%2EWeb&referrerScenario=AddressBarCopied%2Eview%2Ed9a1ee60%2D2f6e%2D4995%2D93c7%2Dcaed0a0562a4"
WARNING: Your yt-dlp version (2026.06.09) is older than 90 days!
         It is strongly recommended to always use the latest version.
         You installed yt-dlp with pip or using the wheel from PyPi; Use that to update.
         To suppress this warning, add --no-update to your command/config.
[SharePoint] Extracting URL: https://company-my.sharepoint.com/personal/firstname_lastname_company_com/_layouts/15/stre...D93c7%2Dcaed0a0562a4
[SharePoint] /personal/firstname_lastname_company_com/Documents/Aufnahmen/Video Name-20260914_140420-Meeting Recording.mp4: Downloading webpage
Extracting cookies from firefox
Extracted 1470 cookies from firefox
[SharePoint] 01SJAHV6V5LKQIMZFLVNBZUY6URPPD36ZH: Downloading MPD manifest
[SharePoint] 01SJAHV6V5LKQIMZFLVNBZUY6URPPD36ZH: Downloading m3u8 information
[SharePoint] 01SJAHV6V5LKQIMZFLVNBZUY6URPPD36ZH: Downloading m3u8 information
[info] 01SJAHV6V5LKQIMZFLVNBZUY6URPPD36ZH: Downloading 1 format(s): dash-vcopy+dash-audcopy
[dashsegments] Total fragments: 552
[download] Destination: Video Name [01SJAHV6V5LKQIMZFLVNBZUY6URPPD36ZH].fdash-vcopy.mp4
[download] 100% of  123.29MiB in 00:03:17 at 638.01KiB/s
[dashsegments] Total fragments: 551
[download] Destination: Video Name [01SJAHV6V5LKQIMZFLVNBZUY6URPPD36ZH].fdash-audcopy.m4a
[download] 100% of   27.07MiB in 00:02:29 at 185.66KiB/s
[Merger] Merging formats into "Video Name [01SJAHV6V5LKQIMZFLVNBZUY6URPPD36ZH].mp4"
Deleting original file Video Name [01SJAHV6V5LKQIMZFLVNBZUY6URPPD36ZH].fdash-audcopy.m4a (pass -k to keep)
Deleting original file Video Name [01SJAHV6V5LKQIMZFLVNBZUY6URPPD36ZH].fdash-vcopy.mp4 (pass -k to keep)

(the data have obviously been anonymized, but the process should work and be the same on every other Sharepoint/Teams repository as well)

@BorjaMeloRamos

Copy link
Copy Markdown

Si alguien tiene problemas con el error 401, puede consultar mi extensión de Chrome, ya que recientemente solucioné este problema.

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

https://teamsvideotranscriptexporter.com/

Descarga de vídeo/audio

  • Descarga directamente desde el navegador : vídeo y audio (MP4), solo audio (M4A) o solo vídeo. No se necesitan herramientas adicionales.
  • Nombre de archivo editable : se genera automáticamente a partir del título de la página.
  • Widget de banner flotante como alternativa cuando la barra de comandos de SharePoint se vuelve a renderizar u oculta el botón.

Descargar transcripción

  • Detección automática : la extensión detecta la llamada a los metadatos de la transcripción y añade un botón para descargar la transcripción.
  • Tres formatos : JSON sin procesar, WebVTT estándar o VTT agrupado (líneas consecutivas del mismo hablante agrupadas en un bloque).
  • Vista previa en directo de cada formato en la ventana modal.
  • El último formato utilizado se conserva entre sesiones.
  • Un diálogo claro si la reunión nunca se transcribió, en lugar de un fracaso silencioso.

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

I've been using your Google extension for the past few months, ever since my ffmpeg script failed.

Everything was working fine, but now the videomanifest won't load at all. I've been getting an error for a couple of weeks, and I can't get it to load.

"Video manifest URL not captured yet. Please wait a moment and try again, or refresh the page"

However, it never loads, no matter what I do. I can try loading it a thousand times and it gives the exact same error. It used to work before, but not anymore.

I've cleared the cache, reinstalled the Chrome extension... and it's still the same.

In Chrome DevTools (Inspect), the videomanifest doesn't load at all either, like it used to.

Is there any solution? Is there anything I can do?

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