Guide to live streaming an event using FastPix

February 11, 2025
14 Mins
Live Streaming
Jump to
Share
This is some text inside of a div block.

It’s 2025, and live streaming has become the go-to way to connect with audiences. Did you know that 80% of businesses now use live streaming for webinars, product launches, and events? And 70% of churches broadcast their services weekly? Live streaming isn’t just popular it’s essential for staying connected in real time.

But let’s be real: getting a live stream right isn’t always easy. There are plenty of hurdles, from buffering issues to figuring out how to stream on multiple platforms without losing quality. That’s where FastPix comes in.

In this guide, we’ll walk you through how to set up and manage live streams using the FastPix Dashboard and API, plus share tips to make sure your streams are high-quality, reliable. Let’s dive in!

Main challenges for developer while setting up a live stream

  1. Managing inconsistent video input

Developers often deal with varying video formats, resolutions, and frame rates from different sources. Standardizing these inputs for ingestion and encoding requires extra effort to avoid quality degradation or compatibility issues.

  1. Balancing quality and latency

Achieving high-quality video while maintaining low latency is a tricky tradeoff. Encoding settings, bitrate adjustments, and network optimizations all need to align for a seamless experience without delays.

  1. Network reliability and adaptive streaming

Unpredictable network conditions can disrupt live streams. Developers must implement adaptive bitrate streaming (ABR) to dynamically adjust quality based on the viewer's bandwidth, ensuring uninterrupted playback.

  1. Protocol selection and integration

Choosing the right protocols (e.g., RTMP for ingest, HLS for delivery, or SRT for secure streams) and ensuring they work together smoothly requires careful configuration and testing for compatibility.

  1. Real-time monitoring and error recovery

Debugging and troubleshooting during a live stream is a major challenge. Developers need robust monitoring tools to detect issues like dropped frames or network interruptions and implement mechanisms to recover without disrupting the viewer experience.

  1. Scaling for large audiences

Handling sudden spikes in traffic requires a scalable architecture. Integrating with CDNs and designing infrastructure that can distribute content globally without latency is critical for a successful stream.

How FastPix can help

FastPix simplifies live streaming for developers by addressing these common challenges:

  • Inconsistent video input: Our platform automatically standardizes video formats, resolutions, and frame rates during ingestion, reducing manual pre-processing efforts.
  • Quality and latency balance: FastPix adaptive encoding pipeline ensures optimal video quality while maintaining ultra-low latency, even under varying network conditions.
  • Network reliability: With built-in adaptive bitrate streaming (ABR) and SRT protocol support, FastPix ensures smooth playback and secure delivery, regardless of bandwidth fluctuations.
  • Protocol integration: FastPix seamlessly handles ingest (RTMPS) and delivery (HLS, DASH) protocols, removing the complexity of configuration and testing.
  • Monitoring and error recovery: Real-time analytics allow developers to monitor streams and quickly address issues like frame drops or connectivity problems.
  • Scalability: Our cloud-based infrastructure, integrated with global CDNs, lets you scale effortlessly to support millions of concurrent viewers without performance loss.

Setting up a live stream with FastPix: A step-by-step guide

Step1: Prepare Your Streaming Environment

Before setting up a live stream on FastPix, ensure you have the right tools and infrastructure:

  • Streaming equipment: Use high-quality cameras and microphones. For professional streams, a multi-camera setup can enhance the experience with dynamic angles.
  • Internet connection: A stable and high-speed connection is essential. For 1080p streaming, aim for an upload speed of at least 5 Mbps.
  • Streaming software: Use software like OBS Studio for stream management, overlay graphics, and camera switching.

Step 2: Create a Livestream Using the FastPix Dashboard

Follow these steps to create a live stream on FastPix:

  1. Signup and log in:
    • Visit FastPix Dashboard.
    • Complete the sign-up process by providing your details.
    • Once logged in, navigate the main dashboard to access all features.
  2. Navigateto the "Live" section:
    • Hover over the left-hand menu and select "Live" to access the live streaming interface.

  1. Create a test live stream
    • Click the "Create Live Stream" button.
    • Note: Test streams are limited to 5 minutes and up to 30 streams per organization.
  2. Upgrade to the Pro Plan (if needed):
    • Go to Account Settings > Billing and Payment and select the "Upgrade"option.
    • Enter payment details to unlock Pro plan features like extended streaming duration and unlimited streams.

Step 3: Configure your live stream using API requests

For customization, use FastPix API parameters to fine-tune your live stream:

  1. playbackSettings:
    • accessPolicy: Set your stream to public or private access.
  2. InputMediaSettings:
    • maxResolution: Define the maximum resolution for your stream.
    • reconnectWindow: Set a time window (in seconds) for reconnection in case of network failure.
    • mediaPolicy: Control whether recorded streams are public or private.
  3. metadata: Add custom tags or information relevant to your stream.
