Last active
September 29, 2025 21:14
-
-
Save fartbagxp/51d4298c33e5f3c6277a65c64ca8088e to your computer and use it in GitHub Desktop.
Download from Microsoft Streams
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# Steps to extract and download a Microsoft Stream video: | |
# 1. Open the debug console in your browser (Ctrl + Shift + I). | |
# - Go to the "Network" tab. | |
# - Navigate to the video or reload the page with video (Ctrl + Shift + R). | |
# | |
# 2. In the Network tab, filter using the keyword: videomanifest | |
# - You’ll usually see three entries for three requests. | |
# - Right click on the URL and copy the URL from the last entry - this is the full video manifest link. | |
# | |
# 3. Use the yt-dlp command line tool with that URL to download the video in .mp4 format | |
# If using this script, run: | |
# bash stream-download.sh "$url" "$file_name" | |
# Otherwise, run it directly using yt-dlp: | |
# yt-dlp -o "output.mp4" "$url" | |
# | |
# 4. (Optional) Rename the output.mp4 file afterward. | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 <url> [output-file]" | |
exit 1 | |
fi | |
URL="$1" | |
OUTPUT_FILE="${2:-output.mp4}" | |
if ! command -v yt-dlp >/dev/null 2>&1; then | |
echo "❌ yt-dlp is not installed." | |
echo "Please install it from: https://github.com/yt-dlp/yt-dlp#installation" | |
exit 1 | |
fi | |
echo "📥 Downloading from: $URL" | |
echo "💾 Saving as: $OUTPUT_FILE" | |
yt-dlp -o "$OUTPUT_FILE" "$URL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment