Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How install USB digital camera?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 11:16 am    Post subject: How install USB digital camera? Reply with quote

I am trying to install an old and simple digital mini camera (can be webcam) -
However looks something is missing: maybe should add any driver to kernel?
How can see this device with ls -l /dev command? What letters should it show up in the list?
How can I see the picture: maybe it is working after all...
Here outputs:
Code:
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 008: ID 2770:9120 NHJ, Ltd Che-ez! Snap / iClick Tiny VGA Digital Camera
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 046d:c03e Logitech, Inc. Premium Optical Wheel Mouse (M-BT58)
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

dmesg:
Code:
USB disconnect, device number 7
[22324.896040] usb 5-2: new full-speed USB device number 8 using uhci_hcd
[22325.050169] usb 5-2: New USB device found, idVendor=2770, idProduct=9120
[22325.050175] usb 5-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[22325.050179] usb 5-2: Product: USB DIGITAL STILL CAMERA

_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”


Last edited by pmam on Wed Jun 08, 2016 11:51 am; edited 2 times in total
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7695
Location: Pelotas, BR

PostPosted: Wed Jun 08, 2016 11:18 am    Post subject: Reply with quote

Have you tried to access the camera using any software?
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 11:28 am    Post subject: Reply with quote

pilla Hi,

I just added a line to my previous post: 'How can I see the picture: maybe it is working after all...' :)
I tried to see it with vlc and smplayer, but do not see it and do not know the name of the camera should be there...
Please advise what software is needed?

Thanks
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 8132
Location: ~Brussels - Belgique

PostPosted: Wed Jun 08, 2016 11:35 am    Post subject: Reply with quote

Did you enabled the uvc kernel module ?
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 11:38 am    Post subject: Reply with quote

I hope you mean to this kernel's info and it looks ok:
Code:
Symbol: USB_CONFIGFS_F_UVC [=y]
Symbol: USB_F_UVC [=m]

_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7328
Location: Saint Amant, Acadiana

PostPosted: Wed Jun 08, 2016 11:41 am    Post subject: Reply with quote

/dev/video0
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 11:42 am    Post subject: Reply with quote

Code:
ls -l /dev/video*
ls: cannot access /dev/video*: No such file or directory

_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7328
Location: Saint Amant, Acadiana

PostPosted: Wed Jun 08, 2016 11:52 am    Post subject: Reply with quote

See here, it is not a UVC camera: http://ubuntuforums.org/showthread.php?t=435463
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Syl20
Guru
Guru


Joined: 04 Aug 2005
Posts: 564
Location: France

PostPosted: Wed Jun 08, 2016 12:04 pm    Post subject: Reply with quote

Once installed, you can run cheese to test your webcam. It's very light.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Wed Jun 08, 2016 12:08 pm    Post subject: Reply with quote

A grep for your device's vendor and product ID in kernel finds one hit:
Code:
drivers/media/usb/gspca/sq905.c:        {USB_DEVICE(0x2770, 0x9120)},

This agrees with what is written in the Ubuntu forums. So enable CONFIG_USB_GSPCA_SQ905 in your kernel (you can press / in menuconfig to search).

To test your webcam you can use mpv if built with USE="v4l" and run as a user who is member of the video group:
Code:
$ mpv --tv-device=/dev/video0 tv://
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 12:34 pm    Post subject: Reply with quote

chithanh,

I added CONFIG_USB_GSPCA_SQ905 and CONFIG_USB_GSPCA_SQ905C to kernel and will compile it right after finish installing cheese software.
Meanwhile please note grep command you did in order to get this info? I need it for next time of such issue...
Quote:
A grep for your device's vendor and product ID in kernel finds one hit:

I would not get this info from Ubuntu forums without your advise...
Will be continued...

Thanks
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7328
Location: Saint Amant, Acadiana

PostPosted: Wed Jun 08, 2016 1:10 pm    Post subject: Reply with quote

FYI I put "2770:9120 linux" in google and Ubuntu was the first hit. I'm surprised you didn't see this: $ sudo modprobe -v gspca_sq905
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 1:15 pm    Post subject: Reply with quote

After adding CONFIG_USB_GSPCA_SQ905 and CONFIG_USB_GSPCA_SQ905C to kernel it still not working...

EDIT: Just a momant... looks that kernel was not compiled
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 1:34 pm    Post subject: Reply with quote