curl -X POST 'https://v1.fastpix.io/live/streams'
   --user {Access Token ID}:{Secret Key} \
   -H 'Content-Type: application/json' \
   -d '{
   "playbackSettings": {
      "accessPolicy": "public"
   },
   "inputMediaSettings": {
      "maxResolution": "1080p",
      "reconnectWindow": 60,
      "mediaPolicy": "public",
      "metadata": {
         "livestream_name": "fastpix_livestream"
      },
      "enableDvrMode": false
   }
}'

To execute the API request:

  • Click "Run Request"to create the livestream entity.
  • Use the Stream Details page to access your stream settings and keys.

Step 4: Go Live with OBS

Once your stream is set up, follow these steps to broadcast using OBS Studio:

  1. Open OBS and navigate to Settings> Stream.
  2. Set the service to "Custom"and input the FastPix server URL
    • rtmps://live.ibee.ai:443/live
  3. Copy the Stream Key from the Stream Details page and paste it into OBS.
  4. Connect your camera to OBS:
    • Use a video capture card to connect a DSLR or other cameras.
    • Alternatively, use a webcam or other input sources.
  5. Create a scene in OBS (e.g., "Your Live Event Name") and add sources:
    • Video capture device for your camera.
    • Audio input capture for your microphone.
  6. Adjust output settings in OBS to optimize quality and performance.

Click "Start streaming"to go live!

Step 5:  ShareYour Stream

To share the stream:

  • Use the Stream URL and Playback ID from the Live Stream Details page.
  • Embed the URL into any HLS player to allow viewers access.

Step 6. Secure Your Live Stream

FastPix offers two primary methods to secure your stream:

  1. SRT Protocol (Secure Reliable Transport):
  • Provides end-to-end encryption during transmission.
  • Ideal for high-quality, real-time video over unreliable networks.
  1. Private Access Policy:
  • Restricts access to authorized users through secure authentication.

Which to Choose?

  • Use SRT for better encryption and reliable delivery in critical scenarios.
  • Opt for Private Access Policy when controlling access is a priority.

Step-by-Step Guide to Starting a Live Stream with FastPix

Starting a live stream with FastPix is simple. In this guide, we’ll walk you through creating a live stream, broadcasting using RTMP software, and handling the stream.

Step 1: Get an API Access Token

To interact with the FastPix API, you'll need an Access Token for authentication.

Log into FastPix Dashboard:

  • Go to your FastPix Dashboard.
  • If you don't have an Access Token, you'll need to create one.

Create an Access Token:

  • Go to the Access Token settings in your FastPix Organization dashboard.
  • A pop-up will appear with a form to create your new Access Token.

Permissions:

  • Make sure the Access Token has Video Read and Write permissions, as these are necessary for creating and managing live streams.

Step 2: Create a Live Stream

Now that you have your Access Token, you can create a live stream using FastPix’s API.

API Endpoint:

  • To create a live stream, use the POST request at the /streams endpoint.

Prepare the POST Request:

  • Replace {Access Token ID} and {Secret Key} with the values from your Access Token.
  • Set up your request with the following details:
bash
curl -X POST 'https://v1.fastpix.io/live/streams' \
   --user {Access Token ID}:{Secret Key} \
   -H 'Content-Type: application/json' \
   -d '{
     "playbackSettings": {
        "accessPolicy": "public"
     },
     "inputMediaSettings": {
        "maxResolution": "1080p",
        "reconnectWindow": 60,
        "mediaPolicy": "public",
        "metadata": {
           "livestream_name": "fastpix_livestream"
        },
        "enableDvrMode": false
     }
}'

Response:

  • You will receive a Playback ID and a Stream Key in the response.
  • Playback ID: Used for playback (can be used to embed the live stream).
  • Stream Key: This is used in RTMP software to send the live stream to FastPix.

Step 3: Start broadcasting

To start broadcasting, you'll need broadcasting software that supports RTMP, such as OBS.

RTMP Server URL:

  • The RTMP server URL is:
    rtmp://global-live.fastpix.com:5222/app

Setup in RTMP Software:

  • Open your RTMP-compatible software (like OBS).
  • Set the Stream URL to the FastPix RTMP URL.
  • Stream Key: Use the Stream Key you got from the previous step.

Go Live:

  • Start the stream in your software. Once you begin broadcasting, the live stream status will change to active.
  • This means the video is now streaming and can be watched using the Playback ID.

Step 4: Play the Live Stream

To watch the live stream, you’ll use the Playback ID.

Playback URL:

  • You can access the live stream using HTTP Live Streaming (HLS) by creating a URL like this:
https://stream.fastpix.io/{PLAYBACK_ID}.m3u8

Embedding the Stream in a Web Page:

  • To display the stream in a web player, use the following HTML code:
html
<script src="https://cdn.jsdelivr.net/npm/@fastpix/fp-player"></script>
<fp-player 
  playbackId="{PLAYBACK_ID}"
  metadata-video-title="TEST VIDEO TITLE"
  metadata-viewer-user-id="user-id-123"
  metadata-video-id="qwe-we3r-23ew"
  stream-type="live">
</fp-player>

Monitor the Stream:

  • You can integrate FastPix data into the player to track howthe playback is performing.
     

Step 5: Stop the Live Stream

When you’re finished broadcasting, stop the stream in your RTMP software to disconnect from the FastPix servers.

Automatic Disconnection:

  • If you don’t manually disconnect, the stream will automatically stop after 12 hours.

Stream Status:

  • Once stopped, the stream status will change to idle. If the stream reaches its maximum duration, it will change to disabled.

Live Stream Webhooks

FastPix supports webhooks, which allow your application to respond to live stream events like starting, stopping, or errors.

Events you can listen for:

  • video.live_stream.created: A new live stream has been created.
  • video.live_stream.connected: A connection has been made to the live stream.
  • video.live_stream.active: The stream is live and broadcasting.
  • video.live_stream.idle: No ongoing streaming activity.
  • video.live_stream.deleted: The live stream has been deleted.

Step 6: Manage Live Stream with API Endpoints

FastPix provides several API endpoints to help you manage your live stream:

  1. Create a New Stream(POST): Creates a new live stream.
  2. Get All Live Streams(GET): Fetches all the available live streams.
  3. Get Stream by ID (GET):Fetches a specific live stream by its ID.
  4. Delete a Stream(DELETE):Deletes a live stream using the stream ID.
  5. Update a Stream (PUT):Updates the parameters of a live stream.
  6. Create a Simulcast(POST): Creates a simulcast for a live stream.
  7. Get Stream Playback ID(GET): Fetches the playback ID of a live stream.
  8. Delete a Simulcast(DELETE): Deletes a simulcast for a live stream.

Best Practices for RTMPS Live Streaming with FastPix

  1. Enforce RTMPS for Secure Transmission

Always configure your live stream to use RTMPS instead of RTMP. RTMPS ensures end-to-end encryption, protecting your data and video stream from interception or tampering. Set your broadcast software (e.g., OBS) to use RTMPS with the FastPix RTMPS server URL.

  1. Handle Stream Keys Securely

Stream Keys are sensitive credentials. Store them securely in your application and environment variables. Never expose them in the front-end or publicly accessible code. Use secure methods like environment variables or encrypted storage for backend storage and retrieval.

  1. Test Your Stream Setup Using API Requests

Before going live, test your stream setup using tools like Postman or curl. Make sure to send APIrequests to /streams and validate theresponse. Confirm that your stream is correctly created and you have the right Stream Key and Playback ID. Use these APIs forvalidating stream status and debugging issues before live broadcasting.

  1. Monitor Stream Performance with Webhooks

Utilize Webhooks to monitor stream status in real time. Set up listeners for events such as video.live_stream.active and video.live_stream.disconnected to track stream health and react to changes automatically. Automating stream monitoring allows you to programmatically detect and address stream issues.

  1. Implement Error Handling and Auto-Reconnect Logic

Implement error handling in your application to catch stream interruptions. Use the reconnectWindow parameter to allow automatic reconnections if your stream faces issues. In case of prolonged downtime or stream failure, set up a fallback mechanism to notify your users or restart the stream.

  1. Set Stream Duration Limits Programmatically

Be mindful of FastPix's 12-hour stream duration limit. Use the API to track the status of your stream, and set automated checks to warn when the stream is nearing its expiration. Build your app to gracefully end or restart streams within the allowed timeframe to avoid unexpected cuts.

Closing thoughts

Hope you found this insightful! We’d love to hear what features you'd like to see next let us know!

FAQs

How can I optimize the quality and latency of my live stream using FastPix?

To optimize quality and latency, FastPix’s adaptive encoding pipeline ensures high-quality video while maintaining ultra-low latency. You can fine-tune parameters like bitrate, resolution, and playback settings using the FastPix API to align with your requirements.

What protocols does FastPix support for live streaming, and how do I choose the right one?

FastPix supports RTMPS for ingest and HLS/DASH for delivery. Use RTMPS for secure and encrypted video ingestion, while HLS and DASH provide scalable delivery to viewers. The SRT protocol is ideal for secure, real-time video delivery in unpredictable network conditions.

How can I monitor and troubleshoot issues during a live stream?

FastPix offers real-time analytics and supports Webhooks for live stream events like starting, stopping, or errors. You can use these tools to monitor dropped frames, connectivity issues, and stream status, allowing for proactive troubleshooting and recovery.

What equipment do I need for high-quality live streaming with FastPix?

For high-quality streaming, invest in professional-grade cameras and microphones. A multi-camera setup adds dynamic visuals, while software like OBS Studio can manage overlays, transitions, and camera feeds effectively.

Can I use FastPix to broadcast live streams on multiple platforms simultaneously?

Yes, FastPix allows you to create simulcasts through its API. You can broadcast your live stream on multiple platforms seamlessly by using the simulcast endpoint and integrating it with the desired platforms.

Start Live Streaming for free

Enjoyed reading? You might also like

Try FastPix today!

FastPix grows with you – from startups to growth stage and beyond.