Skip to main content
Back to Examples

Multi-Platform Streaming

Stream simultaneously to YouTube, Twitch, Facebook Live, and LinkedIn using WAVE's unified multi-streaming infrastructure.

Intermediate1 hourCost Savings

What You'll Learn

  • Configure multi-streaming to 4+ platforms simultaneously
  • Manage stream keys and platform-specific settings
  • Synchronize audiences and aggregate analytics
  • Optimize encoder settings for each platform
  • Integrate multi-platform chat and engagement

Why Use WAVE for Multi-Streaming?

Cost Comparison

Significant savings vs. traditional multi-streaming services

FeatureWAVERestreamStreamYard
Monthly Cost (Pro)$29/mo$41/mo$39/mo
DestinationsUnlimited1010
Stream HoursUnlimitedUnlimited20 hrs/mo
1080p 60fps
Custom Branding$
Chat Integration
AnalyticsAdvancedBasicBasic
API AccessFull REST APILimited-

Enterprise Savings

WAVE customers save an average of $480/year compared to traditional multi-streaming platforms, with unlimited destinations and streaming hours.

Step 1: Get Platform Stream Keys

YouTube Live

  1. 1

    Go to YouTube Studio

    Sign in with your YouTube account

  2. 2

    Navigate to "Go Live"

    Click "Stream" in the left sidebar, then "Stream Settings"

  3. 3

    Copy Stream Key

    Server URL: rtmp://a.rtmp.youtube.com/live2

    Stream Key: xxxx-xxxx-xxxx-xxxx

Twitch

  1. 1
  2. 2

    Settings → Stream

    Find "Primary Stream Key" section

  3. 3

    Copy Stream Key

    Server: rtmp://live.twitch.tv/app

    Stream Key: live_xxxxx_xxxxxxxxxxxx

Facebook Live

  1. 1
  2. 2

    Select "Streaming Software"

  3. 3

    Copy Stream Key

    Server: rtmps://live-api-s.facebook.com:443/rtmp/

    Stream Key: FB-xxxxx-x-x-xxxxxxxx

LinkedIn Live

  1. 1

    Request LinkedIn Live Access

    Apply at LinkedIn Live Application

  2. 2

    Create Live Event

    Post → Create Event → Select "LinkedIn Live"

  3. 3

    Get Streaming Details

    Server: rtmps://rtmp-global.pscp.tv:443/x/

    Stream Key: (unique per event)

Step 2: Configure Multi-Streaming in WAVE

WAVE Dashboard Configuration

  1. 1

    Log in to WAVE Dashboard

    https://dashboard.wave.stream
  2. 2

    Create New Multi-Stream

    Navigate to Streams → Create New → Multi-Platform Stream

  3. 3

    Add Platform Destinations

    Click "Add Destination" for each platform:

    YouTube

    Server: rtmp://a.rtmp.youtube.com/live2

    Key: [Your YouTube Stream Key]

    Twitch

    Server: rtmp://live.twitch.tv/app

    Key: [Your Twitch Stream Key]

    Facebook

    Server: rtmps://live-api-s.facebook.com:443/rtmp/

    Key: [Your Facebook Stream Key]

    LinkedIn

    Server: rtmps://rtmp-global.pscp.tv:443/x/

    Key: [Your LinkedIn Event Key]

Programmatic Configuration (API)

import { WaveClient } from '@wave/sdk';

const wave = new WaveClient({
  apiKey: process.env.WAVE_API_KEY
});

