• Support PF! Buy your school textbooks, materials and every day products via PF Here!

Buffering and delay in video compression

  • Thread starter Wlmy97
  • Start date
Problem Statement
When video data is compressed efficiently, there is a variable data rate generated for each video frame; the encoder will generate E(i) bytes to represent frame i, but we might be using a constant transmission rate that transfers T(i)=T bytes each video frame time. A buffer will be needed to allow these two processes to work together.

Similarly, at the decoder, E(i) bytes will be needed to reconstruct frame i and this many bytes will be read out of a buffer that is filled at a constant T bytes/frame.

In this project, you will use data about bit rates generated for sample video sequences to investigate how much buffering is required in the delivery chain for encoder and decoder, and therefore what unavoidable end-to-end delay is involved (no matter how fast the processors are that are doing the encoding and decoding).

By using “frame trace” data (that is, a record of how many bytes are generated for each frame in a compressed video sequence) and recognising that the frames are both generated at the encoder and consumed at the decoder at fixed time intervals, you can simulate the buffers necessary at either end of a transmission link using Matlab or Excel.

These buffers will allow for variable rates to be generated/consumed, even though a constant rate might be transmitted over the network connection. If the buffers are ever allowed to empty, your decoder will be fed blank data; to make sure this doesn’t happen, your simulation should allow them to partly fill before you read anything. out of them.

How will you decide on the bit rate that you simulate between encoder and decoder? How big do the buffers need to be? What delay is involved? Suitable frame trace data is available on the web (see http://www-tkn.ee.tu- berlin.de/research/trace/trace.html, or you may find an alternative source you prefer).
Relevant Equations
Transmission rate = Channel bandwidth
1) What is the relationship between buffer at encoder and buffer at decoder?

2) How much preloading is necessary to ensure no buffer empties over the length of the simulation I.e. what is the minimum no. of bytes that must be in the buffer?

3)How to estimate delay due to buffering?

4) What is the minimum buffer size that could feed a frame at every time instance?

5) How big must the buffer be? Why?

6) How do you determine the transmission rate between the encoder and decoder?



Welcome to the PF. :smile:

You need to show your best efforts to start answering the questions before we can be of tutorial help. That's in the PF rules.

Also, we would prefer that you post a PDF version of your Excel file, since opening Excel files from a random source is a security risk. You can use a free PDF writer like PrimoPDF to print your Excel pages to a PDF file.

(Fun problem, BTW) :smile:
This is the Excel file used to simulate the buffers necessary at either end of a transmission link (which I've converted to pdf)


Using the Leaky Bucket Model,
Start-up or initial buffer delay = F/R
where R is the peak transmission bit rate
is B the buffer size
is F the initial decoder buffer fullness

I know that for a constant transmission rate:
1. The leaky bucket drains its accumulated bits into the communication channel at a fixed bit rate , and the encoder must add enough bits to the leaky bucket often enough so that the leaky bucket does not underflow (i.e., become empty) in any interval of time
2. The encoder must not add too many bits to the leaky bucket too frequently, or else the leaky bucket, which has capacity B, will overflow

1. How to determine the suitable transmission rate to obtain minimum end-to-end delay caused by buffering (transmission delay is assumed to be 0), and maybe to avoid the buffers to empty? Isn't the transmission rate dependent on the bandwidth of each user in reality? I thought about using the Transmission rate = Mean bit rate of the compressed video but I'm not sure.
2. How to determine the minimum buffer size? Is the solution a graphical one or is there a formula to obtain the minimum buffer size? Cause I've looked up a lot of references and am quite confused by what I read.
3. As for the relationship between the buffer at the encoder and the decoder at the same frame time, the encoder buffer fullness is an upper bound on the fullness of the decoder buffer? Cause can in any time interval of length B/R , at most B bits can enter the decoder buffer.

Help needed urgently. Thank you.

Want to reply to this thread?

"Buffering and delay in video compression" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving