How to Stream Video via FFmpeg HTTP Progressive Download

This guide explains how to stream video files over a local area network (LAN) using FFmpeg’s built-in HTTP server capabilities. You will learn how to configure FFmpeg to serve a compatible MP4 video stream using progressive download settings and how to access the stream from another device on your network using a media player like VLC.

Step 1: Prepare the FFmpeg Command

FFmpeg can act as a basic HTTP server using the -listen 1 flag. To stream an MP4 file over HTTP progressive download, the video must be fragmented so the receiving client can start playback without waiting for the entire file to download.

Run the following command in your terminal or command prompt:

ffmpeg -re -i input.mp4 -c:v libx264 -preset veryfast -c:a aac -f mp4 -movflags frag_keyframe+empty_moov -listen 1 http://0.0.0.0:8080

Command Breakdown:

Step 2: Find Your Local IP Address

To connect from another device, you need the local IP address of the host computer running FFmpeg.

Step 3: Receive and Play the Stream

Once the FFmpeg command is running, it will wait for a client to connect. You can open the stream on any device connected to the same local network.

  1. Open a media player that supports network streams, such as VLC Media Player.

  2. Go to Media > Open Network Stream (or press Ctrl+N).

  3. Enter the URL using your host computer’s local IP address and the port specified in the FFmpeg command:

    http://[YOUR_IP_ADDRESS]:8080 (e.g., http://192.168.1.5:8080)

  4. Click Play. FFmpeg will immediately begin processing and streaming the video to your player.