What FFmpeg does and why you need it for SharePoint video
FFmpeg is a command-line tool that downloads and converts video files. SharePoint stores videos in formats that your browser streams but does not let you save directly — FFmpeg bypasses that restriction by capturing the video stream and saving it as a file on your computer.
SharePoint videos are typically hosted through Microsoft Stream or stored as MP4 files behind authentication. FFmpeg can download both, but the process differs depending on which one you have. The tool is free and runs on Windows, Mac, and Linux.
You will need to know your video's direct URL and have FFmpeg installed on your computer. If your SharePoint requires a login, you may need to pass your authentication token to FFmpeg as well — this is the most common stumbling block.
Key Takeaways
- FFmpeg downloads video by reading the stream URL directly, which you can find in your browser's network inspector or by right-clicking the video player.
- SharePoint videos behind a login require you to capture an authentication token and pass it to FFmpeg using the -headers flag.
- The basic FFmpeg command is ffmpeg -i "URL" output.mp4, but authenticated videos need additional headers to work.
- Microsoft Stream videos embedded in SharePoint may require you to find the actual MP4 URL rather than the Stream page URL.
- FFmpeg will overwrite existing files without warning, so rename your output file if you are downloading multiple videos.
Finding the video URL in SharePoint
Open the SharePoint page with the video in your web browser. Right-click the video player and select Inspect (or Inspect Element on Firefox). This opens the browser's developer tools.
Click the Network tab at the top of the developer tools panel. Reload the page or click play on the video. You will see a list of requests. Look for entries labeled m3u8, mp4, or manifest — these are the video stream files. Click on one and copy the full URL from the Request URL field at the bottom of the panel.
If you see only Microsoft Stream URLs, the video is hosted through Stream rather than stored directly in SharePoint. In that case, look for a URL containing streaming.media.azure.net or stream.microsoft.com. Copy that URL instead.
Installing FFmpeg on your computer
On Windows: Download the static build from ffmpeg.org. Unzip the folder and move it to C:\ffmpeg. Open Command Prompt, type setx PATH "%PATH%;C:\ffmpeg\bin", and press Enter. Close and reopen Command Prompt, then type ffmpeg -version to confirm it works.
On Mac: Open Terminal and type brew install ffmpeg if you have Homebrew installed. If not, install Homebrew first by visiting brew.sh. Type ffmpeg -version to confirm.
On Linux: Open a terminal and type sudo apt-get install ffmpeg on Ubuntu or Debian, or sudo yum install ffmpeg on Red Hat or CentOS. Type ffmpeg -version to confirm.
Downloading video without authentication
Open Command Prompt (Windows) or Terminal (Mac/Linux). Navigate to the folder where you want to save the video by typing cd C:\Users\YourName\Downloads (or your chosen folder path).
Type the following command, replacing the URL with the one you copied:
ffmpeg -i "https://your-sharepoint-url/video.mp4" output.mp4
Press Enter. FFmpeg will begin downloading and converting the video. A progress bar will show the percentage complete. Once it reaches 100%, the file output.mp4 will be in your folder.
If you get an error saying the URL is not found, the video may require authentication. Move to the next section.
Downloading video that requires SharePoint login
Authenticated videos need an authorization header. In your browser's developer tools, go to the Network tab again and click on the video request. Scroll down to the Request Headers section and find the line that starts with Authorization: or Cookie:. Copy the entire value after the colon (including "Bearer " if present).
In Command Prompt or Terminal, type this command, replacing the placeholders:
ffmpeg -headers "Authorization: Bearer YOUR_TOKEN" -i "https://your-sharepoint-url/video.mp4" output.mp4
If you copied a Cookie header instead, use this format:
ffmpeg -headers "Cookie: YOUR_COOKIE_VALUE" -i "https://your-sharepoint-url/video.mp4" output.mp4
Press Enter. The download will begin. If you still get an error, the token may have expired — refresh the SharePoint page in your browser and copy a fresh token from the Network tab.
Troubleshooting common download problems
Error: "Connection refused" or "URL not found" — The URL is incorrect or the video has been deleted. Go back to the Network tab in your browser and confirm you copied the full URL, including the protocol (https://).
Error: "401 Unauthorized" — Your authentication token has expired or is incorrect. Refresh the SharePoint page, open the Network tab again, and copy a fresh token. Tokens typically expire after 30 minutes to an hour.
Error: "403 Forbidden" — You do not have permission to download this video. Check with the SharePoint owner to confirm you have view access.
Download starts but stops partway through — Your internet connection may have dropped, or the token expired mid-download. Try again with a fresh token. If the file is very large, FFmpeg may time out — add -timeout 0 before the URL to disable the timeout.
The output file is created but is 0 bytes or corrupted — FFmpeg could not read the stream. Confirm the URL is a direct video link (ending in .mp4, .m3u8, or .ts) and not a web page URL. If it is a Stream URL, you may need to extract the actual MP4 link from the Stream player instead.
Frequently Asked Questions
Can I download a video from Microsoft Stream if it is embedded in SharePoint?
Yes, but you need the direct Stream URL, not the SharePoint page URL. In your browser's Network tab, look for a request to streaming.media.azure.net or stream.microsoft.com. Copy that URL and use it with FFmpeg. If you cannot find it, try right-clicking the Stream player itself and selecting Inspect.
What if FFmpeg says the format is not supported?
The URL may point to a playlist file (.m3u8) rather than a single video file. FFmpeg can handle this, but add -c copy before the output filename to avoid re-encoding: ffmpeg -i "URL" -c copy output.mp4. This is faster and preserves quality.
How long does a download take?
It depends on the video length and your internet speed. A 10-minute video on a standard broadband connection usually takes 1 to 3 minutes. FFmpeg shows a progress bar with the estimated time remaining.
Can I download multiple videos at once?
Yes, but you must run separate FFmpeg commands in different Command Prompt or Terminal windows, or use a batch script. If you use the same output filename, FFmpeg will overwrite the first video when the second one finishes.
Is it legal to download videos from SharePoint?
That depends on the video's ownership and your organization's policy. If you have permission to view the video, you generally have permission to download it for your own use. Check with your IT department or the video owner if you are unsure.