Movie Stream is a minimal, concurrent HTTP/1.1 server written in C. It is designed to serve static files efficiently and simply, making it ideal for learning about HTTP servers or for lightweight file sharing.
- Automatically converts
.mkvfiles to HLS (.m3u8playlists and.tssegments) for web playback. - Handles basic
GETrequests (HTTP/1.1) - Concurrent client handling using a
fork()-based model - Automatic MIME type detection for served files
- Simple and minimal codebase for easy understanding and modification
- Logs basic request information to the console
- C compiler (e.g., gcc or clang)
- CMake >= 3.10
- FFmpeg Development Libraries:
libavcodec-devlibavformat-devlibavutil-devlibswscale-dev
- POSIX-compliant operating system (Linux, macOS, etc.)
-
Install Dependencies (Debian/Ubuntu/Raspberry Pi):
sudo apt-get update sudo apt-get install cmake libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
-
Clone the repository:
git clone https://github.com/jedlamartin/movie_stream cd movie_stream -
Configure and Build:
mkdir build cd build cmake .. cmake --build .
The server accepts command-line arguments to configure the port and connection limits.
./movie_stream [-p port] [-c max_connections]Start the server on a specific port (e.g., 8080): By default, the server serves files from the current working directory.
- Only
GETrequests are supported. - The server does not support HTTPS or advanced HTTP features.
- For each incoming connection, a new process is forked to handle the request.
- MIME types are detected based on file extensions.
This project is licensed under the MIT License.