async function setupMultiStream() {
  // Create multi-stream configuration
  const multiStream = await wave.multiStreams.create({
    title: 'My Multi-Platform Event',
    description: 'Streaming to all platforms',

    // Source stream configuration
    source: {
      protocol: 'rtmp',
      quality: '1080p60',
      bitrate: 6000 // kbps
    },

    // Platform destinations
    destinations: [
      {
        platform: 'youtube',
        enabled: true,
        streamKey: process.env.YOUTUBE_STREAM_KEY,
        settings: {
          title: 'Live Event on YouTube',
          description: 'Join us live!',
          privacy: 'public',
          category: 'Education'
        }
      },
      {
        platform: 'twitch',
        enabled: true,
        streamKey: process.env.TWITCH_STREAM_KEY,
        settings: {
          title: 'Live Stream',
          game: 'Just Chatting'
        }
      },
      {
        platform: 'facebook',
        enabled: true,
        streamKey: process.env.FACEBOOK_STREAM_KEY,
        settings: {
          title: 'Live on Facebook',
          description: 'Watch live now!'
        }
      },
      {
        platform: 'linkedin',
        enabled: true,
        streamKey: process.env.LINKEDIN_STREAM_KEY,
        settings: {
          visibility: 'public'
        }
      }
    ],

    // Advanced options
    options: {
      autoStart: false,
      recordingEnabled: true,
      chatAggregation: true,
      failoverEnabled: true
    }
  });

  console.log('Multi-stream created:', multiStream.id);
  console.log('Ingest URL:', multiStream.ingestUrl);
  console.log('Stream Key:', multiStream.streamKey);

  return multiStream;
}

// Start multi-streaming
async function startStream(multiStreamId: string) {
  const result = await wave.multiStreams.start(multiStreamId);

  console.log('Stream started on platforms:', result.activePlatforms);

  // Monitor stream health
  result.on('health', (status) => {
    console.log('Platform health:', status);
    // {
    //   youtube: { status: 'active', viewers: 1234 },
    //   twitch: { status: 'active', viewers: 567 },
    //   facebook: { status: 'active', viewers: 890 },
    //   linkedin: { status: 'active', viewers: 123 }
    // }
  });

  // Handle platform errors
  result.on('error', (error) => {
    console.error(`Platform ${error.platform} error:`, error.message);

    // Automatic failover if enabled
    if (error.critical) {
      wave.multiStreams.disablePlatform(multiStreamId, error.platform);
    }
  });
}

setupMultiStream();

Step 3: Optimal Encoder Settings

Platform-Specific Recommendations

Optimized settings for each platform's requirements

Universal Settings (Works for All)

Resolution: 1920x1080 (1080p)

Frame Rate: 60 fps (or 30 fps for slower content)

Encoder: NVIDIA NVENC H.264 or x264

Bitrate: 6000 Kbps (video) + 160 Kbps (audio)

Keyframe Interval: 2 seconds

Audio: 48 kHz, Stereo, AAC

YouTube

Max: 51 Mbps

Recommended: 3000-6000 Kbps (1080p)

Supports: Up to 4K 60fps

Twitch

Max: 6 Mbps

Recommended: 4500-6000 Kbps (1080p)

Supports: Up to 1080p 60fps

Facebook

Max: 8 Mbps

Recommended: 4000-6000 Kbps (1080p)

Supports: Up to 1080p 60fps

LinkedIn

Max: 5 Mbps

Recommended: 3000-5000 Kbps (1080p)

Supports: Up to 1080p 30fps

Step 4: Unified Chat Integration

Aggregate Multi-Platform Chat

import { WaveClient } from '@wave/sdk';

import { DesignTokens, getContainer, getSection } from '@/lib/design-tokens';
const wave = new WaveClient({
  apiKey: process.env.WAVE_API_KEY
});

// Connect to multi-platform chat
const chatAggregator = wave.chat.connect({
  multiStreamId: 'ms_abc123',

  platforms: {
    youtube: { enabled: true },
    twitch: { enabled: true },
    facebook: { enabled: true },
    linkedin: { enabled: true }
  },

  // Moderation settings
  moderation: {
    enabled: true,
    badWords: ['spam', 'inappropriate'],
    slowMode: 5, // seconds between messages
    followersOnly: false
  }
});

