FastPix tutorials

How to Build a News Streaming App like CNN?

Explore key features and video-centric workflows to build inside your news streaming application.

Share
This is some text inside of a div block.

Building a news platform that streams video smoothly isn't easy. Video streaming gets complex fast, between handling live broadcasts, managing content delivery, and keeping everything secure. But here's the thing, you don't have to tackle all that infrastructure yourself. A video API handles the heavy lifting, so you can focus on creating a great news experience.

Let's walk through exactly what you need to build your news platform, from managing live streams to delivering breaking news clips to viewers worldwide.

Quick platform overview

Here’s a look at what our platform will provide:

Category Features
Content Management  - Video uploads SDK for easy uploads.
- Bulk video upload.
- Organize news videos by topics, regions, etc.
- Webhook integration for content updates.
- NSFW filter and content moderation. 
Stream Live News  - Live broadcast management.
- Convert live news coverage to on-demand content.
- Pre-recording news as live stream.
- Manage multiple live news broadcasts.
Video Editing Workflows  - Clips and highlights creation.
- Auto-generated video thumbnails.
- Add overlays and captions to news clips.
- Add bumpers to videos (Intro/outro). 
Play Videos on Your App  - Cross platform video player with adaptive streaming.
- Standard video controls and features.
- Shareable video URL for embedding in websites. 
Video Analytics and Insights  - Data SDK for tracking metrics and analytics.
- Monitor viewer engagement.
- Geographic viewer distribution.
- Quality of experience monitoring.
User Experience  - Downloadable news clips.
- Multi language support for subtitles.
- Personalized news feeds. 
Protect News Videos  - Copyright protection for news content with DRM.
- Geographic content restrictions.
- Access control for premium content. 

Getting started with FastPix APIs

First, we'll need FastPix APIs to handle news video streaming in the platform. You'll need a token key pair, an Access Token ID and a Secret Key. You can think of these as your platform’s credentials for securely communicating with FastPix.  

Check out this setup guide to get your tokens. These tokens will be used to authenticate API requests you make to FastPix. In the setup guide, you'll find instructions on how to manage access tokens, set permissions, and different authentication methods. Once that's sorted, you can start handling video streaming.

1. Manage your news video content pipeline

Creating a strong content pipeline is important for a news platform. Breaking news and live event coverage often come with large video files that need to be processed and shared quickly. Here’s how to set up an efficient content management system for your news platform.

1.1 Record and upload news at scale

News teams need reliable ways to upload field coverage and breaking news. High-quality news footage can be quite large, especially during extended event coverage, which makes uploading challenging with standard limits.

Single-threaded uploads can be slow, especially for large files, and may slow down the reporter's device. Chunked uploading solves this by breaking files into manageable pieces, so to make things easier, we suggest uploading videos in chunks. When your team uploads lengthy press conferences or event coverage, network issues won't interrupt the process.

Our web uploads SDK further makes it easy to upload and process news videos. It can handle large video files and takes care of the details to get videos from your storage to your platform.

When you upload videos, the SDK splits them into smaller parts. If the connection drops, the upload will pause and continue from where it stopped, so you won’t lose any progress.

You can install the SDK by executing this command:

1npm i @fastpix/uploader

After installation, you can bring the upload component into your application by executing the following command in your terminal:

1const fileUploader = Uploader.init({ 
2    endpoint: 'https://example.com/signed-url', // Replace with the signed URL.  
3    file: mediaFile, // Provide the media file you want to upload.  
4    chunkSize: 5120, // Specify the chunk size in kilobytes (KB). Minimum allowed chunk size is 5120KB (5MB).  
5
6    // Additional optional parameters can be specified here as needed  
7})

You can also use our APIs to upload videos to FastPix. To upload a new media, you’ll need to send a POST request to the create media from URL endpoint or use the upload media from device endpoint if you want to upload directly from your local storage to FastPix for processing and storage.  

Please note, if you want to import your existing videos from any cloud storage service, such as Google Cloud, Amazon S3, or Dropbox – you can simply use our upload from URL endpoint with the URL of a video file that is set as publicly shareable. (This is the pull-based upload feature)

1.2 Easily move videos from other libraries and CMS

Migrating your video library to your new CMS platform doesn’t have to be a daunting task. Here’s how you can make the transition smooth and efficient:

  1. Access your current library: Identify the videos you want to migrate, their formats, and associated metadata like titles and descriptions. 
  1. Choose your migration method: We support accelerated uploads for faster video uploads.  
  • Bulk upload: If you have a large number of videos, you can use our  batch migration tool  to upload multiple files at once from other video platforms, such as Cloudflare Stream, AWS, Mux, api.video and Vimeo. (Please note this is one of our beta features)
  • API integration: Connect directly to your existing storage or library for automated migration. 

Easily move videos from other libraries and CMS

1.3 Organize news videos with smart tagging

We know organizing news videos is key to helping users find what they need. That’s why FastPix supports dynamic metadata, letting you create a key that can take any value for added flexibility.  

You can include up to 10 custom fields per video, with each field allowing a maximum of 255 characters. This enables you to tag your videos with details such as story category, geographic location, breaking news status, and event type, making it easier for newsrooms to manage their content library and for viewers to find relevant coverage.

1.4 Track content updates in real time

FastPix uses webhooks to notify your app about background events, such as when a media file is created but not yet processed. For example, a POST message will be sent to your application’s web address with the event video.media.created. For more details, you refer to the guides on setting up webhooks – Webhooks for status.

1.5 Keep content safe with moderation

Video moderation is important for keeping journalistic standards high and building trust with viewers. Recently, we tested our NSFW filter with a sample video that mostly showed violent content, and here’s what we found:

  • Violence: 0.94
  • Graphic Violence: 0.85
  • Self-Harm: 0.49

( …it’s really graphic!! )

These scores, ranging from zero to one, indicate that the filter effectively detects potentially harmful material.

You can turn on moderation by setting the moderation parameter to true with a PATCH request to the video's mediaId. The mediaId is a unique identifier for each video, which helps the system know exactly which video you want to moderate. This helps newsrooms keep their editorial standards in check while handling a lot of incoming content.

2. Stream live news coverage

Live news broadcasting requires reliable infrastructure to handle breaking stories and real-time events. Here's how to manage live streaming for your news platform.

2.1 Control live news broadcasts

To create your live stream with FastPix, just make a POST request to the /streams endpoint using your access token. You’ll get back a response with a Playback ID and a Stream Key.

The response includes:

  • Stream status (idle when no stream, active during broadcast, or disabled if streaming is unavailable)
  • Stream key for your broadcasting software
  • Creation timestamp for the stream  
  • Playback ID to access the stream

FastPix supports RTMPS and SRT protocols for live streaming, so make sure your users have the compatible broadcasting software. Just configure it with the Stream Key and FastPix's RTMPS/SRT Server URL.

You can access the stream at this URL, which works with any HLS player:

https://stream.fastpix.io/{PLAYBACK_ID}.m3u8

To stop the broadcast, simply disconnect the streaming software. The stream will switch to idle after a short reconnect window or automatically after 12 hours. If you need longer streams, please reach out to our support team.

Live news streaming in CNN

Live news streaming in CNN

2.2 Convert live events to on-demand videos

After news events are broadcasted, they are converted into on-demand content, giving them more value beyond just live coverage. The system records the broadcasts in the background, creating instant video assets for your content library. This way, viewers can catch up on important stories they missed, and newsrooms can use the live coverage for follow-up reporting and analysis.

You can access the recorded stream using the asset playback ID, and add the video asset to your news library. Check out  the documentation here.

2.3 Using pre-recorded videos for live news streaming

Sometimes, news creators can’t stream in real-time. They can upload videos to be broadcasted later as if they were live. This is perfect for planned events, important announcements, or when internet connections might be unreliable.

When it’s time to broadcast, your platform will play the video as a live stream. Viewers will have the same experience as a live event. You can build an interface with comments, reactions, and sharing all working as usual.

Setting up a scheduled broadcast is easy and only takes a few steps:

  • Upload the video
  • Choose a broadcast time
  • Set the streaming quality
  • Decide between single play or loop mode

You can check out this guide to learn how to stream pre-recorded content as live news.

Please note, pre-recorded live is somewhat different from cloud playout channels. To learn more about how cloud playout works read our blog . We have found a lot of scope and requirements for cloud playout feature across our customers. This made us think where the industry is heading to. And we’re on it. Cloud playout using FastPix is currently in Beta, and we’re excited to enable it for folks who have the use case pretty soon.

2.4 Managing multiple live news streams

With FastPix, you can easily handle multiple live news streams at once. Whether you’re covering different events or broadcasting various segments, our platform ensures smooth streaming for all viewers.

We understand that internet connections can be unpredictable. If a live stream gets interrupted due to network issues or software glitches, we don’t cut it off right away. Instead, our system waits for a chance to reconnect, allowing you to manage any problems without stopping the stream. The default reconnection window is one minute, but you can extend it up to thirty minutes if needed.

For more information on how to manage stream disconnects, take a look at our guide.

3. Edit news videos quickly

Quick video editing is really important for news teams working on breaking stories and live events. Here’s how to make your news video editing process easier.

3.1 Create news clips and highlights

Breaking news needs fast editing to grab important moments from longer videos. This helps you create highlights of breaking news, key quotes from press conferences, clips ready for social media, and quick updates for ongoing stories.

Here’s how the platform makes it easy:

  1. Reference your source video with "fp_media://" in the URL parameter.
  1. Set precise start and end times for your clip, if these parameters are omitted, the entire length of the original video will be used by default.
  1. Get a new media ID for your clip instantly.

Your request body should be structured like this:

1{
2  "inputs": [
3    {
4      "type": "video",
5      "url": "fp_media://0dde8722-278b-49e2-b0c8-52b57aaf2843",
6      "startTime": 0,
7      "endTime": 60
8    }
9  ],
10  "metadata": {
11    "key1": "value1"
12  },
13  "accessPolicy": "public",
14  "maxResolution": "1080p"
15}

3.2 Adding a watermark to your videos

To add a watermark image to your video, you’ll want to set up your API request with a payload that outlines both the video and watermark details. You can control where the watermark appears using alignment and margin settings and customize its look by adjusting the size and opacity.

Follow our guide here to add watermarks to videos: Watermark your videos.

Adding a watermark to your videos

3.3 Generate video thumbnails automatically

To make thumbnails for your uploaded videos, you need to send a request to this URL, replacing {PLAYBACK_ID} with your video's ID:

1https://images.fastpix.io/{PLAYBACK_ID}/thumbnail.{png|jpg|webp}

You can choose from JPG, PNG, and WEBP formats for your thumbnails, but we suggest using WEBP. It offers a good mix of quality and fast loading, which is great for video platforms.

You can also customize your thumbnails by changing the width and height, and you can flip them either horizontally or vertically. If you want to learn more about how to use these options, check out our guide on extracting thumbnails from videos.

3.4 Add overlays and captions to news broadcasts

News videos often need extra details like captions and audio overlays. These features help create professional news content that meets broadcast standards while maintaining quick turnaround times.

Here’s how to do it:

First, ensure your audio file is good quality and the right length for the part of the video you want to use. Save it to a URL that’s easy to access.

Next, set up your request using the API in JSON format. You’ll need to include "type": "audio" and use "imposeTracks" for the overlay. Make sure to add the timing details and set up fade-in and fade-out effects.

Once your request is ready, send it through the FastPix API. It will add the audio overlay just the way you want. For more details, check the guide on overlaying audio at specific times in your news videos.

FastPix also makes it easy to add captions to your videos automatically. To enable this feature, just include the createSubtitles JSON object in your video settings.

Here’s what you need to include:

  • name: This is where you specify the language of the audio, like "english."
  • metadata: You can add a metadata object to tag any specific info you want with the subtitles.
  • languageCode: Use the appropriate language code that matches what’s spoken in the video, such as "en" for English.

For more tips and best practices on adding subtitles, be sure to check out our guide on adding auto-generated subtitles.

Add overlays and captions to news broadcasts

3.5 Adding bumpers to videos

To add bumpers (intro/outro) to your video, simply provide the media URLs for the bumper files in your API request. Bumpers act as introductions and conclusions for your content.

1{
2    "inputs":
3    [
4        {
5            "type": "video",
6            "url": "https://static.fastpix.io/Mainvideo.mp4",
7            "introUrl": "https://static.fastpix.io/introvideo.mp4",
8            "outroUrl": "https://static.fastpix.io/outrovideo.mp4",
9        }
10    ]
11} 

Here, url is the base video URL of your main video, introUrl is the intro video’s URL and outroUrl is the outro video’s URL.

For detailed instructions, check out this guide for adding intros and outros: Add an intro and outro to your video.

4. Deliver and playback news videos anywhere

Video quality really matters for news streaming because viewers want to understand the story and see everything clearly. That’s why our player automatically adjusts the video quality based on the user’s connection speed and device. FastPix Player natively supports adaptive bitrate streaming (ABR), leading to smoother playback and a better experience for everyone.

To get started, run this command in your terminal to install the Video Player SDK:

1npm install @fastpix/player

Then, you can import the player component into your application:

1import "fastpix-player";

You can easily customize your video player’s look and feel by tweaking the CSS selectors. This lets you adjust controls, height, width, aspect ratio, etc. to match your app’s design.

Here’s how to modify the player component:

  • Height and Width: Change the height and width properties to set the player’s dimensions, ensuring it fits perfectly in your layout. 
  • Aspect Ratio: The aspect-ratio property keeps the video proportions right. For example, setting it to 16/9 gives you a widescreen format, perfect for most videos.

1fp-player {  
2  height: 800px;  
3  width: 600px;  
4  aspect-ratio: 16/9;  
5} 

4.1 Stream smoothly across all platforms

The videos you upload with FastPix will work with any player, whether it’s Shaka Player, HLS Player, Exo Player for Android, or AV Player for iOS. This gives you the flexibility to choose the player that fits your needs.

FastPix Player comes with built-in video data and analytics features, and it automatically transcodes videos for different devices, creating an encoding ladder for each one. Our player is cross-platform, so your videos will work on the web, Android, iOS, and more without any extra effort.

4.2 Customize the viewing experience

The player offers great customization options for news platforms. You can easily adjust controls, branding, and playback settings to fit your needs. The player layout changes based on the content type, for on-demand videos, you’ll see easy-to-use controls like play/pause, seek bar, and volume controls.  

For live streams, it focuses on real-time features like live indicators, picture-in-picture control, and a minimal seek bar. The player also adapts to the features you choose with large, medium, or a small container. Whether you want a full set of controls, a balanced layout, or a compact design.

For easy setup, take a look at the FastPix Player documentation.

4.3 Embed news videos anywhere

Live streams and on-demand news videos are embedded differently, and here’s what you need to know. For on-demand videos, if you want to add them to your website, blog, or CMS, you can use the iframe embed code. This code allows you to place the video player directly on your page, and you can customize options like autoplay, muted sound, or looping.

For live streams, you’ll need to create a playback URL using your stream’s playback ID and ensure it’s set to public. You’ll have to input these URLs into your video player, and you'll be all set to start streaming.  

For RTMPS streams, the URL will look like this:

1https://stream.fastpix.io/{playbackId}.m3u8 

If you’re using SRT streams, it will be:

1srt://live.fastpix.io:778?streamid={playbackId}&passphrase={srtSecret} 

5. Track news video performance

Knowing how your news videos are doing is important, but analytics can be confusing. FastPix Video Data makes it simple by breaking down video performance into more than fifty categories, like device type, viewer location, playback method, and time intervals.

With the FastPix Data SDK, you can easily track these key metrics. It works with popular players like Shaka Player, HLS.js, Exo Player for Android, AV Player for iOS, and of course, FastPix Player. This helps you see how your news content is being watched, so you can make improvements that keep your audience engaged.

If you need help getting started with Shaka Player, check out our guide: Monitor Shaka Player. With these insights, you can enhance your news streaming and keep your viewers motivated.

5.1 Monitor viewer engagement

View counts alone don’t give the full picture of how news content is performing. Our analytics system tracks important engagement patterns in viewers habits.

It shows how viewers interact with different types of news content. For example, breaking news usually gets a lot of viewers right away, while in-depth reports often keep viewers engaged for a longer time. These patterns help newsrooms understand what works and what the audience likes.

For news streaming, video playing time is also important. A high playing time means your audience is really interested in watching. Here are a few other metrics to keep in mind:

  • Total views: This shows how many times your video has been watched.
  • Watch time: This measures how long people spend watching your video. More watch time means your content is engaging.
  • Unique views: This counts how many different viewers watched your video, helping you understand your audience size.

Monitor viewer engagement

Learn more about audience metrics here.

5.2 Analyze geographic reach

Looking at where your viewers are can help you see how news stories connect with different areas. By tracking viewership patterns by location, you can understand which stories matter locally and which ones have a wider appeal.

This information can help you decide how to share your content and find new audience markets. With these insights, newsrooms can adjust their coverage to fit local interests while still reaching a global audience.

5.3 Measuring video playback and quality of experience

Quality of Experience (QoE) metrics help you see how your videos are doing from the viewer's point of view. These metrics focus on the overall experience users have while watching your content. Here are some key QoE metrics to keep in mind:

  • Playback success: This shows how often your videos play without any problems. A higher percentage is better. 
  • Startup time: This measures how fast your video starts after someone clicks play. A faster startup time is always nicer. 
  • Smoothness: This looks at how consistently your video plays. You want it to run smoothly without buffering or interruptions. 
  • Video quality: This checks how clear and sharp your video looks while playing.

For more details, check out the QoE metrics guide here.

Measuring video playback and quality of experience

5.4 Measure video performance

Video performance metrics give you more than just basic numbers; they help you see the real impact of your news. The system checks both technical quality and engagement data to make sure your news is delivered well.

It tracks things like stream quality for live broadcasts and on-demand videos, looking at how quickly they start and how smoothly they play. This way, breaking news can reach viewers quickly and clearly, keeping up with professional standards.

Real-time monitoring helps catch any technical issues before they become a problem, so you can provide reliable coverage during important events.

Here are a couple of important metrics to keep in mind:

  • Playback failure: This metric shows how often viewers try to play your video but encounter issues that prevent it from starting. A high playback failure rate can indicate technical problems that need addressing.
  • Exits before the video starts: This tracks how many viewers leave before the video even begins to play. If this number is high, it might suggest that your video isn’t capturing interest right away or that there are loading issues.

By monitoring these metrics, you can identify potential barriers that might be frustrating your audience and work on solutions to improve their viewing experience.

Learn more about these metrics here.

6. Customize the news experience

To make the news streaming experience better, it’s nice to offer educational videos on things like current events, media literacy, and how to understand news sources. These videos can help viewers learn how to stay informed and make smart choices about the news they watch. You could talk about topics like fact-checking, spotting misinformation, and why it’s important to get news from different sources.

It’s also a good idea to add community features like live chat or forums. This way, viewers can connect with journalists and other news fans, creating a friendly space for discussion and support. Being part of a community can really help keep everyone engaged and make it easier to stay updated on the news.

6.1 Download news for offline viewing

News is consumed everywhere, not just where there’s good internet. The platform lets uploaders download the master MP4 files of their news content, so they can access important stories offline. This is really helpful for:

  • Field reporters who need reference footage in areas with poor connectivity.
  • News teams in different time zones who want quick access to their coverage.
  • Uploaders who want to keep the latest versions of their content handy.

The download system keeps the video quality original while making the file sizes smaller, so uploaders can enjoy clear, professional-grade content even when they’re offline.

For step-by-step instructions on how to enable MP4 downloads, take a look at our guide on MP4 support for offline viewing.

6.2 Support global audiences  

Support for global audiences is important because news affects people everywhere. Our platform makes it easy to reach diverse viewers with automatic subtitle generation in the language of the spoken audio.

This means that as news is shared, viewers can switch languages easily, making sure they understand the context. You can also add custom subtitle tracks. Just upload the public URL for the subtitle file, along with the language code and language name.  

These features help you connect with international viewers while keeping high editorial standards. It’s all about making sure everyone can stay informed, no matter where they are.

6.3 Personalize news feeds

Smart content recommendations help viewers stay updated on stories that matter to them. You can create a recommendation system using metadata like tags, titles, and descriptions. This system looks at viewing patterns and preferences to suggest related news, all while keeping editorial independence intact.

7. Secure your news content

Protecting news content is important, and it requires strong security measures that keep it safe while still being accessible. These measures help ensure that your journalism reaches the right audiences while also keeping control over who can access it.

7.1 Control geographic access

To keep your content safe from being used without permission, we use domain and user agent controls. This gives you clear control over where and how your news content can be accessed.

With domain controls, you can set a default rule to either allow or block all domains, and then make specific exceptions. For example, you might allow your news content to be embedded only on your main website and trusted partner sites, while blocking others. This way, unauthorized sites can’t use your valuable news stories.

User agent controls work similarly. You can choose to block or allow certain browsers, devices, or apps from accessing your content. This helps prevent automated scraping of your news videos while ensuring that real users can access them through approved apps.

These controls help protect the value of your content and make sure it’s accessed through the channels you want, like your branded news app or specific partner platforms.

7.2 Protect news content rights

Digital Rights Management (DRM) helps protect the intellectual property of news creators. Our platform uses industry-standard DRM encryption for news videos, which prevents unauthorized downloads and sharing. This way, news organizations can feel secure knowing their content is protected and only accessible to the right audiences.

To manage access to your videos, you can adjust the accessPolicy parameter. By setting it to drm, you enable digital rights management. If you’re looking for a simpler option, you can set the access policy to private to restrict access without the complexities of DRM.

Here’s how to configure the access policy for DRM:

1"accessPolicy": "drm"

And for private access:

1"accessPolicy": "private"

You can choose from public, private, or drm to suit your needs.

7.3 Manage premium content

Signed URLs give secure access to premium news content. These URLs come with built-in expiration times and specific permissions. For example, a URL might look like this:

https://play.fastpix.io/uploads/...&X-Amz-Expires=7200

The expiration time (in this case, two hours) makes sure that these temporary links can’t be shared forever. This helps protect exclusive interviews, special reports, and subscriber-only content while allowing secure access for authorized viewers.

Let’s summarize this...

Developer teams rely on FastPix to deliver seamless, real-time news streaming—scaling reliably and efficiently across the globe. From live broadcasts to on-demand replays, FastPix ensures uninterrupted video experiences with the flexibility to match your platform’s needs.

How is FastPix different?

1. We’re built for speed and reliability. Our video APIs handle ingestion, transcoding, and playback with low latency, so breaking news reaches your audience instantly.

2. We’re fully customizable. Own the news streaming experience with a player that adapts to your brand—no forced branding, no platform lock-ins.

3. We provide real-time insights. Monitor performance, track engagement, and optimize video delivery with powerful analytics.

4. We're built for engineers. This means SDKs for popular languages, docs for (nearly) everything you want to build, and APIs you can actually use.

FastPix is designed for teams that need full control over their video infrastructure without added complexity. You can sign up and get started for free right away.

If you're interested in more tutorials like this one, then take a look at our other guides for building video streaming platforms.

Tell us what you think

We’d love to hear what you think about our products and features, so feel free to reach out and share your thoughts!

Frequently asked questions

How do I set up live news streaming with FastPix?

Setting up live news streaming is straightforward. You'll need to create a stream using our API, which provides you with a Stream Key and Playback ID. Configure your broadcasting software with these credentials, and you're ready to go live. The platform supports industry-standard RTMPS and SRT protocols, making it compatible with professional broadcasting equipment. For breaking news coverage, our automatic reconnection feature helps maintain stream stability even with network issues.

Can I automatically generate captions for news videos in multiple languages?

Yes, FastPix's video platform automatically generates captions in the spoken language for your news content. Once you upload a video, the system processes it and creates captions. This feature is particularly useful for international news coverage and accessibility compliance. Captions can be styled and positioned to match your news organization's branding.

What analytics does FastPix provide for tracking news video performance?

The platform tracks over 50 different metrics for news video performance. You'll get detailed insights into viewer engagement, geographic distribution, and content impact. This includes real-time monitoring of live broadcasts, viewer retention patterns, and peak viewing times. These analytics help newsrooms understand which stories resonate with their audience and optimize content delivery.

How do I protect premium news content while allowing easy access for subscribers?

FastPix offers multiple layers of content protection. You can use signed URLs with expiration times for temporary access, implement DRM for premium content, and set up geographic restrictions. The platform also provides domain control to prevent unauthorized embedding. These security features work together with our user-friendly playback system, ensuring subscribers can easily access content while maintaining proper content protection.