CMP EMBEDDED.COM

Login | Register     Welcome Guest  
HOME DESIGN PRODUCTS COLUMNS E-LEARNING CONFERENCES CODE FORUMS/BLOGS NEWSLETTERS CONTACT FEATURES RSS RSS

Streaming video with "TimeSlice" multicore-friendly processing eliminates dropped frames
The process creates a CBR-like stream, but with encoding based on VBR, video quality is better. There are no dropped frames, PSNR is higher, and less bandwidth is needed for a given quality.



Video Imaging DesignLine

VBR encoding
If the scene was encoded with the VBR method, the codec would simply increase the bit rate as the action increased. When configuring VBR, you select a quality level, known as a Q value, which is typically based on a scale of zero to 100. Every frame of video is encoded at that quality level, and because the amount of motion determines the bit rate of a sequence of frames, the resulting overall bit rate maps to the complexity of a scene.

In other words, selecting a higher or lower Q shifts the bit rate of a stream up or down accordingly, as shown in Figure 2.


Figure 2: Higher or lower Q shifts of the bit rate

In most cases, frames will not be dropped with VBR encoding; every single frame of video is guaranteed to be encoded, based on the specified Q level. However, frames and data might be dropped when the VBR-encoded video is streamed on a network. Unless a user is streaming over a very reliable, extremely high-bandwidth connection, the high-bit-rate peaks in a VBR stream can result in dropped packets, which then result in dropped frames and jerky video.


Figure 3: Shows what happens when the available bandwidth is not high enough to handle the peaks in a VBRencoded stream.

Eleven years of experience has shown that the best way to encode video for streaming over the Internet is with CBR. So how does CBR encoding handle the scenario above?

Where VBR varies the bit rate to maintain constant quality, CBR varies quality to maintain a constant bit rate.

CBR encoding
CBR uses a buffer to help the codec smooth out variations in the complexity of the video. A larger buffer results in better potential for high quality video. Typically, a five-second buffer is adequate for streaming over a network, but buffer time can be as short as a half-second or as long as 30 seconds for other delivery methods, such as DVD. A smaller buffer is required for situations in which the wait time must be minimized when switching between streams, such as channel-switching in an IP Television (IPTV) scenario. When configuring CBR encoding, a bit rate is specified along with a buffer size (in seconds). During easy-to-encode, low-motion scenes, the buffer may remain fairly empty. However, during complex sequences when the buffer fills up, the codec must make difficult decisions about how to maintain the bit rate. Typically, the codec starts by lowering the quality of the video. However, when video complexity reaches the point where the buffer is at its upper size limit, the codec must begin to drop frames. Most codecs provide a slider that enables the user to find the best compromise between frame quality and dropped frames.


Figure 4: Shows how buffer size varies while encoding the above scenario using CBR.

Before delving into the KulaByte process, let's look at a few more encoding modes that have been developed over the years. Two-pass CBR and two-pass VBR are available with most codecs; Peak-constrained, two-pass VBR is available on only a few.

Next: Two-pass CBR, Peak-constrained, two-pass VBR

1 | 2 | 3 | 4 | 5 | 6

Rate this article: Low High
Current rating
  • .
Embedded.com Career Center
Looking for a new job?
SEARCH JOBS

Browse all jobs

SPONSOR
RECENT JOB POSTINGS





 :