// Listen for messages from all platforms
chatAggregator.on('message', (message) => {
  console.log(`[${message.platform}] ${message.username}: ${message.text}`);

  // Message structure:
  // {
  //   id: 'msg_xyz789',
  //   platform: 'youtube' | 'twitch' | 'facebook' | 'linkedin',
  //   username: 'viewer123',
  //   displayName: 'John Doe',
  //   text: 'Hello from YouTube!',
  //   timestamp: '2024-01-15T10:30:00Z',
  //   badges: ['subscriber', 'moderator'],
  //   emotes: [...]
  // }
});

// Send message to all platforms
chatAggregator.sendToAll('Thanks for watching!');

// Send to specific platform
chatAggregator.sendTo('twitch', 'Twitch viewers are awesome!');

// Moderate across platforms
chatAggregator.on('spam', (message) => {
  chatAggregator.deleteMessage(message.id);
  chatAggregator.timeout(message.username, 60); // 60 seconds
});

// Track engagement metrics
chatAggregator.on('stats', (stats) => {
  console.log({
    totalMessages: stats.totalMessages,
    messagesPerPlatform: {
      youtube: stats.youtube.messages,
      twitch: stats.twitch.messages,
      facebook: stats.facebook.messages,
      linkedin: stats.linkedin.messages
    },
    activeUsers: stats.activeUsers
  });
});

Step 5: Aggregated Analytics

Multi-Platform Analytics Dashboard

// Get aggregated analytics across all platforms
const analytics = await wave.multiStreams.getAnalytics('ms_abc123');

console.log({
  // Aggregate viewer metrics
  totalViewers: analytics.aggregate.totalViewers,
  peakConcurrentViewers: analytics.aggregate.peakConcurrentViewers,
  averageWatchDuration: analytics.aggregate.averageWatchDuration,
  totalEngagement: analytics.aggregate.totalEngagement,

  // Per-platform breakdown
  platforms: {
    youtube: {
      viewers: analytics.youtube.viewers,
      likes: analytics.youtube.likes,
      comments: analytics.youtube.comments,
      shares: analytics.youtube.shares
    },
    twitch: {
      viewers: analytics.twitch.viewers,
      followers: analytics.twitch.newFollowers,
      chatMessages: analytics.twitch.chatMessages,
      bits: analytics.twitch.bits
    },
    facebook: {
      viewers: analytics.facebook.viewers,
      reactions: analytics.facebook.reactions,
      comments: analytics.facebook.comments,
      shares: analytics.facebook.shares
    },
    linkedin: {
      viewers: analytics.linkedin.viewers,
      impressions: analytics.linkedin.impressions,
      comments: analytics.linkedin.comments,
      shares: analytics.linkedin.shares
    }
  },

  // Performance metrics
  performance: {
    streamHealth: analytics.performance.health, // 0-100
    averageBitrate: analytics.performance.averageBitrate,
    droppedFrames: analytics.performance.droppedFrames,
    bufferEvents: analytics.performance.bufferEvents
  }
});

// Real-time analytics updates
wave.multiStreams.subscribeToAnalytics('ms_abc123', (update) => {
  console.log('Live viewer count:', update.currentViewers);
  console.log('Platform distribution:', update.platformDistribution);
});

Troubleshooting Common Issues

One platform not receiving stream

  • Verify stream key is correct and not expired
  • Check platform's server status (YouTube, Twitch may have outages)
  • Ensure stream is scheduled/enabled on that platform's dashboard
  • LinkedIn requires pre-approval for LinkedIn Live access

High CPU usage when multi-streaming

  • Use hardware encoding (NVENC/VCE) instead of software (x264)
  • WAVE handles transcoding on cloud - you only upload once
  • Close unnecessary applications and browser tabs

Synchronization delays between platforms

  • Normal latency variation: 2-15 seconds between platforms
  • YouTube typically has 10-20s delay (platform processing)
  • Twitch is usually fastest (3-5s latency)
  • Use WAVE's sync-aware chat for better coordination
Examples - Code Samples & Implementation Guides | WAVE | WAVE