Short answer: if the URL ends in .mp4 or .webm, it downloads and is already an MP4-compatible file. If it ends in .m3u8 or .mpd, it is a playlist — download its segments and remux them into MP4 without re-encoding. If it is a plain page URL, analyze the page to find out which of the two it hides.
Three kinds of video URL
| URL looks like | It really is | What to do |
|---|---|---|
…/video.mp4 | A media file | Download it. It is already done. |
…/index.m3u8 or …/manifest.mpd | A playlist describing segments | Fetch segments, remux into MP4 |
…/watch/abc123 | A page that loads media | Analyze the page first |
Getting to MP4
Identify the target
Look at the URL. If it is a page address, analyze it to list the media resources it loads and pick the real one.
Download or fetch-and-merge
Files download directly. Streams need their segments collected and combined into a container.
Remux, don’t re-encode
Remuxing copies the existing encoded streams into the MP4 container. It is fast and lossless. Re-encoding decodes and compresses again, which takes much longer and loses quality. See the FFmpeg documentation for the distinction in practice.
Handle separate audio and video
Adaptive sources often deliver audio and video as separate renditions. Both must be selected at merge time or the MP4 will be silent.
Verify the result
Play the finished MP4 to the end. A file that is truncated usually means the last segments were not fetched before the playlist expired.
Common failures
403 partway through
Segment addresses are signed with an expiry. Restart rather than resume.
No audio in the MP4
Only the video rendition was merged. Select both tracks.
Quality is worse than the original
Something re-encoded. Check that the step is a remux.
Doing this in VidBrowser
VidBrowser is a free desktop app for macOS and Windows. Analyze the page and it lists every video resource the page loads — direct files, HLS playlists, DASH manifests, and player segments. Direct files save as served; streams are probed and merged with FFmpeg into MP4 or MKV; adaptive sources keep their highest available rendition.
Everything runs locally, so a signed segment request comes from your own session rather than a remote service.
Frequently asked questions
How do I convert a video URL to MP4?
If it is a direct file URL, it is already MP4-compatible — just download it. If it is a playlist URL, fetch the segments and remux them into the MP4 container without re-encoding.
Why does the URL end in .m3u8 instead of .mp4?
Because it is an HLS playlist, not a video. It lists the addresses of short segments and their playback order. The video exists across those segments, which is why saving the URL itself gives you a text file.
Does converting to MP4 reduce quality?
Not if you remux. Remuxing copies the existing streams into a container. Quality is lost when you re-encode, which is a different and slower operation.
Can I save a streaming video as MP4?
Yes, when it plays in an ordinary browser session. Fetch the segments and merge them into MP4. Protected delivery is a different mechanism and out of scope.
Which is better, MP4 or MKV?
MP4 for compatibility across players, phones, and editors. MKV when the stream carries unusual subtitle or track layouts.
