Share this
Encoding for Cost Efficient Streaming
by THEOplayer on March 19, 2020
Our previous blog post, Basics of Video Encoding: Everything You Need to Know, we discussed the different aspects of encoding and the different video codecs that are currently being used, or are looking to be adopted in the industry. In this post, we will focus on key ways to stream online video efficiently by optimising video encoding.
Creating a cost efficient online video streaming infrastructure, without sacrificing the final quality of experience, can present challenges. When looking at which part of your video infrastructure to focus on, encoding is crucial for cost efficiency, and the codec that’s used should be determined by the alignment with the use case.
For example, for one stream audio could be the most important (i.e. concert or musical event), where as in other situations you will need to optimise for stream quality, higher frame rates or the available bandwidth, such as in fast motion movies like sporting events compared to video content containing static landscape webcams.
It’s important to remember that efficiency in codecs immediately leads to smaller file sizes. For example, if a video codec claims that it is 50% more efficient than another codec, it simply means that file sizes are 50% smaller.
The compression of the file undergoes a lossy process, or the removal of irrelevant information that is related to the file or video. As explored in the previous blog post, this compression is done through motion compensation, macroblocking, chroma subsampling, and for audio, quantization is used. When the video file is played back, it is played as an approximation of the original. The more information that is removed from the file during compression, the worse the quality of the final stream will be - so there has to be a happy medium.
To find a balance, there are a set of recommended encoding configurations for the video settings, video bitrate, frame rate audio settings and audio bitrate. The frame rate is described as the speed of which the frames of the video are shown. The higher the frame rate, the smoother the video, and likewise the slower the speed, the more disjointed and choppy the video is viewed in playback. Audio bitrate will vary depending on use case, but it is important to remember that if the end viewer is having trouble hearing the stream when they need to, there’s a higher chance they’ll abandon the stream all together. The video bitrate can be the more challenging aspect to predict with the use case and the quality. If Adaptive Bitrate (ABR) is used, the bitrate will configure based on the factors in play and what bitrate it can support.
The video and audio codecs which are recommended by our THEO experts for an efficient stream are:
-
Video: H.264 in Baseline Profile, Main Profile or High Profile. We advise against the usage of B-frames, as this requires the entire chunk to be available before playback can start. It is important to take into account that not all platforms will be able to play back the High profile. When setting up encoding profiles, keep in mind the platforms you intend to support.
-
Audio: AAC-LC or HE-AAC. It is however important to use the same codec for all audio tracks. Using the same sampling frequency and bitrate is not required, but deviating from this might result in audible changes between streams. Also, when using HE-AAC it is highly recommended to state this in the stream's CODEC-attribute.
With regards to packaging, both raw-audio files (.aac, .mp3, ...) and MPEG Transport Streams can be used. For video, it is recommended to add a full IDR frame (keyframe) at the start of each video chunk.
The following configurations for adaptive streams have proven to work well on most content. Keep in mind some content can be displayed better when tweaking these parameters:
If you have any questions about configuring your codecs for the best stream for your use case, contact our THEO experts.
Share this
- THEOplayer (39)
- online streaming (36)
- low latency (28)
- live streaming (27)
- video streaming (22)
- HESP (20)
- HLS (19)
- new features (19)
- SDK (18)
- html5 player (16)
- cross-platform (15)
- online video (14)
- LL-HLS (11)
- MPEG-DASH (11)
- best video player (11)
- THEO Technologies (10)
- THEOlive (10)
- Tizen (10)
- awards (10)
- content monetisation (10)
- delivering content (10)
- latency (10)
- partnership (10)
- SmartTV (9)
- fast zapping (9)
- video codec (9)
- Big Screen (8)
- Samsung (8)
- Adobe flash (7)
- High Efficiency Streaming Protocol (7)
- Streaming Media Readers' Choice Awards (7)
- WebOS (7)
- advertising (7)
- html5 (7)
- innovation (7)
- low bandwidth (7)
- Apple (6)
- Efficiency (6)
- Events (6)
- SSAI (6)
- Bandwidth Usage (5)
- CDN (5)
- Deloitte (5)
- LG (5)
- Online Advertising (5)
- Ultra Low Latency (5)
- adaptive bitrate (5)
- nomination (5)
- release (5)
- roku (5)
- viewers expercience (5)
- AV1 (4)
- CMAF (4)
- DVR (4)
- HTTP (4)
- Update (4)
- ad revenue (4)
- case study (4)
- fast 50 (4)
- google (4)
- streaming media west (4)
- support matrix (4)
- ABR (3)
- Chrome (3)
- H.265 (3)
- HESP Alliance (3)
- HEVC (3)
- IBC (3)
- IBC trade show (3)
- THEO Technologies Partner Success Team (3)
- THEOplayer Partner Success Team (3)
- Year Award (3)
- content encryption (3)
- content protection (3)
- customise feature (3)
- drm (3)
- dynamic ad insertion (3)
- monetization (3)
- reduce buffering (3)
- scalable (3)
- video monetization (3)
- "content delivery" (2)
- "network api" (2)
- AES-128 (2)
- CSI Awards (2)
- Cost Efficient (2)
- Encoding (2)
- Encryption (2)
- FireTV (2)
- H.264 (2)
- MPEG (2)
- Microsoft Silverlight (2)
- Start-Up Times (2)
- UI (2)
- VMAP (2)
- VOD (2)
- VP9 (2)
- VPAID2.0 (2)
- adobe (2)
- ads in HTML5 (2)
- analytics (2)
- captions (2)
- chromecast (2)
- chromecast support (2)
- client-side ad insertion (2)
- clipping (2)
- closed captions (2)
- content integration (2)
- customer case (2)
- deloitte rising star (2)
- fast500 (2)
- frame accurate clipping (2)
- frame accurate seeking (2)
- interactive video (2)
- metadata (2)
- multiple audio (2)
- nab show (2)
- playback speed (2)
- plugin-free (2)
- pricing (2)
- server-side ad replacement (2)
- subtitles (2)
- video (2)
- video content (2)
- video publishers (2)
- video trends (2)
- viewer experience (2)
- "smooth playback" (1)
- 360 Video (1)
- AOM (1)
- API (1)
- Android TV (1)
- BVE (1)
- Best of Show (1)
- CEA-608 (1)
- CEA-708 (1)
- CORS (1)
- DIY (1)
- Edge (1)
- FCC (1)
- HLS stream (1)
- Hudl (1)
- LCEVC (1)
- LHLS (1)
- LL-DASH (1)
- Microsoft Azure Media Services (1)
- Monoscopic (1)
- NAB Show 2016 (1)
- NPM (1)
- NetOn.Live (1)
- OMID (1)
- Periscope (1)
- Press Release (1)
- React Native (1)
- React Native SDK (1)
- Real-time (1)
- SIMID (1)
- Scale Up of the Year award (1)
- Seeking (1)
- Stereoscopic (1)
- Swisscom (1)
- TVB Europe (1)
- Tech Startup Day (1)
- Telenet (1)
- Uncategorized (1)
- University of Manitoba (1)
- User Interface (1)
- VAST (1)
- VPAID (1)
- VR (1)
- VR180 (1)
- Vivaldi support (1)
- Vualto (1)
- ad block detection (1)
- ad blocking (1)
- adblock detection (1)
- android (1)
- apple tv (1)
- audio (1)
- autoplay (1)
- cloud (1)
- facebook html5 (1)
- faster ABR (1)
- fmp4 (1)
- hiring (1)
- iGameMedia (1)
- iOS (1)
- iOS SDK (1)
- iPadOS (1)
- id3 (1)
- language localisation (1)
- micro moments (1)
- mobile ad (1)
- new web browser (1)
- offline playback (1)
- preloading (1)
- program-date-time (1)
- seamless transition (1)
- server-side ad insertion (1)
- sports betting (1)
- sports streaming (1)
- stream problems (1)
- streaming media east (1)
- support organization (1)
- thumbnails (1)
- use case (1)
- video clipping (1)
- video recording (1)
- video trends in 2016 (1)
- visibility (1)
- vulnerabilities (1)
- webRTC (1)
- wowza (1)
- zero-day exploit (1)
- April 2023 (4)
- March 2023 (2)
- December 2022 (1)
- September 2022 (4)
- July 2022 (1)
- June 2022 (3)
- April 2022 (1)
- March 2022 (1)
- January 2022 (1)
- November 2021 (1)
- October 2021 (3)
- September 2021 (3)
- July 2021 (1)
- June 2021 (1)
- May 2021 (4)
- April 2021 (4)
- March 2021 (6)
- February 2021 (8)
- January 2021 (4)
- December 2020 (1)
- November 2020 (2)
- October 2020 (1)
- September 2020 (2)
- August 2020 (1)
- July 2020 (3)
- June 2020 (3)
- May 2020 (1)
- April 2020 (3)
- March 2020 (3)
- February 2020 (1)
- January 2020 (3)
- December 2019 (3)
- November 2019 (3)
- October 2019 (1)
- September 2019 (4)
- August 2019 (1)
- June 2019 (1)
- December 2018 (1)
- November 2018 (3)
- October 2018 (1)
- August 2018 (4)
- July 2018 (2)
- June 2018 (2)
- April 2018 (1)
- March 2018 (3)
- February 2018 (2)
- January 2018 (2)
- December 2017 (1)
- November 2017 (1)
- October 2017 (1)
- September 2017 (2)
- August 2017 (3)
- May 2017 (3)
- April 2017 (1)
- March 2017 (1)
- February 2017 (1)
- December 2016 (1)
- November 2016 (3)
- October 2016 (2)
- September 2016 (4)
- August 2016 (3)
- July 2016 (1)
- May 2016 (2)
- April 2016 (4)
- March 2016 (2)
- February 2016 (4)
- January 2016 (2)
- December 2015 (1)
- November 2015 (2)
- October 2015 (5)
- August 2015 (3)
- July 2015 (1)
- May 2015 (1)
- March 2015 (2)
- January 2015 (2)
- September 2014 (1)
- August 2014 (1)