This guide covers setting up and running OpenCarStream natively on macOS (Apple Silicon). Running natively allows the application to directly interface with Apple's VideoToolbox framework, enabling hardware-accelerated H.264 video encoding and decoding.
Using native hardware encoding drastically reduces CPU load, runs cool and quiet on Apple Silicon Macs, and improves streaming framerate and stability.
- Apple Silicon Mac (M1, M2, M3, M4, etc.) running macOS.
- Homebrew installed. If you do not have it, install it from brew.sh.
- Python 3.12+ (Python 3.13 is fully supported).
- (Optional but recommended)
uvfor lightning-fast virtual environments. Install it via:brew install uv.
Run the native setup script from the root of the repository:
chmod +x setup_native.sh
./setup_native.shThis script will:
- Check that you are running on macOS Apple Silicon.
- Check and install
ffmpegandnodevia Homebrew (needed byyt-dlpfor video signatures). - Set up a python virtual environment (under
.venv/) and install/upgradeyt-dlp. - Create local folders for configurations (
config/), media (local-media/), and IPTV lists (iptv_lists/).
To run the server in your active terminal:
chmod +x run_native.sh
./run_native.shBy default, the server will start on http://localhost:33333.
Press Ctrl+C in your terminal to stop it.
All environment variable configuration defaults to mapping paths directly inside your workspace:
- Local Media Folder:
./local-media - IPTV Lists Folder:
./iptv_lists - Config Folder:
./config
If you want to override these, you can create a .env file in the root directory (similar to docker-compose.yml environment block) or set them directly in your shell environment:
PORT=8080 LOCAL_MEDIA_DIR=/Users/name/Movies ./run_native.shOpenCarStream can run silently in the background as a macOS launchd agent, starting automatically whenever you log in.
A helper script is provided to manage the background service:
chmod +x manage_service.sh
# Install and start the background service
./manage_service.sh install
# Check service status (shows PID and resource utilization)
./manage_service.sh status
# Follow logs in real-time
./manage_service.sh logs
# Restart the service
./manage_service.sh restart
# Stop the service
./manage_service.sh stop
# Uninstall the service
./manage_service.sh uninstallLogs are written directly to ./server.log inside the repository directory.
You can sync your YouTube subscriptions to browse them in the car browser:
# Fetches your subscriptions from Chrome cookies and saves to config/subscriptions.json
uv run sync_subscriptions.py --browser chrome --output config/subscriptions.jsonIf you are using the background launchd service, restart it to load the subscriptions:
./manage_service.sh restartTo confirm that your server is successfully using hardware-accelerated transcoding:
- Open your browser and navigate to
http://localhost:33333 - Start streaming any video.
- Check the logs (
./manage_service.sh logsif running in the background, or your terminal window). - Look for the following lines:
[INFO] Selected encoder: h264_videotoolbox[INFO] HW accel args: ['-hwaccel', 'videotoolbox']
You will also notice that Python/FFmpeg CPU usage in Activity Monitor remains extremely low (typically under 15% even during high-resolution streams) due to the encoding task being offloaded to the Apple Silicon hardware media engines.