Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th August 2014, 11:52   #1  |  Link
leoenc
Registered User
 
Join Date: Mar 2007
Posts: 181
Explanatory animation about CBR and VBV

Hi all,

This topic applies also to other MPEG codecs, but I believe since H.264 is the most common codec today, it should belong here.

Since I believe it is very important to understand how buffer works when doing encoding for streaming, and since I couldn't find a clear visual explanation for this, I decided to try and make one myself.
Here's my first quick animation draft to try and explain it using the leaky bucket analogy:


Your feedback please!
Do you think it's doing a good job explaining this or does it totally suck?
Did I get anything wrong?

Leo
leoenc is offline   Reply With Quote
Old 21st August 2014, 13:53   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Nice anymation, though I'd probably do the analogy the other way around

If the bucket represents the buffer, it would be filled at a constant rate (VBV Maxrate, e.g. the network bandwidth) and, depending on the individual frame, different amounts of "water" need to be taken out of the bucket for each frame. VBV ensures we will always have enough "water" left in the bucket to satisfy the next frame. If that's not the case, i.e. we run dry, we have a buffer underflow.

(With your current analogy, the filling level of the bucket is the inverse of the decoder's video buffer's filling level)
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 21st August 2014 at 14:09.
LoRd_MuldeR is offline   Reply With Quote
Old 21st August 2014, 14:16   #3  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,046
I guess it depends if you see it on the side of an encoder (ie. constant rate flowing out) or on the decoders side (constant rate flowing in).
It makes more sense to me this way around, because only the encoder actually has any control about the flow into the bucket.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 21st August 2014, 14:48   #4  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,196
Quote:
Originally Posted by nevcairiel View Post
I guess it depends if you see it on the side of an encoder (ie. constant rate flowing out) or on the decoders side (constant rate flowing in).
You a right. I was thinking more about what is happening at playback time, so looking at it from the decoder side. Both perspectives are equally valid. But I think the animation should at least make clear from which side we are looking at it.

(Or maybe, for a more complete picture of the whole streaming process, the "outlet" of his current bucket could lead to a pipe, leading to another bucket of same size, representing the decoder buffer)
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 21st August 2014 at 14:51.
LoRd_MuldeR is offline   Reply With Quote
Old 21st August 2014, 15:21   #5  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,487
Just curious, What did you use for the fluid simulation ?
poisondeathray is offline   Reply With Quote
Old 21st August 2014, 16:19   #6  |  Link
leoenc
Registered User
 
Join Date: Mar 2007
Posts: 181
@LoRd_MuldeR, @nevcairiel - Thanks for your feedback! Didn't think about showing the decoder as well. You're right - I will make it more clear that it's about the encoding.

@poisondeathray - I own a copy of Softimage (using ICE). It's just a really quick simulation though, without fine-tuning the fluid properties, which obviously doesn't look real.
leoenc is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.