471,066 Members | 974 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Recording Video with Python

Is there a video module so that I can write a Linux Python script to
record video coming over USB video cams?

What about these side-thoughts:

* What about recording multiple streams over multiple USB ports? (Think
in the context of a security system.)

* What about lossy compression?

* What about recording only time slices?

* How would you provide real-time video to a security guard, but then
only write time-sliced, lossy compression to disk, saving disk space
yet providing something very suitable for a security guard to watch
live?

Jul 18 '05 #1
2 2737
go********@hotpop.com wrote:
Is there a video module so that I can write a Linux Python script to
record video coming over USB video cams?
You can open the device and read the images - I've done that before. No
module needed. But I don't remember how things worked - just download the
source for a simple viewer like gcqam and look at what they are doing.

What about these side-thoughts:

* What about recording multiple streams over multiple USB ports? (Think
in the context of a security system.)
No deal, open several devices. * What about lossy compression?
Won't be doable in python in reasonable time - but there might be modules
available for that, or at least libs you can wrap. Make your name honor...
* What about recording only time slices?
Just wait the appropriate interval
* How would you provide real-time video to a security guard, but then
only write time-sliced, lossy compression to disk, saving disk space
yet providing something very suitable for a security guard to watch
live?


Hrm - just _do_ it? But the problems are not on the python side - how is
your guard going to retrieve the images, which bandwidth can he use and so
on.

Basically it boils down to

- do the infrastructure and application functionality in python
- delegate the compression to some c-backend

Network and IO performance _shouldn't_ be too much of a concern using
python, as it uses the underlying system's calls for that. But in the end,
use a profiler :)
--
Regards,

Diez B. Roggisch
Jul 18 '05 #2
go********@hotpop.com wrote:
Is there a video module so that I can write a Linux Python script to
record video coming over USB video cams?


http://videocapture.sourceforge.net/

HTH

T
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Olivia Robinson | last post: by
reply views Thread by Stefan Tietke | last post: by
3 posts views Thread by Jussi Rasku | last post: by
7 posts views Thread by Seymour | last post: by
7 posts views Thread by Paolo Pantaleo | last post: by
1 post views Thread by hott5hotj | last post: by
1 post views Thread by hi2Kamal | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.