beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Webcam

Sat Sep 16, 2017 11:03 pm

Just wonder why I need a special PI webcam to get videos/pix. Why will a normal webcam not work, I use a webcam for Skype, so it should work?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Webcam

Sun Sep 17, 2017 12:28 am

you have a old USB cam?
connect and run
lsusb
find it?
now can use for test:
sudo apt-get install qv4l2
Image
i did not need to select or adjust anything, it just worked.

now to use it as ( motion detect ) security ( IP ) webcam:
sudo apt-get install motion
sudo nano /etc/motion/motion.conf
like: (deamon on) ( video codec mp4 ) (target_dir /run/shm) ( stream_localhost off )
LAN PC browser:
RPI_IP:8081

gordon77
Posts: 4303
Joined: Sun Aug 05, 2012 3:12 pm

Re: Webcam

Sun Sep 17, 2017 7:34 am

beatsal wrote:
Sat Sep 16, 2017 11:03 pm
Just wonder why I need a special PI webcam to get videos/pix. Why will a normal webcam not work, I use a webcam for Skype, so it should work?
Some webcam cameras work, some don't. What model do you have?

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Sun Sep 17, 2017 1:50 pm

Thanks. Tried :
lsusb " Bus 001 Device 007: ID 1e4e:0100 Cubeternet WebCam"
then tried:
sudo apt-get install qv4l2 " seemed to do something , got:
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-common all 5.5.55-0+deb8u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main libmysqlclient18 armhf 5.5.55-0+deb8u1
404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main motion armhf 3.2.12+git20140228-4+b2 [230 kB]
Fetched 230 kB in 1s (175 kB/s)
E: Failed to fetch http://mirrordirector.raspbian.org/rasp ... u1_all.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]

E: Failed to fetch http://mirrordirector.raspbian.org/rasp ... _armhf.deb 404 Not Found [IP: 2a00:1098:0:80:1000:75:0:3 80]


Kindly help!

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Webcam

Sun Sep 17, 2017 2:47 pm

sorry i used 2 times new STRETCH, but for you i just did it again on JESSIE

Code: Select all

