How l33tdawg/freestream works
FreEstream is an Electron desktop app that accepts one local RTMP stream and fans it out to enabled streaming destinations through FFmpeg. The user configures destination URLs, keys, and encoding in the dashboard, then starts streaming from OBS or Streamlabs; the main process ingests the stream, launches per-destination FFmpeg processes, and reports status back to the UI. The README documents additional encoding, monitoring, preview, and reconnect capabilities. Some implementation details—especially keychain storage and renderer IPC wiring—were not excerpted, so those connections are shown only where the README or sampled references support them.
Main entry points: ffmpeg-manager.ts FFmpeg fan-out · ipc-handlers.ts IPC handlers · destination-manager.ts Destination management · index.ts Electron services
Components 25
Desktop orchestration
- Electron services
src/main/index.ts - IPC handlers
src/main/ipc-handlers.ts - Preload bridge
src/main/preload.ts - Shared contracts
src/shared/types.ts
Stream processing
- RTMP ingest
src/main/nms.ts - FFmpeg fan-out
src/main/ffmpeg-manager.ts - FFmpeg detection
src/main/ffmpeg-detector.ts - Stream monitoring
src/main/stream-monitor.ts
Dashboard interface
- Application shell
src/renderer/App.tsx - Streaming dashboard
src/renderer/components/Dashboard.tsx - Destination cards and dialogs
src/renderer/components/DestinationCard.tsx - Settings interface
src/renderer/components/SettingsDialog.tsx - Ingest status and preview
src/renderer/components/IngestStatus.tsx - Stream controls
src/renderer/components/StreamControls.tsx - Log console
src/renderer/components/ConsolePanel.tsx - Stream status hook
src/renderer/hooks/useStreamStatus.ts - Destinations hook
src/renderer/hooks/useDestinations.ts - App logs hook
src/renderer/hooks/useAppLogs.ts - Theme provider
src/renderer/hooks/useTheme.tsx
Configuration and state
- Destination management
src/main/destination-manager.ts - Settings and destinations
src/main/config.ts - Platform presets
src/main/constants.ts - Stream key storage
src/main/secrets.ts
Other components
- OBS / Streamlabs
- Streaming platforms
Connections 34
- OBS / Streamlabs → RTMP ingest: publishes RTMP
README.md - RTMP ingest → FFmpeg fan-out: provides stream input
README.md - FFmpeg fan-out → Streaming platforms: fans out streams
README.md - Electron services → RTMP ingest: starts
src/main/index.ts - Electron services → FFmpeg fan-out: initializes
src/main/index.ts - Electron services → Destination management: creates
src/main/index.ts - Electron services → Stream monitoring: creates
src/main/index.ts - Electron services → IPC handlers: registers
src/main/index.ts - FFmpeg fan-out → Settings and destinations: reads settings
src/main/ffmpeg-manager.ts - FFmpeg fan-out → FFmpeg detection: detects encoders
src/main/ffmpeg-manager.ts - FFmpeg fan-out → Stream key storage: reads stream key
src/main/ffmpeg-manager.ts - FFmpeg fan-out → Streaming platforms: sends outputs
README.md - Destination management → Settings and destinations: reads and writes
src/main/destination-manager.ts - Destination management → Platform presets: uses platform defaults
src/main/destination-manager.ts - Destination management → Stream key storage: deletes key
src/main/destination-manager.ts - IPC handlers → Destination management: handles destination actions
src/main/ipc-handlers.ts - IPC handlers → FFmpeg fan-out: starts and stops
src/main/ipc-handlers.ts - IPC handlers → Stream monitoring: forwards status
src/main/ipc-handlers.ts - IPC handlers → Settings and destinations: handles settings
src/main/ipc-handlers.ts - IPC handlers → Stream key storage: handles key actions
src/main/ipc-handlers.ts - Application shell → Streaming dashboard: renders
src/renderer/App.tsx - Application shell → Settings interface: renders
src/renderer/App.tsx - Streaming dashboard → Destination cards and dialogs: renders
src/renderer/components/Dashboard.tsx - Streaming dashboard → Ingest status and preview: renders
src/renderer/components/Dashboard.tsx - Streaming dashboard → Stream controls: renders
src/renderer/components/Dashboard.tsx - Streaming dashboard → Log console: renders
src/renderer/components/Dashboard.tsx - Ingest status and preview → Streaming platforms: shows preview stream
- Application shell → Stream status hook: reads status
src/renderer/App.tsx - Application shell → Destinations hook: reads destinations
src/renderer/App.tsx - Application shell → App logs hook: reads logs
src/renderer/App.tsx - Settings interface → Settings and destinations: updates settings
- Destination cards and dialogs → Destination management: edits destinations
- Stream controls → FFmpeg fan-out: controls streaming
- Theme provider → Settings and destinations: loads and saves theme