Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all.

I'm working on a reservation system that runs on a device that is installed in a bus. A new requirement is to save video files on this device that is split into 1 hour files. At the end of the journey this files will be synched back via WIFI at the depot. Currently we are looking at a minimum of 2 camera feeds and the cameras are normal web cams (Microsoft lifecam 3000).The Bus device is running Windows embedded 8, has a 1.8 Ghz Atom D525, 2 Gigs of ram and 120 GB SSD. I have looked into using EMGU CV and Directshow with various levels of success. Some of the problems and questions I have:

1)The best codec to record with. I have tried several codecs, most notable "x264vfw - H.264/MPEG-4 AVC codec" and "Xvid MPEG-4 Codec" which gave me a small file,but it takes a lot of proccessing power.(98% cpu utilisation). What codec is the best to use, giving a good balance between file size/quality and cpu utilisation?

2)Video length and synhronization of videos between cameras. The video file time is critical. 1 hour recording should produce a 1 hour video file and the length of the video files between cameras should be the same. (I'm struggling to get this right with Emgu's Video Writer) and with Direct show when the CPU utilisation is flatlined at a 100%

3)Is this actually possible with Webcams or do we need to go with IP cameras?


Sorry, i forgot to mention. The required framerate can be 15 fps and the resolution will be around 640x480

Any assistance will be greatly appreciated.
Thanks
Posted
Updated 11-Nov-13 19:57pm
v3
Comments
E.F. Nijboer 11-Nov-13 11:13am    
Now I'm no expert on this, but when I read your question I was thinking about combining the two (or more) video streams into one. You get something you often see for security camera's where four camera's are shown on a single display. That way you would be certain they are kept nicely synchronized.
SoMad 12-Nov-13 3:23am    
I just saw your update regarding resolution and frame rate (I am guessing 15 FPS per camera). Those are not scary numbers these days, but it might be just out of reach for an Atom D525.

Soren Madsen

You don't mention the parameters you need to record at, specifically image resolution and frame rate. The higher you go on those settings, the more you will be taxing that poor Atom processor if you insist on doing the compression on the PC.
I have worked on a product for many years where video compression is done on the PC and every time the CPU specs for the systems improve, I have felt a great relief as we achieve better performance.

I am actually not going to answer your first two questions because I believe you need a CPU with better performance to achieve your goal and I suspect the Atom processor is dictated by low-power requirements or other reasons you cannot control.

Frankly, if you will be limited to an Atom processor, you are better off using a camera with on-board compression. You mention IP cameras and that is definitely an option, but it will make the whole setup more complex.
My advice is to try out a web camera with on-board H.264 compression. Personally, I have used the Logitech C920 - it was the cheapest one I could find with H.264 compression. It does cost more than your Microsoft LifeCam 3000, but the image looks great and I was able to find it at a good price.
I am sure by now there are other web cams out there with similar capabilities, so start Googling for something like that. However, there are web cams that are advertised as having H.264 compression, but on closer inspection that turns out to be done by software that will be installed on the PC, so read the specs carefully!

Soren Madsen
 
Share this answer
 
v2
Comments
Gertlaub2 12-Nov-13 2:04am    
Hi Soren Madsen, I'm also thinking that the Atom processor is maybe not strong enough. Is it possible to control the quality of the video output on these Webcams with build-in compresson? (Like the Logitech C920)
SoMad 12-Nov-13 2:39am    
It is possible, but since everything goes through DirectShow, it is not something I consider simple. I got this link from the Logitech support forum - I don't really know why they link to their own page through the "Wayback Machine", but I assume it is lost for some reason (or the forum is not actually an official Logitech forum, weird): http://web.archive.org/web/20111026041525/http://www.quickcamteam.net/documentation/faq/can-i-use-logitech-webcams-for-my-own-application[^].

And as you can see from this link, it is really up to you to dig through the interface and figure out how to set the camera up: http://forums.logitech.com/t5/Webcams/Taking-full-advantage-of-the-H-264-Logitech-C920-using/td-p/1052709[^].
I am pretty sure the user posting that question had a problem because most of the AMCap implementations you will find (it looks like each web cam manufacturer distributes their own build of AMCap) fail to enumerate all of the pins.
If you run into this problem, I can dig up the code I have (somewhere) that correctly identifies all output pins just as the user posting this question on SO used (the answer at the bottom mentions the way to change the Bit Rate): http://stackoverflow.com/questions/11695508/how-to-control-bitrate-mediasubtype-h264-directshow[^]

I have not tried using EMGU CV, but it might be easier to do all this using a library like that.

Soren Madsen

[^]


[^]


[^]



refer these articles
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900