A lightweight, high-performance HTTP video streaming server written in Go. Stream your video files directly to any media player that supports HTTP range requests - no transcoding required!
- Zero Transcoding: Serves original video files directly for maximum quality and minimal CPU usage
- Full Seeking Support: HTTP range requests enable instant seeking to any timestamp
- Multi-Format Support: Works with MKV, MP4, AVI, MOV, WMV, FLV, WebM
- Web File Browser: Built-in HTML interface to browse available videos
- High Performance: Concurrent streaming with efficient 1MB chunked delivery
- Security: Directory traversal protection
- Zero Dependencies: Single binary using only Go standard library
- Cross-Platform: Linux, Windows, macOS support
- Production Ready: Comprehensive test suite with CI/CD validation
# Download for your platform from releases
wget https://github.com/jtonl/vs/releases/latest/vs
chmod +x vsgit clone https://github.com/jtonl/vs.git
cd vs
go build vs.go
# Run tests to verify build
go test -v# Start server with default settings (port 32767, current directory)
./vs
# Specify video directory
./vs /path/to/your/movies
# Custom directory and port
./vs /path/to/movies 8080- Start the server:
./vs - Open VLC → Media → Open Network Stream
- Enter URL:
http://your-server-ip:32767/your-video.mkv - Enjoy instant seeking and full playback control!
Navigate to http://your-server-ip:32767/ to browse available videos and get direct streaming links.
# Stream a specific movie
curl -H "Range: bytes=0-1048576" http://localhost:32767/movie.mkv
# Get video info
ffprobe http://localhost:32767/movie.mkv
# Download specific portion
wget --header="Range: bytes=1000000-2000000" http://localhost:32767/movie.mkvVideo "vs" Server implements HTTP/1.1 range requests (RFC 7233) for efficient video streaming:
Client Request: GET /video.mkv HTTP/1.1
Range: bytes=1048576-2097151
Server Response: HTTP/1.1 206 Partial Content
Content-Range: bytes 1048576-2097151/4294967296
Content-Length: 1048576
[1MB video chunk]
This enables:
- Instant seeking: Jump to any timestamp without buffering from start
- Bandwidth efficiency: Only download requested portions
- Multiple connections: Different clients can request different ranges simultaneously
| Feature | Video "vs" Server | FFmpeg Streaming |
|---|---|---|
| CPU Usage | Minimal | High (encoding) |
| Seeking | Instant | Restart required |
| Quality | Original | Transcoded |
| Startup Time | Immediate | Encoding delay |
| Bandwidth | Efficient | Fixed bitrate |
| Multiple Clients | ✅ | Limited |
export VS_PORT=32767
export VS_DIR=/path/to/videos
./vs[Unit]
Description=vs
After=network.target
[Service]
Type=simple
User=videoserver
ExecStart=/usr/local/bin/vs /opt/videos 32767
Restart=always
[Install]
WantedBy=multi-user.target- Directory traversal protection: Prevents access outside specified video directory
- No file uploads: Read-only server, no write operations
- No authentication: Designed for trusted networks (add reverse proxy for auth)
Comprehensive test suite covering:
- HTTP Server: Full file serving, error handling, status codes
- Range Requests: Valid/invalid ranges, partial content (RFC 7233)
- Security: Directory traversal prevention, access control
- File Browser: HTML generation, video filtering, subdirectories
- Performance: Benchmarks for serving, range requests, file listing
- Concurrency: Race condition detection and concurrent access safety
# Run full test suite
go test -v
# Run with race detection
go test -race -v
# Run benchmarks
go test -bench=. -v
# Run with coverage report
go test -cover -vBenchmarked on modest hardware:
- Concurrent streams: 50+ simultaneous clients
- Memory usage: ~10MB base + minimal per connection
- Throughput: Limited only by network bandwidth
- Latency: Sub-millisecond response times
# For high-traffic scenarios
ulimit -n 65536 # Increase file descriptor limit
echo 'net.core.somaxconn = 65536' >> /etc/sysctl.conf- VLC Media Player (recommended)
- MPV Player
- Web Browsers (Chrome, Firefox, Safari)
- Mobile Apps (VLC Mobile, MX Player)
- Smart TVs (models supporting HTTP streaming)
- Kodi/Plex (as HTTP source)
- Lighter resource usage: No database, no metadata scanning
- Faster startup: Immediate availability
- Direct file access: No library management needed
- Simple deployment: Single binary
MIT License - see LICENSE file for details.
Video "vs" Server - When you need video streaming that just works! 🎥✨