[email protected]:~ $ sudo apt-get install -y qv4l2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libqt4-opengl
The following NEW packages will be installed:
  libqt4-opengl qv4l2
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 434 kB of archives.
After this operation, 1,422 kB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libqt4-opengl armhf 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1+rpi1 [290 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main qv4l2 armhf 1.6.0-2 [145 kB]
Fetched 434 kB in 2s (156 kB/s)
Selecting previously unselected package libqt4-opengl:armhf.
(Reading database ... 117257 files and directories currently installed.)
Preparing to unpack .../libqt4-opengl_4%3a4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1+rpi1_armhf.deb ...
Unpacking libqt4-opengl:armhf (4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1+rpi1) ...
Selecting previously unselected package qv4l2.
Preparing to unpack .../qv4l2_1.6.0-2_armhf.deb ...
Unpacking qv4l2 (1.6.0-2) ...
Processing triggers for gnome-menus (3.13.3-6) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Setting up libqt4-opengl:armhf (4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1+rpi1) ...
Setting up qv4l2 (1.6.0-2) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
[email protected]:~ $ 
did you ever do a
sudo apt-get update
sudo apt-get upgrade

on your system?
and how you get that back from that install? mysql-common libmysqlclient18 motion
this can only be from:

Code: Select all

[email protected]:~ $ sudo apt-get install -y motion
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libmysqlclient18 mysql-common
Suggested packages:
  mysql-client postgresql-client
Recommended packages:
  ffmpeg
The following NEW packages will be installed:
  libmysqlclient18 motion mysql-common
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 942 kB of archives.
After this operation, 4,129 kB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-common all 5.5.57-0+deb8u1 [84.2 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmysqlclient18 armhf 5.5.57-0+deb8u1 [628 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main motion armhf 3.2.12+git20140228-4+b2 [230 kB]
Fetched 942 kB in 4s (216 kB/s) 
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 117275 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.5.57-0+deb8u1_all.deb ...
Unpacking mysql-common (5.5.57-0+deb8u1) ...
Selecting previously unselected package libmysqlclient18:armhf.
Preparing to unpack .../libmysqlclient18_5.5.57-0+deb8u1_armhf.deb ...
Unpacking libmysqlclient18:armhf (5.5.57-0+deb8u1) ...
Selecting previously unselected package motion.
Preparing to unpack .../motion_3.2.12+git20140228-4+b2_armhf.deb ...
Unpacking motion (3.2.12+git20140228-4+b2) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Processing triggers for systemd (215-17+deb8u7) ...
Setting up mysql-common (5.5.57-0+deb8u1) ...
Setting up libmysqlclient18:armhf (5.5.57-0+deb8u1) ...
Setting up motion (3.2.12+git20140228-4+b2) ...
Adding group `motion' (GID 120) ...
Done.
Warning: The home dir /var/lib/motion you specified already exists.
Adding system user `motion' (UID 112) ...
Adding new user `motion' (UID 112) with group `motion' ...
The home directory `/var/lib/motion' already exists.  Not copying from `/etc/skel'.
adduser: Warning: The home directory `/var/lib/motion' does not belong to the user you are currently creating.
Adding user `motion' to group `video' ...
Adding user motion to group video
Done.
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Processing triggers for systemd (215-17+deb8u7) ...
[email protected]:~ $ 
a short search here at forum shows that your usb cam Cubeternet WebCam should work,
but one poster had not found how to record audio from it.

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Sun Sep 17, 2017 4:07 pm

Thanks. Tried:
Removing libtcl8.5:armhf (8.5.17-1) ...
Removing ruby1.9.1 (1.9.3.484-2) ...
Removing libruby1.9.1 (1.9.3.484-2) ...
Processing triggers for gnome-menus (3.13.3-6) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Processing triggers for ruby (1:2.1.5+deb8u2) ...
[email protected]:~ $ select all
> ^C
[email protected]:~ $

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Sun Sep 17, 2017 6:37 pm

still not getting pic from webcam like you showed in your post.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Webcam

Mon Sep 18, 2017 12:15 am

your list is incomplete, can not see anything
- - it's the second time you post parts of a install
- - not showing what you install / ( what the command was )
- - and again not put it in Code tags
+ + + i show you exactly how it ( the install ) should look on terminal, so compare it and only post it if different from mine.

after update upgrade,
did you again install qv4l2?
was it successful?
can you start that program? [from menu/ video ] and did you see the qv4l2 window?
if it finds the usb cam, did you select the [capture] to start the viewing video window?

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Tue Sep 19, 2017 2:14 am

Confused, not sure i.e. cannot understand your post. Nice if you can list the commands that I should enter to get a pic. Am a beginner, so completely stuck. Thanks

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Webcam

Tue Sep 19, 2017 3:41 am

sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y qv4l2
[menu][sound +video][qt v4l2 test utility][/capture/start capturing/]
Image

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Wed Sep 20, 2017 10:32 pm

Thanks KLL; works great!

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Sat Sep 30, 2017 11:32 pm

My webcam works fine with my PI from remote but now am thinking of replacing it with a webcam that can pan/tilt/zoom from remote, any suggestions?

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Sun Oct 01, 2017 3:02 pm

KLL, Please respond!

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Webcam

Sun Oct 01, 2017 3:27 pm

sorry, i never play with that,
sure there are PTZ cams for USB, but mostly IP cams ( so you would not need a RPI at all ) used as security CCTVs.

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Sun Oct 01, 2017 10:42 pm

Thanks KLL.
My webcam works fine from remote thanks to you. I monitor my home since I am away for a week at a time. Only problems is that at night the whole place is dark so camera does not help. I need to turn on a 120 V light remotely from my PI so the camera can see. Not sure how i.e. what HW and SW?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Webcam

Mon Oct 02, 2017 12:27 am

for a security CCTV at night should use one with IR led light,
a HD storage recorder would help the police,
anyhow a timed lamp ( after power fail the on off timer units without electronic clock and backup battery work wrong, better have just a Photoresistor unit)
and a outdoor CCTV ( with a visible led ) already keeps unwellcome visitors away.

look for options:
+ + IP cam || RPI + USB cam || RPI + NOIR CAM
+ + WIFI || ethernet cable signal
+ + PTZ
+ + night vision + IR led
+ + (semi) outdoor ( under shadow and direct rain protected )
- - cheap outdoor housing not have the glas for IR application
+ + recorder ( min 1TB HD )
+ + mobile app / remote connection

hmm, if you think twice, does PTZ and recording ( if PTZ not operated ) together give some useful results?

lerner
Posts: 508
Joined: Sun Mar 29, 2015 12:12 am

Re: Webcam

Mon Oct 02, 2017 10:10 pm

My turn to ask.....

I have a HQ USB camea and thought I would try this.

I don't have the "camera control" tab as shown on yours KLL.

(See attached)

And just while I am at it: Is this a thing I could use for real time video watching of the camera - rather than setting up motion?

Not that I am being super paranoid, but more just out of interest.

Thanks.
Attachments
qv4l2 GUI 2.png
qv4l2 GUI 2.png (144.21 KiB) Viewed 4965 times

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Webcam

Tue Oct 03, 2017 1:12 am

lerner wrote: -a- I don't have the "camera control" tab
-b- Is this a thing I could use for real time video watching of the camera
@lerner
-a-
well, i see that tab, with a old 12US$ usb cam ( OKER 88 )
it has only one option: Exposure, Auto [ Aperture Priority Mode || Manual ]
whatever that means.
-b-
and yes, QV4L2 can be used to see the cam live video
on desktop / VNC desktop ( see above 2 VNC screen shots )
or what you think it is for? why you install it?

did you try [capture][start capturing] == [ green > ]
and does it work? you see the video window or not?
__________________________________________________________________
i tried the motion not for the "motion capture",
only to test the web server function.
what actually makes a ( RPI + USB CAM ) == IP CAM

-c-
and when you find out how to use the QV4L2 photo snapshot function tell us.

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Sat Oct 07, 2017 12:51 am

KLL, any specific models of camera you suggest that would work with PI?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Webcam

Sat Oct 07, 2017 3:29 am

KLL wrote:
Sun Oct 01, 2017 3:27 pm
sorry, i never play with that
but if you reduce your expectations from
PTZ
down to
PT digitalZ
can get a reasonable prize like here
but that is a indoor IP CAM and has nothing to do with RPI.

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Sat Oct 07, 2017 2:51 pm

Thanks KLL.
I will connnect a 120 V light to a module on the PI and will turn it from remote. Not sure how to do it and what module to use. Has to be a module actuated from the PI Output. Kindly help.

beatsal
Posts: 185
Joined: Tue Mar 21, 2017 2:46 pm

Re: Webcam

Thu Dec 14, 2017 1:49 am

Hi KLL,

TRYING TO USE the PI camera v2, works fine locally but not with VNC i.e. remotely. Any help appreciated - thanks

DirkS
Posts: 10017
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Webcam

Thu Dec 14, 2017 2:01 am

beatsal wrote:
Thu Dec 14, 2017 1:49 am
Hi KLL,

TRYING TO USE the PI camera v2, works fine locally but not with VNC i.e. remotely. Any help appreciated - thanks
Pi camera preview / video doesn't use the framebuffer so VNC will not show it.
RealVNC has an experimental setting which can do it, but I'm not sure about the speed / quality.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Webcam

Thu Dec 14, 2017 2:12 am

some graphic stream not show in VNC unless enabled, like here:
https://raspberrypi.stackexchange.com/a/66142

sorry i have currently no camera setup installed, can not help you more.

User avatar
DougieLawson
Posts: 36571
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Webcam

Fri Dec 15, 2017 9:02 pm

beatsal wrote:
Thu Dec 14, 2017 1:49 am
Hi KLL,

TRYING TO USE the PI camera v2, works fine locally but not with VNC i.e. remotely. Any help appreciated - thanks
Which VNC? If you're not using RealVNC server on the RPi and RealVNC client on the remote machine then you have a cat (or snowball) in hell's chance of getting it working.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Beginners”