473,372 Members | 830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Processing Video with PHP

Is there a Linux PHP module so that I can process web cam video with
Linux PHP from multiple USB ports? (I'm working on a video surveillance
idea since I found out that my office spent a whopping $30K on their 8
camera system and were told it would cost $13K for 3 more cameras to be
added. If that inspires you to do your own system, please do so -- I
love it when people can make big cash with Linux!)

For discussions here, realize that I'm talking about wired, not
wireless, video cams. Many big corps don't allow wireless video traffic
because it can be jammed with sophisticated tools. I'm also interested
in only non-motion activated video because that's what the security
guard needs to see. (That is, unless I use motion activated video
stream for what gets written to disk, but non-motion activated video
stream goes straight to the security guard. I could combine the two
cameras under a single camera bubble in the ceiling.)

Here's some questions about this if you happen to have ideas.

1) How do I not only record the video to hard drive, but serve it up to
a monitor that the security guard can watch?

2) How do I provide real time video to the security guard, yet for what
gets written to disk, record only time slices with lossy compression so
that it uses less disk space?

3) So, if you answer the separation question in #2, how do I use PHP to
convert video input on USB into time-sliced, lossy compression
recordings to disk?

4) Is it possible to have a single Linux PC process the video from
multiple USB ports, simultaneously?

5) Any ideas on the cheapest way to run USB over very long distances in
an office? I hear I can use ordinary, powered hubs to repeat the
signal, but this requires that I get an electrician to wire me an AC
plug in the drop ceiling somewhere. Has anyone used ordinary CAT 5 to
carry the signal longer?

6) Using this API, how much can I realistically write to disk in a
usual office setting? I'm trying to figure out how much disk space I'll
need. The idea would be that the Linux PC would store the video data on
disk up to about x number of months, making nightly backups to a
DVD-RAM drive that ejects automatically every week. The IT Operations
Manager would then replace the DVD-RAM disc on Friday and store the
other offsite for long-term retention.

Jul 17 '05 #1
4 3767
Google Mike wrote:
Here's some questions about this if you happen to have ideas.

1) How do I not only record the video to hard drive, but serve it up to
a monitor that the security guard can watch?
I guess you could use standard linux webcam tools and run them using
http://php.net/fopen to catch errors/output. Other then that I shouldn't
use php.
2) How do I provide real time video to the security guard, yet for what
gets written to disk, record only time slices with lossy compression so
that it uses less disk space?
Again I would use webcam tools.
3) So, if you answer the separation question in #2, how do I use PHP to
convert video input on USB into time-sliced, lossy compression
recordings to disk?
.... 4) Is it possible to have a single Linux PC process the video from
multiple USB ports, simultaneously?
.... 5) Any ideas on the cheapest way to run USB over very long distances in
an office? I hear I can use ordinary, powered hubs to repeat the
signal, but this requires that I get an electrician to wire me an AC
plug in the drop ceiling somewhere. Has anyone used ordinary CAT 5 to
carry the signal longer?
Try : http://www.google.com/search?q=usb+over+utp 6) Using this API, how much can I realistically write to disk in a
usual office setting? I'm trying to figure out how much disk space I'll
need. The idea would be that the Linux PC would store the video data on
disk up to about x number of months, making nightly backups to a
DVD-RAM drive that ejects automatically every week. The IT Operations
Manager would then replace the DVD-RAM disc on Friday and store the
other offsite for long-term retention.

--
visit my site : http://solid.bounceme.net
Jul 17 '05 #2
Google Mike <go********@hotpop.com> wrote:
Is there a Linux PHP module so that I can process web cam video with
Linux PHP from multiple USB ports? (I'm working on a video surveillance
idea since I found out that my office spent a whopping $30K on their 8
camera system and were told it would cost $13K for 3 more cameras to be
added. If that inspires you to do your own system, please do so -- I
love it when people can make big cash with Linux!)
Hmmm, for 30k I could make that (depending on the actual specs :)
1) How do I not only record the video to hard drive, but serve it up to
a monitor that the security guard can watch?
There was a related question sometime (about 1month) ago, search the
archives for streaming.

You need a multiplexer, one of the connections to the multiplexer simply
writes the stream to disc.
2) How do I provide real time video to the security guard, yet for what
gets written to disk, record only time slices with lossy compression so
that it uses less disk space?
The disc writer should do that (it could simply drop frames).
3) So, if you answer the separation question in #2, how do I use PHP to
convert video input on USB into time-sliced, lossy compression
recordings to disk?
By calling external programs, PHP isn't necessary in the picture.
4) Is it possible to have a single Linux PC process the video from
multiple USB ports, simultaneously?


