updated: January 13, 2014
- Sample Videos created with the EasyCAP DC60 and tvcap-script
- Some notes on MPlayer / MEncoder
- MPlayer based surveillance
- Surveillance installation and multiple EasyCAPs
- Zoneminder with EasyCAP
- Linux EasyCAP tutorial video from youtube
This is a random 30 second TV recording (Fishing in the Inn river - german) from my satellitereceiver made with my EasyCAP DC60 (48000Hz model), legacy easycapdriver and the tvcap-script at 1300k Bitrate:
You can observe the leaps (framedropping) in the video which are caused by the low fps rate (22,75) the easycapdriver maximally (PAL) supports.
The stk1160 driver now supports full 25 FPS (PAL)!
2. Some notes on MPlayer / MEncoder
Please read http://easycap.blogspot.co.at/p/command-line-tv.html
3. Inputs and multiple EasyCAPs
Only one input at a time!
The stk1160 driver and the legacy easycapdriver support all the inputs of the EasyCAP DC60 devices but only one at a time (due to hardware limitations).
Multiple EasyCAPs on one Computer are supported. A good condition for security uses.
4. MPlayer based surveillance (simple)
This command
mplayer tv:// -tv driver=v4l2:width=720:height=576:device=/dev/video0:input=1 -frames 1 -vo jpeg
(you'll find more options in mplayers man page)
creates one jpeg picture, but it has to be renamed by a script, else it is overwritten by the next picture taken.
If you want to use all the four Inputs of your Easycap (model 002) the only thing which is possible I think is, to take a single picture every ~five or more seconds from each input using this mplayer example and a script which switches automatically through the inputs.
But I've never tried this and I don't know if the driver is stable enough for this.
5. Zoneminder and motion with EasyCAP
Zoneminder and motion are two useful surveillance programs for Linux.
5.1. STK1160 driver
The new stk1160 driver doesn't support framescaling, therefore in Zoneminder, motion or any other capturing program the resolution must always be set to 720 x 576 (PAL) or 720 x 480 (NTSC).
On the other hand there is no limitation of the fps rate.
5.2. Legacy easycapdriver
The legacy easycapdriver only supports low resolution (320 x 240) and low fps rates when used with Zoneminder (see below) under Linux.
The
README.ZM file from the easycapdrivers source package provides a description,
how to set up Zoneminder for the EasyCAP
device with the legacy easycapdriver:
Model 002 is more convenient for that.
For more information read the whole README.ZM.
------------------------------------------------------------------------------
Configured for Low Bandwidth
Options->Config V4L_MULTI_BUFFER UNTICKED
CAPTURES_PER_FRAME 8
Source /dev/video0(1) ->General Name Monitor-1
Source Type Local
Function Monitor
Enabled TICKED
Linked Monitors Monitor-2
Maximum FPS 30.00
Alarm Maximum FPS BLANK
->Source Device Path /dev/video0
Capture Method Video For Linux version 2
Device Channel 1
Device Format NTSC
Capture Palette YUYV
Capture Width 320
Capture Height 240
Source /dev/video0(4) ->General Name Monitor-2
Source Type Local
Function Monitor
Enabled TICKED
Linked Monitors Monitor-1
Maximum FPS 30.00
Alarm Maximum FPS BLANK
->Source Device Path /dev/video0
Capture Method Video For Linux version 2
Device Channel 4
Device Format NTSC
Capture Palette YUYV
Capture Width 320
Capture Height 240
------------------------------------------------------------------------------
Note: If you have a PAL camera you must change Device Format to PAL and Maximum FPS to
25.00
How to set up a new Monitor in Zoneminder is described in Zoneminders Wiki:
After all, the resolution (320 x 240) and framerate (~ 1 fps) is low when the EasyCAP is used with Zoneminder.
6. Surveillance installation
Aiden, a reader of my blog, sent to me this description of his surveillance installation and how he got two cams/ EasyCAPs to work on one Computer/ Motherboard with enough bandwidth and current for data transfer.
Althoug he doesn't use Linux for this, it is a clue even for EasyCAP users who want to set up security cams with Zoneminder or motion.
A detailed description of his installation can be found here:
https://sites.google.com/site/viewandrecordwithlinux/diy-surveillance
6. Surveillance installation
Aiden, a reader of my blog, sent to me this description of his surveillance installation and how he got two cams/ EasyCAPs to work on one Computer/ Motherboard with enough bandwidth and current for data transfer.
Althoug he doesn't use Linux for this, it is a clue even for EasyCAP users who want to set up security cams with Zoneminder or motion.
A detailed description of his installation can be found here:
https://sites.google.com/site/viewandrecordwithlinux/diy-surveillance
For a few years I've been using 2 HD webcams plugged into themotherboard and an EasyCap plugged into a USB PCI board (MassCool MTU25).
I just added a 2nd MassCool MTU25 and find I can use a 2ndEasyCap or duplicate of one of the HD webcams simultaneouslyMy preferred webcam is Logitech QuickCam Pro for Notebooks (nowsold as Portable Webcam C905 (960-000045) forNotebooks)(1600x1200 resolution). Added my 2nd choice, HerculesDualPix HD720 for Notebooks (1280x800 resolution), when Icouldn't use 2 QuickCam's at once; "Impossible" Logitech said.Securitycamera2000.com CS Mount F1_2 IR-Cut Dual Filter SwitchLenses. Cameras are panned in pairs (HD webcam for day and EXview sensoranalog cam for night) with a small 0.03 oz lead-screw steppermotor from mpja.com.and USB hubs (Cables Unlimited USB-1810) with independent powersupplies which can be higher than the computer's USB V+; About5.5V for the Hercules necessitating a peltier cooler under thehub's chip. The USB-1810 board has components on one side only,convenient for a cooler.Sending along images for your curiosity.
I use Yawcam to record brief sequences of images at max resolution rather than video.
Read the detailed description on this site: https://sites.google.com/site/viewandrecordwithlinux/diy-surveillance
Aiden mentioned the site: http://www.securitycamera2000.com where multiple channel DVR cards, and even Linux supported cards and accessories are sold.
Possibly these cards would be a better solution for large Linux based security installation.
Possibly these cards would be a better solution for large Linux based security installation.
Thanks for this blog!
ReplyDeleteIs it possible to view/capture several inputs of the same easycap device at the same time using STK1160 driver ?
I've tried running two instances of vlc:
vlc v4l2:///dev/video0:input=0
and another one:
vlc v4l2:///dev/video0:input=1
but I get a "Device or resource busy" error on the second call.
So, I'm not sure where's the restriction (hardware, driver ?) to work on several inputs at the same time...
thanks for any advise.
Hi,
Deleteno it is not possible to capture from several inputs of one stk1160 device at the same time due to hardware limitations. (I don't know the details, but the stk1160 chip is designed for capturing from only one input. I've already updated the information on this page - number 3 and 4 )
It is only possible to switch from one input to the other.
http://linuxtv.org/wiki/index.php/Stk1160#Usage
So, the only thing which is possible I think is, to take a single picture every ~five or more seconds from each input using the mplayer example under number 2 (above) and a script which switches automatically through the inputs.
But I've never tried this and I don't know if the driver is stable enough for this.
If you want to create a real surveillance installation, you need one Easycap (capture device) for every camera (or a special device which supports more cams).
Linux normally can cope with three or more v4l2 capture devices.
Reagards
Andrew