linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Borowczyk <tomboro88@gmail.com>
To: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: linux-media@vger.kernel.org
Subject: Re: cx231xx with 3 grabbers
Date: Sat, 18 May 2019 12:20:32 +0200	[thread overview]
Message-ID: <CAM+RvBSE=pNvSOxNjzK8pPiTC7VFVFN5oavGqsn13kvEa8dc8w@mail.gmail.com> (raw)
In-Reply-To: <20190514090528.78965584@coco.lan>

Hello Mauro.
Thank you for your quick reply. On Raspberry model B (1 core 700MHz) I
can only watch 2 cameras with the resolution of 320x240 pixels. When I
try to watch a single camera with full resolution, Raspberry hangs.
That's why I tried to run Raspbian on my laptop - just to check, if a
stronger machine (Raspberry pi 3 for example) would be able to play
it. On laptop I can watch a single camera at full resolution. I didn't
try if I can watch more of them at once at full reslution, but you are
right, at full resolution a single camera would consume almost all usb
2.0 bandwidth, and I didn't think about it beforehand. Just happy with
result, I installed zoneminder on the laptop machine. Zoneminder
allowed me to watch all three cameras, but only at 320x240 px. And on
one of them the picture was defective, as I wrote on my earlier
e-mail. Then I started more tests and it turned out, that when I have
connected 3 grabbers, I can't see the correct picture always from this
single grabber, even if I watch only this one at 320x240px. 320x240px
needs less than one fourth bandwidth of the full resolution picture
bandwidth, so I think, it should work if I play a single camera at
once. But it looks like I'm wrong.

Nevertheless, it looks like that if I want to grab video from all of
them at full resolution, I would need a single Raspberry Pi 3 per
camera, but I must test it.

Thanks,
Tomasz

wt., 14 maj 2019 o 14:05 Mauro Carvalho Chehab
<mchehab+samsung@kernel.org> napisał(a):
>
> The problem is related to the maximum bandwidth that an USB 2.0
> provides. Most audio and video devices like cameras use an type of
> USB package, called ISOC, with allows reserving bandwidth for them.
> It actually reserves a number of USB slots. The maximum is 980 slots
> per second, if I'm not mistaken.
>
> The actual number of allocated slots depends on the resolution,
> format, package size, number of frames per second, etc.
>
> I don't have the numbers for cx231xx, but, with em28xx, a 640x480,
> 16 bits per pixel, 30 frames per second video uses about 60% of
> the available USB 2.0 bandwidth. So, even two cameras at full
> res can be too much.
>
> I guess you can consider your self lucky to be able of having
> two cameras working :-)
>
> If you need more than that, you'll need to use a machine with
> multiple USB buses and connect each camera on a different
> bus.
>
> Thanks,
> Mauro

  reply	other threads:[~2019-05-18 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13 22:18 cx231xx with 3 grabbers Tomasz Borowczyk
2019-05-14 12:05 ` Mauro Carvalho Chehab
2019-05-18 10:20   ` Tomasz Borowczyk [this message]
     [not found]   ` <CAM+RvBRhG_Am=eGKog8a-rDAULrkNjKpbH+C+bqOk=wx5gXLJQ@mail.gmail.com>
2019-05-18 11:04     ` Mauro Carvalho Chehab
2019-05-19  9:43       ` Tomasz Borowczyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM+RvBSE=pNvSOxNjzK8pPiTC7VFVFN5oavGqsn13kvEa8dc8w@mail.gmail.com' \
    --to=tomboro88@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).