Yes, but I can't imagine anything worse than USB for this job (okay
parallel port)... Spend some money on decend UTP cams (maybe with motion
detection) and hardware (mpeg) compression.

The only job PHP has in this whole setup is streaming and selecting the
stream to the watchers.

Jul 17 '05 #3
Google Mike wrote:
Is there a Linux PHP module so that I can process web cam video with


No. Leave PHP out of the equation. It'll make your life simpler.

Regards the remainder of your questions - stop being so cheap. The USB
webcams that sit on top of your monitor have a very short focus. You're
also going to have problems with long USB cables. I can recommend Axis web
cameras which have 'proper' lenses, an embedded (Linux) controller and an
ethernet connector. They also come with the software to support multiple
simultaeneous connections at different resolutions and good support. And
they're not all *that* expensive (basic one is around $500).

HTH

C.

Jul 17 '05 #4
All of you have had some good advice about PHP and video. I guess I'll
shell out of PHP and use other opensource command line tools written in
C/C++ to do my bidding, then use PHP and web-browser plugins to harness
this and display it back.

Many of you have said that USB video is not the option, even with
inexpensive cable extenders that can give you distances of 140 feet
using CAT5 or CAT6:

http://cpc.farnell.com/jsp/endecaSea...=CS11725&N=401

....because USB video has been mostly for shorter focus, closer range
stuff. (If you don't click the link -- just note that someone has
inexpensively figured out how to eliminate the short distance problem
of USB cables with a couple non-powered jacks that don't cost much.)

The problems I have with cameras that create MPEG4 data and send it
over ordinary CAT5 Ethernet are that there are fewer drivers for Linux
and the cameras cost way more than USB cams.

So I'm going to see if I can stick with USB cams so that I get better
drivers and a lower cost. The only thing I need to figure out is how to
get good quality for the right video range and at the right dollar --
hopefully $250 or less per camera.

Another advantage with the USB cams is that I can bring them all
together on a single PC with multiple USB ports. With the non-USB
solution, you have to purchase expensive cards or an expensive
multiplexer.

So, here's what I'd like to see eventually:

* I prove that the USB video works to at least 100 feet using the
non-powered USB cable extender jacks and CAT6.

* I find a USB camera under $250 that gets a decent focal range.

* I prove that I can bring it all back and read it using command line
Linux tools into files and display it back again through a web page.

* I wrap this with PHP and open source the project so that many people
can cheaply build this at home and make a TON of money. That way, I get
to benefit by open source suggestions, tweaks, and free developers who
want to enhance my work, and I'm not at risk of competition because I'm
in a part of the USA where no one really knows Linux but people are
willing to spend $10 to $15K on video surveillance.

* I turn around and make money selling this as a packaged solution to
other startups, as well as resell the hardware, just like what the
original guys on the Asterisk project are doing.

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Newbie | last post by:
I am doing some robotics projects but my main area of interest is trying out several algorithms for the processing of the stream of data coming from the video. I am wondering what type of camera...
2
by: Ant | last post by:
Hi all, I have a specific task I want to automate - rotating a video file through 90 degrees. I've used the PIL library quite a bit to perform batch processing on images, and would like to do...
12
by: Pallas | last post by:
Hi all, I've produced some high-def videos and I want people to be able to watch them on my website, but I may want to prevent downloads and I certainly want to prevent them from editing them....
2
by: hzgt9b | last post by:
Using VS2003, VB.NET, BACKGROUND I have a window forms based application that will be distributed and executed directly from CD media. The app contains a TreeView control and a WebBroswer...
15
by: Man-wai Chang | last post by:
<form name="frmTest" type="submit" method="post"> <input type="textbox" name="txtA" size=10 value=""> <select name="cboB" value=""> <option value="1">1 <option value="2">1 </select> <input...
2
by: yinglcs | last post by:
Hi, I am trying to use python for file processing. Suppose I have a file like this: I want to build a Hashmap between the line "begin_QOS_statistics" and "end_QOS_statistics" and for each line...
2
by: Ronald Raygun | last post by:
I have a form that I am using as a wizard. The wizard comprises of several forms contained in divs, which are hidden/made visible, depending on the wizard step. Each form has an action parameter...
2
by: Ronald Raygun | last post by:
I have a form, which contains a textfield for a user to enter their username. I want to provide a button that allows the user to check to see whether that username has already been taken up by...
1
by: kathsunil | last post by:
Hi, I am new to Directx and c#. I am trying to write a video using Directx where I can track moving objects. Using au audiovideo playback I can play the video and I am stuck there. Anyone who can...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.