OK - I found out that kernel was old ver and was not compiled (by any mistake...) -
and now it is after compilation and camera is working ok :)
Quote:
I'm surprised you didn't see this: $ sudo modprobe -v gspca_sq905

I did not see it and not so familiar with modules and drivers,
so I would not figure out the meaning of this data... Now I learned something for the next time: How to use other Linux's dist for Gentoo issues...

Also it is a good idea to search device's vendor and product ID in kernel like chithanh showed -
Can you please note the exact grep command for this info?

Thanks
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Wed Jun 08, 2016 2:20 pm    Post subject: Reply with quote

The grep command I used was
Code:
/usr/src/linux $ grep -r "2770.*9120" drivers/

If it doesn't turn up anything, you can search for the product ID individually, but that may return some false positives.
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 2:33 pm    Post subject: Reply with quote

chithanh,

It is very helpful
Thanks a lot
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 5:44 pm    Post subject: Reply with quote

I want to record webcam streaming and I saw somewhere that cheese can do it but did not find out how -
Please advise if can record with cheese or need another software?
So far i can see webcam picture with cheese and vlc - mplayer or smplayer do not work and I do not have mpv.
Cheese works nice.
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Wed Jun 08, 2016 6:00 pm    Post subject: Reply with quote

cat /dev/video0 > outfile
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 6:20 pm    Post subject: Reply with quote

Code:
cat /dev/video0 > outfile

It copies video to file but can not play the file with vlc or any player - any other solution?
BTW: I would prefer such recorder with motion detector...
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44226
Location: 56N 3W

PostPosted: Wed Jun 08, 2016 7:51 pm    Post subject: Reply with quote

pmam,

mplayer can record. See the encode option.

Be aware that raw video wants a lot of space and real time 30 FPS compression wants a lot of CPU power.
Neither are very attractive options.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Wed Jun 08, 2016 8:30 pm    Post subject: Reply with quote

NeddySeagoon,

Quote:
mplayer can record. See the encode option.

My webcam does not work with mplayer at all (only with cheese and vlc) - need to figure out the right command?

Quote:
Be aware that raw video wants a lot of space and real time 30 FPS compression wants a lot of CPU power.

That's why I am looking for recording with motion detector..

Thanks
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7695
Location: Pelotas, BR

PostPosted: Wed Jun 08, 2016 11:20 pm    Post subject: Reply with quote

I have some students that are doing motion capture using Python. I will ask about it.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Thu Jun 09, 2016 7:15 am    Post subject: Reply with quote

pilla,

Quote:
I have some students that are doing motion capture using Python. I will ask about it.

Nice to know! I see some info regarding motion detector (motion, gmotionlive) in this old link for example:
http://ubuntuforums.org/showthread.php?t=1223011

There are two Gentoo's packages - someone have any experience with them?
Code:
* media-video/motion
     Available versions:  3.2.12-r2 3.2.12-r3 {ffmpeg libav mysql postgres +v4l}
     Homepage:            http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
     Description:         A software motion detector

* media-video/motiontrack
     Available versions:  ~0.1.3 {debug gd imagemagick multiprocess}
     Homepage:            http://motiontrack.sourceforge.net
     Description:         A set of tools that detect motion between two images


Thanks
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7695
Location: Pelotas, BR

PostPosted: Thu Jun 09, 2016 6:48 pm    Post subject: Reply with quote

pman, my students are using Python and OpenCV. They said it is pretty straightforward.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
pmam
Veteran
Veteran


Joined: 30 Dec 2013
Posts: 1145

PostPosted: Fri Jun 10, 2016 9:09 am    Post subject: Reply with quote

pilla,

Quote:
pman, my students are using Python and OpenCV. They said it is pretty straightforward.

Do you mean that we are going to see it in the near future? I am not a programmer, however it would be interesting to see this algorithm...
Here e.g a stand alone NVR - Embedded LINUX operating system -
'Support manual, auto, dynamic detection, alarm trigger record mode(Partly needs IPC Support)' -
Maybe they use available software or have their own software:
http://www.banggood.com/ESCAM-Mini-NVR-K208-8-Channel-P2P-HD-Network-Video-Recorder-for-Security-Onvif-Protocol-IP-Camera-p-1050418.html
_________________
“You can take our property, our sweet homes, even our cloths...
But don't touch the streets, Ah, That's NO, NO, NO!
The streets are our @world's compilable kernel ...”
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum