Products
Products
Video Hosting
Upload and manage your videos in a centralized video library.
Image Hosting
Upload and manage all your images in a centralized library.
Galleries
Choose from 100+templates to showcase your media in style.
Video Messaging
Record, and send personalized video messages.
CincoTube
Create your own community video hub your team, students or fans.
Pages
Create dedicated webpages to share your videos and images.
Live
Create dedicated webpages to share your videos and images.
For Developers
Video API
Build a unique video experience.
DeepUploader
Collect and store user content from anywhere with our file uploader.
Solutions
Solutions
Enterprise
Supercharge your business with secure, internal communication.
Townhall
Webinars
Team Collaboration
Learning & Development
Creative Professionals
Get creative with a built in-suite of editing and marketing tools.
eCommerce
Boost sales with interactive video and easy-embedding.
Townhall
Webinars
Team Collaboration
Learning & Development
eLearning & Training
Host and share course materials in a centralized portal.
Sales & Marketing
Attract, engage and convert with interactive tools and analytics.
"Cincopa helped my Enterprise organization collaborate better through video."
Book a Demo
Resources
Resources
Blog
Learn about the latest industry trends, tips & tricks.
Help Centre
Get access to help articles FAQs, and all things Cincopa.
Partners
Check out our valued list of partners.
Product Updates
Stay up-to-date with our latest greatest features.
Ebooks, Guides & More
Customer Stories
Hear how we've helped businesses succeed.
Boost Campaign Performance Through Video
Discover how to boost your next campaign by using video.
Download Now
Pricing
Watch a Demo
Demo
Login
Start Free Trial
Video quality selection, or bitrate switching, is a feature of adaptive streaming protocols like HLS and DASH. This functionality allows the video player to dynamically adjust the quality of the video stream based on the viewer's network conditions, providing a seamless viewing experience with minimal buffering. Implementing bitrate switching requires understanding the streaming protocols, player configuration, and the methods to handle dynamic switching. Key Components of Bitrate Switching 1. Adaptive Bitrate Streaming (ABR) Adaptive Bitrate Streaming is a technique used to adjust the video quality in real-time based on the viewer's available bandwidth and device capabilities. It encodes the same video content at multiple bitrates and segments it into small chunks. The player can then select the appropriate chunk to download, ensuring smooth playback even in fluctuating network conditions. The major protocols supporting ABR are: HLS (HTTP Live Streaming) : Uses M3U8 playlists to provide multiple quality levels. DASH (Dynamic Adaptive Streaming over HTTP) : Uses MPD (Media Presentation Description) manifests for dynamic quality switching. 2. Video Quality Representation Each video quality is typically represented by different bitrate streams, each corresponding to a different resolution (e.g., 360p, 720p, 1080p). The streaming player selects the stream with the appropriate bitrate based on the user’s current network speed. Bitrate : The amount of data transferred per second during playback, influencing video resolution and quality. Resolution : The display quality of the video (e.g., 480p, 720p, 1080p). When network conditions improve or degrade, the player will switch between these quality levels without interrupting playback. Implementing Bitrate Switching in Video Players HLS (HTTP Live Streaming) Implementation HLS is one of the most common protocols that support adaptive bitrate streaming. It works by providing a master playlist file (M3U8), which contains references to different quality levels of the video stream. The video player uses this playlist to fetch the video segments at the appropriate quality based on current network conditions. Example : Setting Up HLS in HTML5 Video Player
Explanation : The
tag points to the M3U8 playlist file, which contains references to different video qualities. The player automatically switches between video qualities depending on the bandwidth. DASH (Dynamic Adaptive Streaming over HTTP) Implementation DASH uses MPD (Media Presentation Description) files to define available bitrates and the segments for each quality. The player dynamically switches between the bitrates as the network conditions change, providing a smooth viewing experience. Example : Setting Up DASH in HTML5 Video Player
Explanation : The src points to the MPD manifest file, which contains the bitrate and segment details. The player handles bitrate switching automatically by selecting the appropriate representation based on network speed. Handling Bitrate Switching in JavaScript with HLS.js HLS.js is a JavaScript library that enables the playback of HLS streams in browsers that do not natively support HLS (e.g., Chrome, Firefox). HLS.js automatically selects the best bitrate based on the current bandwidth. Example: Using HLS.js for Bitrate Switching
Explanation : HLS.js is used to load and play the HLS stream when the browser does not support native HLS playback. The LEVEL_SWITCHED event provides insights into when the bitrate (level) has changed. Handling Bitrate Switching in JavaScript with Dash.js Dash.js is a JavaScript library that provides support for playing DASH streams in browsers. It automatically handles bitrate switching by monitoring network conditions and adjusting video quality dynamically. Example: Using Dash.js for Bitrate Switching
Explanation : STREAMING_STARTED confirms playback has begun. QUALITY_CHANGE_REQUESTED logs when the player requests a new quality level based on network conditions. QUALITY_CHANGE_RENDERED confirms when the new quality is actually rendered on screen. ABR Control: The autoSwitchBitrate setting can be adjusted to enable or disable automatic bitrate switching. Performance Optimization for Bitrate Switching Segment Duration Optimization Reducing the segment duration can improve bitrate switching responsiveness. Shorter segments result in faster switching as the player has more frequent opportunities to adjust the bitrate. Example: Configuring Segment Duration in HLS ffmpeg -i input.mp4 -c:v libx264 -hls_time 2 -hls_flags delete_segments -f hls output.m3u8 Explanation : -hls_time 2: Sets segment duration to 2 seconds, allowing for faster bitrate switching. -hls_flags delete_segments: Removes old segments quickly to optimize storage and playback speed. Buffer Management for Smooth Transitions in Dash.js Efficient buffer management is crucial for preventing playback interruptions and ensuring seamless quality transitions. Dash.js allows you to fine-tune buffer settings using the updateSettings method. Example: Configuring Buffer Settings in Dash.js // Configure buffer settings for Dash.js player.updateSettings({ streaming: { buffer: { // Amount of video (in seconds) to buffer when playing at the highest quality bufferTimeAtTopQuality: 20, // Buffer size for long-form content (e.g., movies, long videos) bufferTimeAtTopQualityLongForm: 30, // Default buffer size when not at top quality bufferTimeDefault: 10, // How much backward buffer (already played content) to keep bufferToKeep: 5, // Duration threshold (in seconds) to consider content as long-form longFormContentDurationThreshold: 300 } } }); Explanation: bufferTimeAtTopQuality: Buffer size (in seconds) when playing at the highest quality, for stable playback. bufferTimeAtTopQualityLongForm: Larger buffer for long-form content to minimize interruptions. bufferTimeDefault: Buffer size when not at the highest quality. bufferToKeep: Amount of already-played content to keep in the buffer (backward buffer). longFormContentDurationThreshold: Duration in seconds above which content is treated as long-form, triggering the larger buffer setting 1 3 .