Skip to content

Repository files navigation

StreamPortal

StreamPortal is a free, open-source iOS app for multi-platform live streaming. Stream simultaneously to YouTube Live, Twitch, and Kick with both camera and screen sharing capabilities.

Features

πŸŽ₯ Dual Capture Modes

  • Camera Live: Direct camera and microphone streaming for vlogs, events, and real-life content
  • Screen Share Live: Full screen or app-specific recording with internal audio capture

πŸ“‘ Multi-Platform Streaming

  • Stream to multiple platforms simultaneously
  • Supported platforms: YouTube Live, Twitch, Kick
  • Real-time connection monitoring and auto-reconnection

πŸ”§ Advanced Configuration

  • Multiple video quality presets (480p to 1440p)
  • Adaptive bitrate streaming
  • Secure API key storage using iOS Keychain
  • Connection testing and validation

πŸ“Š Real-Time Statistics

  • Live streaming statistics (uptime, bitrate, dropped frames)
  • Per-platform connection status monitoring
  • Performance metrics and health indicators

Requirements

  • iOS 15.0 or later
  • iPhone or iPad with camera and microphone
  • Active internet connection
  • Stream keys from supported platforms

Installation

Prerequisites

  1. Xcode 14.0 or later
  2. iOS 15.0+ deployment target
  3. Apple Developer account (for device testing)

Building from Source

  1. Clone the repository:

    git clone https://github.com/streamportal/ios.git
    cd streamportal-ios
  2. Open the project in Xcode:

    open StreamPortal.xcodeproj
  3. Add HaishinKit dependency via Swift Package Manager:

    • In Xcode, go to File β†’ Add Package Dependencies
    • Enter URL: https://github.com/shogo4405/HaishinKit.swift
    • Select the latest version and add to your target
  4. Configure signing and capabilities:

    • Select your development team
    • Ensure the following capabilities are enabled:
      • Camera usage
      • Microphone usage
      • ReplayKit for screen recording
  5. Build and run on your device

Setup Guide

1. Platform Configuration

YouTube Live

  1. Go to YouTube Studio
  2. Navigate to "Go Live" β†’ "Stream"
  3. Copy your Stream Key
  4. In StreamPortal Settings, add the key to YouTube Live configuration

Twitch

  1. Go to Twitch Creator Dashboard
  2. Navigate to Settings β†’ Stream
  3. Copy your Primary Stream Key
  4. In StreamPortal Settings, add the key to Twitch configuration

Kick

  1. Go to Kick Creator Dashboard
  2. Navigate to Settings β†’ Stream
  3. Copy your Stream Key
  4. In StreamPortal Settings, add the key to Kick configuration

2. Permissions

StreamPortal requires the following permissions:

  • Camera: For Camera Live mode video capture
  • Microphone: For audio capture in both modes
  • Screen Recording: For Screen Share Live mode

Grant permissions when prompted or via iOS Settings β†’ Privacy & Security.

3. Quality Settings

Choose video quality based on your internet connection:

  • Low (480p): 1 Mbps upload speed required
  • Medium (720p): 2.5 Mbps upload speed required
  • High (1080p): 4 Mbps upload speed required
  • Ultra (1440p): 6 Mbps upload speed required

Usage

Camera Live Mode

  1. Select "Camera Live" mode
  2. Choose front or rear camera
  3. Configure your streaming platforms in Settings
  4. Tap "Start Streaming"

Perfect for:

  • Vlogs and personal content
  • Live events and presentations
  • Gaming with face cam
  • Outdoor activities and travel

Screen Share Live Mode

  1. Select "Screen Share Live" mode
  2. Configure your streaming platforms in Settings
  3. Tap "Start Streaming"
  4. Grant screen recording permission when prompted

Perfect for:

  • App demonstrations
  • Mobile gaming streams
  • Video calls and social apps (Ome.tv, Monkey.app)
  • Educational content and tutorials

Multi-Platform Streaming

  1. Configure multiple platforms in Settings
  2. Enable the platforms you want to stream to
  3. Start streaming - all enabled platforms will receive the stream simultaneously

Architecture

Core Components

  • StreamingService: Main service coordinating all streaming operations
  • CameraCaptureService: AVFoundation-based camera and microphone capture
  • ScreenCaptureService: ReplayKit-based screen recording and capture
  • KeychainManager: Secure storage for API keys and sensitive data
  • ConnectionTestService: Network connectivity testing and validation
  • PermissionManager: iOS permissions handling and status monitoring

Data Models

  • StreamingPlatform: Platform configuration and RTMP settings
  • StreamingConfiguration: Global app settings and capture mode
  • StreamingStats: Real-time performance metrics and statistics

UI Components

  • ContentView: Main interface with mode selection and controls
  • SettingsView: Platform configuration and app preferences
  • PreviewView: Live camera/screen preview with overlay controls
  • StatsDisplayView: Real-time streaming statistics

Technical Details

RTMP Streaming

StreamPortal uses the HaishinKit library for RTMP streaming:

  • YouTube Live: rtmp://a.rtmp.youtube.com/live2/{stream_key}
  • Twitch: rtmp://live.twitch.tv/app/{stream_key}
  • Kick: rtmp://ingest.kick.com/app/{stream_key}

Video Encoding

  • Codec: H.264 (AVC)
  • Container: FLV (for RTMP)
  • Audio: AAC encoding
  • Adaptive bitrate: Based on network conditions

Security

  • Stream keys stored in iOS Keychain with kSecAttrAccessibleWhenUnlockedThisDeviceOnly
  • No telemetry or analytics collection
  • All processing done locally on device

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Code Style

  • Follow Swift API Design Guidelines
  • Use SwiftUI for UI components
  • Add documentation comments for public APIs
  • Maintain iOS 15+ compatibility

License

StreamPortal is released under the MIT License. See LICENSE for details.

Support

Roadmap

Upcoming Features

  • Stream recording and local saving
  • Custom RTMP endpoint support
  • Stream overlays and graphics
  • Multi-language support
  • iPad-optimized interface
  • Stream scheduling and automation

Platform Support

  • Facebook Live integration
  • Discord Go Live support
  • Custom RTMP servers
  • HLS streaming support

Acknowledgments

  • HaishinKit for RTMP streaming capabilities
  • Apple's AVFoundation and ReplayKit frameworks
  • The open-source iOS development community

Note: StreamPortal is not affiliated with YouTube, Twitch, Kick, or any streaming platforms. All trademarks are property of their respective owners.

About

Open Source Multi-Platform Live Streaming

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages