-
Notifications
You must be signed in to change notification settings - Fork 0
Installation Guide
Complete installation documentation for all platforms.
Option 1: SwiftUI Installer (Native macOS - Recommended)
- Build the installer first (see BUILD_SWIFTUI.md or use Xcode)
-
Double-click
Install-StreamTV-SwiftUI.command - The native SwiftUI installer window will open
- Click "Start Installation"
- Wait for installation to complete
- Click "Fix Issues" if any problems are detected (optional)
- Click "Close" when done
Option 2: Python GUI Installer (No Build Required)
-
Double-click
Install-StreamTV.command - The Python GUI installer window will open
- Click "Start Installation"
- Wait for installation to complete
- Click "Fix Issues" if any problems are detected (optional)
- Click "Close" when done
-
SwiftUI:
Install-StreamTV-SwiftUI.command- Native macOS experience (requires build) -
Python GUI:
Install-StreamTV.command- Python-based GUI (no build needed) -
Shell Script:
./install-gui.sh- Run from Terminal -
Command-Line:
./install_macos.sh- Traditional installer
The installer automatically:
- ✓ Checks for Python (opens installer if needed)
- ✓ Checks for FFmpeg (installs via Homebrew or direct download)
- ✓ Creates virtual environment
- ✓ Installs all Python packages
- ✓ Sets up configuration
- ✓ Initializes database
- ✓ Creates default channels
- ✓ Creates launch scripts
- ✓ Optional: AI Troubleshooting Assistant (Ollama) - Prompts during installation
-
Start StreamTV: Run
~/.streamtv/start_server.shor./start_server.sh - Open Browser: Go to http://localhost:8410
-
Explore the Web Interface:
- Documentation: Click "Documentation" in the sidebar to access all guides
- Streaming Logs: Click "Streaming Logs" to view real-time logs and errors
- Self-Healing: Click on any error in the logs to see details and auto-fix options
- Enjoy: Your IPTV platform is ready!
All documentation is now available directly in the web interface:
- Click "Documentation" in the sidebar dropdown
- Browse guides: Quick Start, Beginner, Installation, Path Independence, GUI Installer, SwiftUI Installer
- Click script buttons in documentation to run diagnostics
- Access troubleshooting guides from the "Troubleshooting" dropdown
Monitor and fix issues automatically:
- Access: Click "Streaming Logs" in the Resources section
- Real-Time Monitoring: See logs as they happen (Server-Sent Events)
- Error Detection: Errors and warnings are automatically highlighted
-
Click for Details: Click any error/warning to see:
- Full error context (20 lines before/after)
- Matched troubleshooting scripts
- "Self-Heal" button to automatically run fixes
- Auto-Fix Prompts: When scripts detect fixable issues (e.g., missing yt-dlp, DNS issues), you'll be prompted to apply fixes automatically
During installation, you'll be prompted to optionally install Ollama for AI-powered troubleshooting:
- What is it?: An AI assistant that analyzes errors and suggests fixes
- Storage: ~9 GB total (Ollama base + AI model)
- Cost: 100% free - runs entirely on your Mac
- Models: The installer scans your hardware and shows available models
- Recommended: Mistral 7B (~4GB) - best balance of quality and size
- Skip: You can skip this and install later if desired
Features:
- Analyzes log errors and provides explanations
- Suggests fixes based on your system configuration
- Learns from patterns in your logs
- Completely private - no data leaves your Mac
Run diagnostic scripts directly from the web interface:
- From Documentation: Click script buttons (e.g., "Run Script: test_connectivity")
- From Logs: Click "Self-Heal" on error detail pages
-
Available Scripts:
- Network diagnostics (with DNS auto-fix for macOS)
- Python/FFmpeg verification
- Database integrity checks
- Port availability checks
- On macOS, tkinter should be included with Python
- If missing, reinstall Python from python.org
- The installer will download and open Python installer automatically
- After installation, run the installer again
- The installer will try Homebrew first
- Then direct download for Apple Silicon
- Or provide manual installation instructions
Make files executable:
chmod +x Install-StreamTV.command
chmod +x install-gui.sh- Make sure you're not running via SSH
- Check Python and tkinter are installed
- Try running from Terminal:
./install-gui.sh
- See
README.mdfor full documentation - See
GUI_INSTALLER_README.mdfor detailed GUI installer info - See
PATH_INDEPENDENCE.mdfor path independence details
The GUI installer provides a user-friendly graphical interface for installing and updating StreamTV on macOS.
Each module shows its status with color-coded indicators:
- Green Checkmark (✓): Module installed/updated successfully
- Yellow Warning (⚠): Module has issues but installation continued
- Red Error (✗): Module installation failed
The installer automatically detects:
- Existing installations: Checks if modules are already installed
- Updates needed: Identifies modules that need updating
- Corrupted installations: Detects and offers to fix corrupted modules
When issues are detected, the installer can:
- Recreate corrupted virtual environments
- Reinstall missing dependencies
- Fix configuration file issues
- Repair database corruption
- macOS 10.9 (Mavericks) or later
- Python 3.8 or higher (will be installed if missing)
- tkinter (included with Python)
Option 1: SwiftUI Installer (Native macOS - Recommended)
- Build the SwiftUI installer first (see BUILD_SWIFTUI.md)
-
Double-click
Install-StreamTV-SwiftUI.command - The native SwiftUI installer window will open
- Click "Start Installation"
- Wait for installation to complete
- Click "Fix Issues" if any problems are detected (optional)
- Click "Close" when done
Option 2: Python GUI Installer (No Build Required)
-
Double-click
Install-StreamTV.command - The Python GUI installer window will open
- Click "Start Installation"
- Wait for installation to complete
- Click "Fix Issues" if any problems are detected (optional)
- Click "Close" when done
-
SwiftUI:
Install-StreamTV-SwiftUI.command- Native macOS experience -
Python GUI:
Install-StreamTV.command- Python-based GUI -
Shell Script:
./install-gui.sh- Run from Terminal -
Python Direct:
python3 install_gui.py- Direct Python execution
The installer automatically:
- ✓ Checks for Python (opens installer if needed)
- ✓ Checks for FFmpeg (installs via Homebrew or direct download)
- ✓ Creates virtual environment
- ✓ Installs all Python packages
- ✓ Sets up configuration
- ✓ Initializes database
- ✓ Creates default channels
- ✓ Creates launch scripts and launchd service
On macOS, tkinter should be included with Python. If you see this error:
- Reinstall Python from python.org (not Homebrew Python)
- Or install tkinter separately (rarely needed)
The installer will:
- Download Python installer automatically
- Open the installer for you
- After installation, run the installer again
The installer will try:
- Homebrew installation (if Homebrew is installed)
- Direct download for Apple Silicon
- Manual installation instructions if both fail
If you see permission errors:
- Make files executable:
chmod +x Install-StreamTV.command - For system-wide installation, you may need to run with sudo (not recommended)
If the GUI doesn't open:
- Make sure you're not running via SSH
- Check that Python and tkinter are installed
- Try running from Terminal:
./install-gui.sh - Check Console.app for error messages
Once installation is complete:
- Start StreamTV using
~/.streamtv/start_server.sh - Or run:
./start_server.sh(if in StreamTV directory) - Access the web interface at: http://localhost:8410
- Enjoy your IPTV streaming platform!
If you prefer command-line installation:
./install_macos.shThe installer works from any location:
- Move it to any folder
- Run from USB drive
- Create shortcuts anywhere
- Works even if symlinked
See PATH_INDEPENDENCE.md for details.
Complete installation guide for StreamTV on macOS.
Run the automated installation script:
./install_macos.shThis script will:
- Check and install Python 3.8+ from python.org
- Install FFmpeg from official sources (Homebrew as fallback)
- Set up a virtual environment
- Install all Python dependencies
- Configure the platform
- Initialize the database
- Create default channels
- Create launch scripts
- Optionally start the server
If you prefer to install manually:
Download and install from python.org:
- Choose the macOS installer for your architecture (Intel or Apple Silicon)
- Run the installer and follow the instructions
- Verify installation:
python3 --version
For Apple Silicon Macs, download from evermeet.cx:
curl -L -o /tmp/ffmpeg.zip https://evermeet.cx/ffmpeg/ffmpeg-6.1.1.zip
unzip -q -o /tmp/ffmpeg.zip -d /tmp/
sudo mv /tmp/ffmpeg /usr/local/bin/ffmpeg
sudo chmod +x /usr/local/bin/ffmpegbrew install ffmpegpython3 -m venv ~/.retro-tv-simulator/venv
source ~/.retro-tv-simulator/venv/bin/activatepip install --upgrade pip setuptools wheel
pip install -r requirements.txtcp config.example.yaml config.yaml
# Edit config.yaml as neededpython3 -c "from streamtv.database.session import init_db; init_db()"python3 scripts/create_channel.pypython3 -m streamtv.main-
Virtual Environment:
~/.streamtv/venv -
Launch Script:
~/.streamtv/start_server.sh -
Service Plist:
~/Library/LaunchAgents/com.streamtv.plist -
Logs:
~/.streamtv/server.log
The installation script creates a macOS LaunchAgent. To use it:
# Load the service
launchctl load ~/Library/LaunchAgents/com.retro-tv-simulator.plist
# Unload the service
launchctl unload ~/Library/LaunchAgents/com.retro-tv-simulator.plist
# Check status
launchctl list | grep retro-tv-simulatorRun the uninstall script:
./uninstall_macos.shThis will:
- Stop the server
- Remove the service
- Remove installation files
- Optionally remove the database
If Python is not found after installation:
- Restart your terminal
- Check PATH:
echo $PATH - Verify installation:
/usr/local/bin/python3 --version
If FFmpeg is not found:
- Check if it's in PATH:
which ffmpeg - For user installation: Add
~/.local/binto PATH in~/.zshrc:export PATH="$HOME/.local/bin:$PATH"
- Restart terminal or run:
source ~/.zshrc
If port 8410 is already in use:
- Change port in
config.yaml:
Option A: Using Xcode (Recommended)
- Open
StreamTVInstaller/StreamTVInstaller.xcodeprojin Xcode - Select "My Mac" as destination
- Press
Cmd+Bto build - The app will be in
StreamTVInstaller/build/StreamTV Installer.app
Option B: Using Build Script
./build-installer.shDouble-Click Method:
- Double-click
Install-StreamTV-SwiftUI.command - The native SwiftUI installer will open
- Click "Start Installation"
Direct App Launch:
- Navigate to
StreamTVInstaller/build/StreamTV Installer.app - Double-click the app
- Native macOS Experience: Built with SwiftUI
- Beautiful Interface: Follows macOS design guidelines
- Smooth Animations: Native macOS animations
- Dark Mode: Automatic dark mode support
- Accessibility: Full VoiceOver support
Same as the Python installer:
- ✓ Python (opens installer if needed)
- ✓ FFmpeg (installs via Homebrew or direct download)
- ✓ Virtual environment
- ✓ Python dependencies
- ✓ Configuration
- ✓ Database
- ✓ Default channels
- ✓ Launch scripts
Install Xcode from the App Store, then:
xcode-select --install- Make sure Xcode is up to date
- Clean build:
rm -rf build/ - Rebuild in Xcode
Right-click → Open (to bypass Gatekeeper)
- Better Performance: Native SwiftUI is faster
- Modern UI: Follows macOS Human Interface Guidelines
- Better Integration: Works seamlessly with macOS
The SwiftUI installer provides a native macOS experience with a beautiful, modern interface built using Apple's SwiftUI framework.
- SwiftUI Interface: Built with Apple's modern UI framework
- Native Look & Feel: Matches macOS design guidelines
- Smooth Animations: Native macOS animations and transitions
- Accessibility: Full VoiceOver and accessibility support
- Dark Mode: Automatic dark mode support
Each module shows its status with native macOS icons:
- Green Checkmark: Module installed/updated successfully
- Yellow Warning: Module has issues but installation continued
- Red Error: Module installation failed
The installer automatically detects:
- Existing installations: Checks if modules are already installed
- Updates needed: Identifies modules that need updating
- Corrupted installations: Detects and offers to fix corrupted modules
When issues are detected, the installer can:
- Recreate corrupted virtual environments
- Reinstall missing dependencies
- Fix configuration file issues
- Repair database corruption
- Open
StreamTVInstaller/StreamTVInstaller.xcodeprojin Xcode - Select "My Mac" as the destination
- Press
Cmd+Bto build - Press
Cmd+Rto run - The app will be built in
StreamTVInstaller/build/StreamTV Installer.app
./build-installer.shThis will:
- Build the SwiftUI app
- Create a standalone
.appbundle - Place it in the
build/directory
cd StreamTVInstaller
swift build -c release- Build the installer (see above)
-
Double-click
Install-StreamTV-SwiftUI.command - The SwiftUI installer will open automatically
- Click "Start Installation"
- Wait for installation to complete
- Click "Fix Issues" if any problems are detected (optional)
- Navigate to
StreamTVInstaller/build/StreamTV Installer.app - Double-click the app
- The installer will open
open "build/StreamTV Installer.app"- macOS: 11.0 (Big Sur) or later
- Xcode: 13.0 or later (for building)
- Swift: 5.5 or later
The installer automatically:
- ✓ Checks for Python (opens installer if needed)
- ✓ Checks for FFmpeg (installs via Homebrew or direct download)
- ✓ Creates virtual environment
- ✓ Installs all Python packages
- ✓ Sets up configuration
- ✓ Initializes database
- ✓ Creates default channels
- ✓ Creates launch scripts and launchd service
- Better Performance: Native SwiftUI is faster than Tkinter
- Modern UI: Follows macOS Human Interface Guidelines
- Better Integration: Works seamlessly with macOS features
- Smooth Animations: Native macOS animations
- Dark Mode: Automatic dark mode support
- Accessibility: Full VoiceOver support
- Native Dialogs: Uses macOS native alert dialogs
- Type Safety: Swift's type system prevents errors
- Modern Language: Swift is Apple's modern language
- Better Tooling: Xcode provides excellent debugging
To build the SwiftUI installer, you need Xcode:
- Install Xcode from the App Store
- Open Xcode and accept the license
- Install command line tools:
xcode-select --install
If the build fails:
- Make sure Xcode is up to date
- Check that all Swift files are in
StreamTVInstaller/directory - Try cleaning the build:
rm -rf build/ - Rebuild using Xcode
If the app won't open:
- Right-click the app → Open (to bypass Gatekeeper)
- Check System Preferences → Security & Privacy
- Make sure the app is notarized (for distribution)
StreamTV now integrates with the YouTube Data API v3 to improve reliability and resolve streaming issues. The API is used for:
- Video validation - Check if videos exist and are available before attempting to stream
- Metadata retrieval - Get accurate video information (title, description, thumbnails, etc.)
- Error prevention - Detect unavailable videos early to avoid unnecessary yt-dlp calls
- Better error messages - Provide clear feedback when videos are private, deleted, or unavailable
- Reduced Rate Limiting - API validation prevents unnecessary yt-dlp requests
- Better Error Handling - Know immediately if a video is unavailable
- Improved Reliability - Validate videos before attempting to stream
- Enhanced Metadata - Get accurate information from YouTube's official API
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the YouTube Data API v3:
- Navigate to "APIs & Services" > "Library"
- Search for "YouTube Data API v3"
- Click "Enable"
- Create credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "API Key"
- Copy your API key
- (Optional) Restrict the API key to YouTube Data API v3 for security
Add your API key to config.yaml:
youtube:
enabled: true
quality: "best"
extract_audio: false
cookies_file: null
use_authentication: false
api_key: "YOUR_API_KEY_HERE" # Add your API key
oauth_client_id: null
oauth_client_secret: null
oauth_refresh_token: nullRestart the StreamTV server for changes to take effect.
- Video Validation: When a YouTube URL is requested, StreamTV first validates it using the YouTube Data API
- Availability Check: The API checks if the video is public and available
- Metadata Retrieval: If available, metadata is retrieved from the API (faster and more reliable)
- Stream URL Extraction: yt-dlp is still used to get the actual streaming URL (API doesn't provide this)
- Error Prevention: Unavailable videos are detected early, preventing unnecessary processing
If no API key is configured, StreamTV falls back to the previous behavior:
- Uses yt-dlp for all operations
- No pre-validation
- May encounter more rate limiting issues
The YouTube Data API v3 has a default quota of 10,000 units per day. Each API call consumes units:
-
videos.list(get video info): 1 unit -
search.list(search videos): 100 units
For most use cases, the default quota is sufficient. If you need more:
- Go to Google Cloud Console
- Navigate to "APIs & Services" > "Quotas"
- Request a quota increase
Error: YouTube API quota exceeded or API key invalid
Solutions:
- Verify your API key is correct in
config.yaml - Ensure YouTube Data API v3 is enabled in Google Cloud Console
- Check API key restrictions (if any) allow YouTube Data API v3
Error: YouTube API quota exceeded
Solutions:
- Wait for quota reset (daily at midnight Pacific Time)
- Request quota increase in Google Cloud Console
- StreamTV will fall back to yt-dlp-only mode
Error: YouTube video not found via API
Possible Causes:
- Video ID is invalid
- Video has been deleted
- Video is private/unlisted (if not authenticated)
Solutions:
- Verify the YouTube URL is correct
- Check if video is still available on YouTube
- For private videos, use cookies authentication
The API validates videos before attempting to stream:
# Example validation result
{
'valid': True,
'video_id': 'dQw4w9WgXcQ',
'available': True,
'info': {
'title': 'Video Title',
'duration': 212,
'thumbnail': 'https://...',
...
},
'error': None
}With API integration, you get clearer error messages:
- Before: "Error getting YouTube video info"
- After: "YouTube video unavailable: Video is private"
API-provided metadata is more accurate: