def DelayCalculation(frame_info_list, framerate, bitrate, buffer_size,
                     print_trace=False):
  for frame in frame_info_list:
    frame['transmit_time'] = float(frame['size']) / bitrate
  playback_clock = buffer_size
  buffer_clock = 0
  delay = 0
  frame_count = 0
  for frame in frame_info_list:
    buffer_clock += frame['transmit_time'] # time this frame arrives
    playback_clock += 1.0/framerate # time this frame should be played back
    if buffer_clock > playback_clock:
      delay += (buffer_clock - playback_clock)
      if print_trace:
        print 'Frame %d %f behind' % (frame_count,
                                      buffer_clock - playback_clock)
      # In this model, we assume that playback pauses until frame is available.
      # No further delay penalty is imposed on the next frame.
      playback_clock = buffer_clock
    frame_count += 1
  return delay / (float(frame_count) / framerate)
Render the post content on save.
dataset/ETHPy150Open google/compare-codecs/lib/score_tools.py/DelayCalculation--crossover with--dataset/ETHPy150Open jamiecurle/django-omblog/omblog/listeners.py/post_render_content