Best Codec Upload for Brightcove Video Cloud
Overview
Brightcove Live provides a robust service for creating live streaming events or 24/seven live streams. This guide outlines best practices for optimizing your live streams
Content context
The type of content being streamed needs to be considered as it has an touch on on the required settings for maintaining the quality of the input. Note that there are trade-offs and using the highest possible settings may cause bug such as skipped frames.
Based on the information below, we recommend that you lot exam different setting combinations for quality and operation earlier your live consequence.
The key input parameters are outlined in the following table:
| Parameter | Notes |
|---|---|
| Input bitrate | The bitrate that the encoder sends. Higher rates are more susceptible to network loss and then should exist kept as depression as practical. |
| Input resolution | This should match the source content. There is no do good in making this greater than the original source and the higher this value is, the higher the bitrate is required to support information technology. |
| Input bitrate to top profile ratio | The input bitrate should exist college than the rate of the peak profile, but also much higher may result in dropped frames or other issues - e.1000. if your superlative rate is 1080p 30fps, the input should ideally be around 4 MBPS. Note that this is affected by the profile. We generally recommend an input bitrate that is 2x (twice) the bitrate of your highest bitrate live rendition. If you require a high bitrate superlative output it is worth testing the |
| Profiles | The different profiles (baseline, principal, high) compress the information in ascending amounts (baseline: lowest, loftier: highest). Greater pinch improves the rate of transmission, merely as well requires greater CPU resources to decode the data. Unless the encoder is highly constrained in available resources baseline profile should be avoided. On the other mitt, using high contour at high bitrates is more probable to cause skipped frames due to the increased decode CPU resources required. Also see GOP structure below. |
| Frame rate | This should match the source. Higher rates will crave proportionally higher input bitrates e.g. with activeness sport content a 60fps input stream carries substantially more information than a 30fps stream. High rates such every bit 60fps are more probable to take skip frame issues on complex content at high bitrates. |
| Keyframe rate | The almost efficient setting for this is the segment elapsing x frame rate - for example, if you have half-dozen 2nd segments and 30fps making the keyframe rate 180 (6x30) would result in the lowest decoder load. Even so, to account for any fluctuations this is set to 2 x the frame rate - for example, sixty for a framerate of xxx fps. |
| GOP construction | Meet GOP structure below. |
Input restrictions
In order to ensure the highest quality, virtually consistent streaming experience, Brightcove Live limits input stream settings to:
- Protocol:
rtmp,rtp,rtp-fec, orsrt(all exceptrtmpare for MPEG2-TS inputs) [ane-1] - Resolution: Maximum 1920x1080
- Maximum 30 fps, which is typical. Brightcove supports upwardly to 60 fps, just you will need to Contact Brightcove Support to take the limit increased. When using 60fps, Brightcove recommends increasing the bitrate to accomplish the desired visual quality for the content and a constant frame rate.
- Less than 10 Mbps
- Abiding Bitrate (CBR) greatly reduces the chance of bug
- Video codec must be H.264
- Slices: If your encoder has this option, set it to
1 - Audio codec must be
AAC - Audio sampling rate: 44.1khz and 48khz are the recommended sample audio rates to use
- Keyframe Charge per unit or GOP (Group of Pictures) aligned:
- A Keyframe should e'er occur every two seconds for both inputs and outputs (including 25fps video). Meaning a keyframe is sent to Brightcove from the encoder every ii seconds of the stream itself. This procedure tin be defined in different ways, but Keyframe Rate is the most common.
- It can be calculated in different ways by different encoders. For example:
- Wirecast uses the corporeality of frames that laissez passer, then for a 30fps video, the setting would be 60.
- Elemental encoders use seconds and so that the correct setting would be '2'.
- sixty FPS video will only change if this setting is counted by the frames, in which case every 120 frames would equal ii seconds.
- If there is an selection for Keyframe Aligned, Sync GOP, Align Keyframes, or something along those lines, make sure Keyframes are aligned. When Keyframes are non aligned, it causes synchronization bug with HLS segmentation.
Notes
- [1-i] If yous have multiple video/sound tracks in your TS input, we volition pick the first for each. We also strongly recommend using FEC, equally plain TS over UDP over the internet is very unreliable. For FEC, nosotros could note that the smaller the values you utilise for rows/columns, the more reliable the error correction will be (at the price of increased bandwidth.
Central issues with streaming
There are several issues that are generally encountered that chronicle to problems with the streaming experience from the encoder to Brightcove:
- Network instability affecting the input:
- While the internet is generally quite reliable information technology is not infallible and issues do occur. Issues are more likely to be noticed on higher bitrates.
- If information technology takes longer to upload the video than existent time then this can result in input drift (the time that the video is received is substantially later than when it was sent)
- Transcoder overload resulting in skip frames: while we practice everything to brand certain our transcoders have plenty overhead sometimes sudden spikes in either content complication, network hiccups/ catchups or other interruptions to our transcoders can cause skip frames. The more complex the input is and then the more probable it is that skipped frames will be encountered. There is too a known outcome where changes from a still paradigm for an extended duration east.g. longer than v minutes and a sudden change to action content can crusade an overload.
- Encoder sending variable frame durations: the frame rate should be constant and it should exist such that it allows for a keyframe interval that is abiding. For example, for a frame rate such as 29.97 aka 30000/1001 or 23.976 aka 24000/1001 it is non possible to prepare a keyframe at a regular interval and as such should be avoided.
- Encoder sending keyframes that are not a consistent duration apart, the keyframe rate should be a minimum of 2x the frame charge per unit in seconds. For case, for a frame rate of 30fps the keyframe interval should exist 60 frames which is ii seconds and should be a maximum interval of once per segment - for instance, if y'all accept a 6 2d segment then the maximum interval would be 180 frames at 30 fps
Content types
More often than not, more complex content will crave using the higher of these settings and as such is more susceptible to skipped frames. The table below shows some examples in order of complexity. Note that these are examples but, and as simply about every encoder setup is different. Testing and verification should exist performed.
| Content Type | Example Settings |
|---|---|
| Webcam |
|
| Web conference |
|
| Animation |
|
| Talking Head / News |
|
| Live Concert |
|
| Live Sport |
|
| Live Sport High FPS |
|
Verification and testing
Ideally you should showtime with the lowest possible settings on your about complex (most changing content) and test with their content by increasing the various settings until the output is acceptable. This is because generally the college the settings the more likely issues are to be encountered in either the network or transcoding.
Testing bandwidth
The offset stride towards arriving at the appropriate settings for the input stream is to determine the bachelor bandwidth on site. There are a few tools that can help:
- SpeedOf.Me (http://speedof.me) - Determining the total bandwidth available for HTTP connections is a good offset footstep. However, since the input feed will be streamed to the Live module over RTMP instead of HTTP, the actual bandwidth available for RTMP connections volition exist significantly less.
- Speedtest (http://world wide web.speedtest.net) - Online tool for determining current upload and download speeds.
Input Bandwidth
Providing a loftier-quality, stable input stream is the only way to ensure the best user experience for viewers. A proficient input stream provides the best video quality at the highest consistently bachelor bandwidth from a location.
- Minimum input bandwidth: 2.5 mbps
- Maximum input bandwidth: 10 mbps
Determining encoder capabilities
Agreement the capabilities of the software and hardware used to encode the live stream and send it to the Live module is besides important. In that location may be plenty of bitrate to send a loftier-quality, 1080p input stream, but the hardware as well needs to be able to encode in faster-than-realtime speeds. Some encoding tools display information about the total CPU usage and bandwidth being used. For case, Telestream Wirecast volition brandish the output statistics at the bottom of the Wirecast window.
This data is useful when determining the nearly stable, highest quality stream that is possible on given hardware. Things to watch in Wirecast:
- CPU should be less than fourscore%
- Datarate should exist near the target bitrate
- FPS should be at the rate of the input stream settings
GOP construction
The Grouping of Pictures (GOP) construction of the video is dependent first on the profile that is used as:
- Baseline profile only supports I and P frames and CAVLC entropy encoding
- Chief and Loftier support I, B and P frames and CABAC entropy encoding
Principal and High profiles generally issue in better pinch at better quality simply also crave additional ciphering to encode and decode, as such may be more than susceptible to skipped frames. In add-on, as these profiles apply B (bi-directional) frames, they induce some delay in the encoding process.
Baseline profile requires less CPU to encode and decode, but as it offers less pinch, it requires a higher bitrate to maintain quality and as such is more susceptible to network issues.
Notes on frame types and their probable impact on performance:
- I frames: uses the most bandwidth. Best added for complete scene changes or at the segment boundaries - i.e. the more than the content changes the more than of these y'all demand (shorter GOP length)
- P frames: are the base unit between I frames
- B frames: use both prior and hereafter frames, the more than you add together the amend the compression volition be simply the higher the CPU and latency
The utilize of I frames should ideally be limited to start of segments (critical if using passthrough) or scene changes. All or loftier numbers of I frames should be avoided equally this can cause excess load leading to skipped frames.
Additional notes:
- Utilize options for preventing dense placement of key frames (example:
min_keyin= iii+). - Use options ensuring a regular cadence of insertion of Key frames. For example, instead of specifying GOP length in seconds, specify information technology in exact fractions or frames.
Bitrate
- Minimum input bandwidth: 2.5 mbps
- Maximum input bandwidth: 10 mbps
- Make the stream "virtually CBR"" - with
max_bitrate= 1.1 * target_bitrate. - Use strict HRD-compliant rate control manner, if available.
Protocol
It is of import to note that the internet is not a guaranteed delivery network, and that while an internet connectedness may exist considered "good", it may not be good enough for reliable live video streaming at high quality. A small disruption in the path between the client encoder and the Brightcove transcoding platform such every bit a small amount of congestion at an Internet service provider, an unplanned failover between routers, or similar issues can cause a disruption in the video output. In high stakes alive circulate it is normal do to have multiple dedicated networks consisting of either dedicated fibre, booked satellite bandwidth, or committed bandwidth on a managed network. This comes with a substantial toll, and in nearly cases it is possible to achieve a good plenty effect over the internet. If, still, it is critical to maintain mistake-gratuitous send delight consider AWS Straight Connect or an Internet service provider that can provide some level of dedicated bandwidth.
By and large, we recommend dedicating bandwidth two times the encoder's expected stream size to completely avoid any bandwidth-related network issues.
The options we recommend are (in social club):
- SRT - provides a good combination of speed of transport (UDP) with some control and error resilience. Not available on all encoders, though there are tools that can translate from local RTP such as srt-transmit.
- RTMP - being TCP based, it provides a good level of mistake resilience, downsides are that this comes with a substantial overhead. Note that not all features such as multiple sound tracks are bachelor with RTMP.
- RTP-FEC - provides fast UDP based transport with some error resilience
- RTP - provides fast ship and advanced features with no error resilience
Supported encoders
See Supported Encoders for Live Events for list of encoders known to piece of work with Alive. Note that other encoders may also work, but take not been tested.
Supported CDNs
- Akamai
- Amazon CloudFront
Retries
We recommend enabling retries for the RTMP connection from the encoder. A large number of retry attempts with a five-second retry interval volition mitigate whatsoever intermittent connectivity issues between the encoder and the entry indicate.
Job settings (Alive API but)
Recommended job settings
| Field | Recommended Value |
|---|---|
ad_audio_loudness_level | -23 (EBU R.128 standard) |
Start a live stream recommendations
A job must exist activated before the encoder connection. Likewise, activating a job after starting the stream from the encoder is not a supported procedure and may cause unexpected behavior.
Slate source file recommendations
- Resolution: (best in your encoding ladder)
- FPS: (aforementioned as your source)
- Bitrate: (best in your encoding ladder or improve)
- Audio: (same bitrate, channels, sampling frequency, and bits per sample as your best rendition, or aforementioned every bit your input)
Output recommendations
Below are recommended output settings, but note that for many encoders, the RTMP input is limited to 10 MBPS (video + audio) and a framerate of 30fps.
| Detail | Recommendation |
|---|---|
| Video codec | h264 is currently the only option |
| Audio codec | aac is currently the just option |
| Width | If no width or height is supplied, the source dimensions are used. If either width or height is supplied, the other dimension will exist calculated to maintain the aspect ratio of the source. |
| Height | If no width or height is supplied, the source dimensions are used. If either width or summit is supplied, the other dimension will be calculated to maintain the aspect ratio of the source. |
| Bitrate | Less than or equal to the input bitrate (for all-time results, highest output bitrate should be half of the input bitrate) |
| Keyframe rate | 2 seconds |
FAQ
- How soon do you have to showtime streaming after creating a live job?
- In Brightcove Live, there are two conditions when the state transitions from
waitingtofinishing:- if the chore is in the waiting state (not yet started) and the
max_waiting_time_mshas elapsed, the job is finished/deactivated. - If the job is in the asunder state (started, but disconnected) and the
reconnect_timehas elapsed, the job is finished/deactivated.
If the
event_lengthis greater than 30 minutes, the chore volition terminate in thirty minutes. If theevent_lengthis less than 30 minutes, the job will cease inevent_length.For example, if the
event_lengthis 60 minutes, so, the alive job will terminate in thirty minutes. If theevent_lengthis 15 minutes, so, the alive job volition terminate in 15 minutesThe
reconnect_timehas no upshot for waiting state. - if the chore is in the waiting state (not yet started) and the
- What are the limitations on concurrent live job_settings?
-
A maximum of five active waiting, unstarted jobs is allowed at whatever time.
Additional limitations on concurrent jobs:
- The number of
channel(24x7) jobs is limited to 0 or a low number per region (depending on the account blazon). - The number of concurrently running
eventjobs is express by region, more often than not to 100. - The number of concurrently waiting to connect
eventjobs is express to 5. - The number of SEP jobs per region is limited to three or 10 (encounter Supported AWS regions).
Any of these limits can be adjusted on an business relationship level by Support. Contact your account manager if yous demand boosted capacity.
- The number of
- Can Brightcove Live push button 1080p quality provided the input bandwidth is sufficient?
- Yes, 1080p input is enabled for all accounts.
- Is DRM available?
- Aye! Contact your account managing director if you lot are interested in adding DRM support to your live account.
For farther assistance
If you need further help getting your live event to work, yous can contact us. To make sure yous get the fastest response possible, below is a list of what Brightcove Back up volition need to solve the problem.
- The specific symptoms the stream is having. For example, does it not play at all or does it stutter or freeze?
- Whether this stream worked correctly in the by
- The entry point URL you are using in your encoder
- The encoding software and hardware are you using
- The URL to the thespian to which you lot take published the alive result
- The video ID of your live nugget in Video Deject Studio
- The results of a trace-route from your encoder to the publishing point host
barnestharbooked53.blogspot.com
Source: https://live.support.brightcove.com/get-started/live-module-guidelines-and-best-practices.html
0 Response to "Best Codec Upload for Brightcove Video Cloud"
Post a Comment