How to Download M3U8 Streams (FFmpeg)
An m3u8 is a playlist, not the video itself, so “Save as” won't work. The reliable way is to let ffmpeg fetch the segments and mux them into an MP4.
⚠️ Only download content you own, content whose rights holder permits it, or content that is otherwise cleared. Downloading illegally uploaded content may be a criminal offense in your jurisdiction.
1. Install ffmpeg
# macOS (Homebrew)
brew install ffmpeg
# Windows (winget)
winget install ffmpeg
# Ubuntu / Debian
sudo apt install ffmpeg2. Basic download
Point ffmpeg at the URL and use -c copy — fast and lossless since nothing is re-encoded.
ffmpeg -i "https://example.com/stream.m3u8" -c copy -bsf:a aac_adtstoasc output.mp43. Choosing a quality variant
A master playlist contains multiple qualities. List them first, then pick one with -map:
# ストリーム一覧を確認
ffprobe "https://example.com/master.m3u8"
# 例: 2番目のバリアント(プログラム1)を保存
ffmpeg -i "https://example.com/master.m3u8" -map 0:p:1 -c copy output.mp44. Troubleshooting
- HTTP 403 — some origins check Referer or User-Agent: add -headers "Referer: https://…".
- Audio desync or unseekable output — retry with -bsf:a aac_adtstoasc and -movflags +faststart.
- DRM-protected streams cannot be saved (not even with ffmpeg).
Already have TS files?
If you already have .ts files, use our in-browser MP4 converter — no command line needed.