Skip to content

Instantly share code, notes, and snippets.

@mfd
Last active June 13, 2025 08:56
Show Gist options
  • Save mfd/c990a01d626847a6d7e823dceca598e1 to your computer and use it in GitHub Desktop.
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

@PrimusInt3rPar3s
Copy link

PrimusInt3rPar3s commented May 14, 2025

Works beautifully. Remove everything from the URL after and including the & at ...format=dash&...

Paste the URL into yt-dlp 'URL' -o <your-destination-file-name>.mp4 .. without the -o option yt-dlp will complain about the filename being too long.

Thanks Very Much

It's Finally Worked like a Charm

yt-dlp "The Manifest URL to ......&part=index&format=dash" -o DesiredVideoName.mp4

Note : You May Export and Get the Cookies File

And the Downloaded File Will be available at "C:\Users\Your_User_Folder"

@agaramja
Copy link

agaramja commented May 30, 2025

I created an extension (with ChatGPT) that generates an FFmpeg command for downloading videos from SharePoint. It also allows you to download the transcription file. You can try it out here: https://github.com/MexxDirkx/SharePoint-Video-Downloader-Extension.

How to use can you please guide in detail.

@vitkolar
Copy link

vitkolar commented Jun 4, 2025

@shebenu Yes, It can work for ms stream , just do those steps

  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. Go to notepad and paste this url
  5. Delete the section starts with "&alt...." till the end of the url
  6. Copy the new url
  7. Go to windows powershell and run it as admin..
  8. Write this command
    ffmpef -i "new url" - videoname.mp4
    AND JUST WAIT!

it still works ;-)

@agaramja
Copy link

agaramja commented Jun 5, 2025

2. videomanifest

But didn't find any URL to copy. The "videomanifest" is just an empty search.

Uhere is the URL

@tom10271
Copy link

tom10271 commented Jun 13, 2025

I created an extension (with ChatGPT) that generates an FFmpeg command for downloading videos from SharePoint. It also allows you to download the transcription file. You can try it out here: https://github.com/MexxDirkx/SharePoint-Video-Downloader-Extension.

How to use can you please guide in detail.

It is a Google Chrome extension. The current master commit is working fine for me. You can download and unzip the extension by https://github.com/MexxDirkx/SharePoint-Video-Downloader-Extension/archive/refs/heads/main.zip. Once unzipped go to chrome://extensions/ using Google Chrome and enable Developer mode on the top right corner, click Load unpacked, go to the unzipped folder and click select. You should see the extension enabled.
Screenshot 2025-06-13 at 4 55 06 PM

Go to the Sharepoint video page you would like to download and click the extension icon then Detect video and copy the generated FFMPEG command to download the video.
Screenshot 2025-06-13 at 4 53 20 PM

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