Skip to main content
Software Guides

How to use VLC Media Player to record and save live M3U8 streams

VLC Media Player is a powerful, open-source multimedia player that can do much more than just play local video files. One of its most useful engineering features is the ability to connect to HTTP Live Streaming (HLS) endpoints and record or save live M3U8 streams directly to your hard drive. This comprehensive guide will walk you through the exact steps to use VLC Media Player to record live M3U8 streams, configure the output format without quality loss, and troubleshoot common recording errors.

Whether you want to archive a live broadcast, capture a webinar for later study, or save a streaming video for offline viewing on an airplane, VLC makes the process remarkably straightforward once you understand how it processes network streams under the hood.

Why use VLC to record M3U8 streams?

M3U8 files are not actual video files; they are plain text playlists that point to hundreds or thousands of tiny video segments (usually .ts, .m4s, or .aac files) hosted on a CDN. You cannot simply "right-click and download" an M3U8 file like an MP4 and expect it to play offline. You need specialized software that can read the text playlist, download the segments sequentially in real-time, and merge them into a single coherent file.

VLC is ideal for this task because:

  • It natively understands the HLS protocol and parses both master and media playlists automatically.
  • It handles live stream mechanics seamlessly, downloading segments as they are published to the server and appending them to your file.
  • It allows you to "dump" the raw stream without re-encoding, preserving the exact original broadcast quality and minimizing your computer's CPU usage to near zero.
  • It is entirely free, open-source, and available on all major operating systems including Windows, macOS, and Linux.

Step-by-Step: Recording an M3U8 stream with VLC

There are two primary methods for recording an M3U8 stream in VLC: using the interactive "Convert/Save" GUI, or using the hidden "Record" button on the playback interface. We highly recommend the Convert/Save method as it is significantly more reliable for long-running live HLS streams.

Step 1: Obtain the direct M3U8 URL

First, you need the absolute, direct M3U8 URL of the stream. If you are watching a video in your browser, open the browser's Developer Tools (F12 or Ctrl+Shift+I), navigate to the Network tab, type "m3u8" into the filter box, and refresh the page. Right-click the URL of the master or media playlist that appears and select "Copy link address".

Step 2: Open the Convert/Save menu

  1. Open your VLC Media Player desktop application.
  2. Click on Media in the top-left menu bar (or File if you are on macOS).
  3. Select Convert / Save... (Shortcut: Ctrl + R on Windows).
  4. In the "Open Media" dialog window, click on the Network tab at the top.

Step 3: Enter the URL and configure the output

  1. Paste your copied M3U8 URL into the "Please enter a network URL" text field.
  2. Click the Convert / Save button at the bottom of the window.
  3. In the "Convert" window, look at the Profile dropdown. By default, VLC might try to re-encode the video (e.g., to Video - H.264 + MP3 (MP4)). You do not want this, as it degrades quality and uses excessive CPU.
  4. Crucial Step: To keep the original quality, click the small wrench icon next to the profile to edit it. Check the boxes for "Keep original video track" (under the Video codec tab) and "Keep original audio track" (under the Audio codec tab), then set the encapsulation to MP4 or TS. Click Save.
  5. In the "Destination" section, click Browse, choose where you want to save the final file on your hard drive, and give it a name (e.g., mystream.mp4).

Pro Tip: The Dump Raw Input option

If you don't want to mess with profiles, check the "Dump raw input" checkbox if it is available in your version of VLC. This tells VLC to simply write the incoming HLS segments directly to disk in their native MPEG-TS format without touching the codecs at all. It is the safest way to record.

Step 4: Start the recording

Click Start. The VLC playback window will appear, but you might not see any video or hear any audio—this is normal when converting. Instead, the progress bar timeline will start moving, indicating that VLC is actively connecting to the stream, downloading segments, and writing the data to your destination file.

To stop the recording, simply click the Stop button (the square icon) in VLC. Do not just close the VLC window abruptly, or the final file container might not be properly finalized, resulting in a corrupted, unplayable file.

Alternative Method: The Record Button

If you want to actually watch the stream while you record it simultaneously, you can use VLC's Record button feature.

  • Go to View > Advanced Controls. A new row of buttons will appear above the standard play controls, including a distinct red Record button.
  • Go to Media > Open Network Stream, paste your M3U8 URL, and click Play.
  • While watching the video, click the red Record button to start capturing the stream to disk. Click it again to stop.
  • The recorded file will automatically be saved to your computer's default "Videos" or "Documents" folder.

Troubleshooting VLC M3U8 Recording Errors

Recording live HTTP streams doesn't always go perfectly. Here are common issues encountered by users and how to fix them:

VLC closes immediately or does not record

This usually means the M3U8 URL has expired (token expiry), is geo-blocked, or requires specific HTTP headers (like a custom User-Agent, Referer, or Cookie) that VLC is not sending. You may need to use a command-line tool like FFmpeg or streamlink to pass the exact required headers.

The recorded file is unplayable or 0 bytes

If the stream is encrypted (e.g., AES-128 DRM), VLC cannot decrypt it unless it has access to the key file. If the key file is blocked by the server or CORS, the recording will fail. Note that VLC absolutely cannot record DRM-protected streams like Widevine or FairPlay under any circumstances.

Audio is out of sync in the recorded file

Live streams often have timestamp discontinuities or variable segment lengths. When VLC tries to package these into an MP4 container on the fly, it can cause severe A/V sync issues. Try setting the VLC output encapsulation profile strictly to MPEG-TS instead of MP4, as the TS container is designed for live streams and handles timestamp resets natively.

When to use FFmpeg instead of VLC

While VLC is fantastic for GUI users, FFmpeg is much more robust for recording complex HLS streams, especially for long-duration live broadcasts that might have network drops. If VLC keeps crashing or the stream disconnects unexpectedly, open your terminal and run this FFmpeg command:

ffmpeg -i "https://example.com/stream.m3u8" -c copy capture.ts

FFmpeg handles stream errors, HTTP retries, and PTS discontinuities much better than VLC for automated, headless, or long-term recording tasks.

Conclusion

VLC Media Player remains one of the most accessible and powerful tools for recording M3U8 streams. By utilizing the Convert/Save feature and ensuring you are copying the original video and audio tracks without re-encoding, you can reliably capture live HLS broadcasts for offline viewing in pristine quality.