Download Video from a URL to MP4

A video URL can point at a file, at a playlist, or at a page that assembles video in JavaScript. Only the first one converts in a single step. Knowing which you have is the whole job.

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 likeIt really isWhat to do
…/video.mp4A media fileDownload it. It is already done.
…/index.m3u8 or …/manifest.mpdA playlist describing segmentsFetch segments, remux into MP4
…/watch/abc123A page that loads mediaAnalyze the page first

Getting to MP4

1

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.

2

Download or fetch-and-merge

Files download directly. Streams need their segments collected and combined into a container.

3

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.

4

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.

5

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.

One URL in, one MP4 out

Free for macOS and Windows.

Download VidBrowser free

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.