Skip to content

Commit

Permalink
Circular IO stream length keeps coming up
Browse files Browse the repository at this point in the history
Time to add a FAQ
  • Loading branch information
waveform80 committed May 6, 2016
1 parent 53ececf commit 4d2c3a0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ sdist
develop-eggs
.installed.cfg

# Doc builds
docs/_build/

# Installer logs
pip-log.txt

Expand Down
18 changes: 17 additions & 1 deletion docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ require it:
B-frames aren't produced by the Pi's camera (or, as I understand it, by most
real-time recording cameras) as it would require buffering yet-to-be-recorded
frames before encoding the current one. However, most recorded media (DVDs,
BDs, and hence network video streams) do use them, so players must support
Blu-rays, and hence network video streams) do use them, so players must support
them. It is simplest to write such a player by assuming that any source may
contain B-frames, and buffering at least 2 frames worth of data at all times to
make decoding them simpler.
Expand All @@ -213,3 +213,19 @@ TL;DR: the reason you've got lots of latency when streaming video is nothing to
do with the Pi. You need to persuade your video player to reduce or forgo its
buffering.

Why are there more than 20 seconds of video in the circular buffer?
===================================================================

Read the note at the bottom of the :ref:`circular_record1` recipe. When you set
the number of seconds for the circular stream you are setting a *lower bound*
for a given bitrate (which defaults to 17Mbps - the same as the video recording
default). If the recorded scene has low motion or complexity the stream can
store considerably more than the number of seconds specified.

If you need to copy a specific number of seconds from the stream, see the
*seconds* parameter of the :meth:`~PiCameraCircularIO.copy_to` method (which
was introduced in release 1.11).

Finally, if you specify a different bitrate limit for the stream and the
recording, the seconds limit will be inaccurate.

0 comments on commit 4d2c3a0

Please sign in to comment.