Author Topic: Usb Video Capture (and Web Cam)  (Read 2848 times)

Offline Pussycat

  • Full Member
  • ***
  • Posts: 171
Re: Usb Video Capture (and Web Cam)
« Reply #60 on: March 06, 2013, 02:42:30 PM »
ls /dev | grep video produces no output (which is strange since I know there is an entry for /dev/video0).

And I know the EasyCap drivers are installed and working (for mplayer) as stated in post #53!

Offline atolboo

  • Full Member
  • ***
  • Posts: 220
Re: Usb Video Capture (and Web Cam)
« Reply #61 on: March 06, 2013, 03:56:29 PM »
Do
Code: [Select]
ls /devand you will get a list of all that's present.
And I guess mplayer uses a different way to access the device than vlc.
« Last Edit: March 06, 2013, 03:59:53 PM by atolboo »

Offline Pussycat

  • Full Member
  • ***
  • Posts: 171
Re: Usb Video Capture (and Web Cam)
« Reply #62 on: March 07, 2013, 08:37:54 AM »
ls /dev simply lists all the entries in that folder, which I can navigate to in Dolphin anyway.

However, if I navigate to /dev/v4l there are 2 subfolders by-path and by-id.

The former has one entry for
file:///dev/v4l/by-path/pci-0000:00:1a.7-usb-0:2:1.0-video-index0 (not sure what that is)
and the latter
file:///dev/v4l/by-id/usb-Chicony_Electronics_Co.__Ltd._CNF7051_SN0001-video-index0 (which is the webcam).

Obviously the Linux model is different and perhaps I'm spoilt by Win because once a device driver is installed, any application capable of using it can see it.  In the case of video capture, those apps can all see the EasyCap though some can use it better than others.  Which is why I was looking for something more reliable in Linux and PCLos in particular.

Following the advice for within vlc produces

Quote
Your input can't be opened:
VLC is unable to open the MRL 'v4l2:// /dev/video0:input=1:width=720:height=576'. Check the log for details.

For various values of x and y (though the only video specific entry in /dev is video0).

Is there any significance to the commands referring to v4l2 rather than v4l as on my system?

Offline atolboo

  • Full Member
  • ***
  • Posts: 220
Re: Usb Video Capture (and Web Cam)
« Reply #63 on: March 07, 2013, 01:03:14 PM »
Result with my EasyCAP DC60 (STK1160) inserted
Quote
bash-4.1$ LC_ALL=C ls /dev/v4l
ls: cannot access /dev/v4l: No such file or directory

The 'LC_ALL=C' is to get the result in English (otherwise it would be in the Dutch language)

And (as reference) my EasyCAP DC60 (STK1160) produces a picture with
Code: [Select]
vlc -vvv v4l2:///dev/video0:input=0:width=720:height=576:outfmt=uyvy:norm=paland
Code: [Select]
mplayer tv:// -tv driver=v4l2:width=720:height=576:outfmt=uyvy:norm=PAL:device=/dev/video0:input=0:fps=25 -vo sdl -nosound

Offline Pussycat

  • Full Member
  • ***
  • Posts: 171
Re: Usb Video Capture (and Web Cam)
« Reply #64 on: March 07, 2013, 03:18:25 PM »
As indicated in #53

somagic-capture | mplayer -vf yadif,screenshot -demuxer rawvideo -rawvideo "pal:format=uyvy:fps=25" -aspect 4:3 -

launches mplayer using the EasyCap for capture from my tv - but

vlc -vvv v4l2:///dev/video0:input=0:width=720:height=576:outfmt=uyvy:norm=pal

launches vlc using the webcam (video0)!

The problem seems to be discovering which (if any) entry in /dev corresponds to the Easycap and I can detect no clue in the first example above.

It may be that you don't have a built-in webcam to create any conflict?

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10647
  • MLUs Forever!
Re: Usb Video Capture (and Web Cam)
« Reply #65 on: March 07, 2013, 05:59:29 PM »
As indicated in #53

somagic-capture | mplayer -vf yadif,screenshot -demuxer rawvideo -rawvideo "pal:format=uyvy:fps=25" -aspect 4:3 -

launches mplayer using the EasyCap for capture from my tv - but

vlc -vvv v4l2:///dev/video0:input=0:width=720:height=576:outfmt=uyvy:norm=pal

launches vlc using the webcam (video0)!

The problem seems to be discovering which (if any) entry in /dev corresponds to the Easycap and I can detect no clue in the first example above.

It may be that you don't have a built-in webcam to create any conflict?

If the webcam is  /dev/video0  then the next device *should* be   /dev/video1

I would also try from the VLC menu ....  Open Capture Device - and use /dev/video1  ...  you can check the operation with video0 to make sure it displays the webcam.

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline atolboo

  • Full Member
  • ***
  • Posts: 220
Re: Usb Video Capture (and Web Cam)
« Reply #66 on: March 08, 2013, 03:02:29 AM »
It may be that you don't have a built-in webcam to create any conflict?
Results from my Eee PC 1001PXD (running with PCLOS-KDE)

Build-in 0.3 MP Camera:
Quote
mplayer tv:// -tv driver=v4l2:width=720:height=576:outfmt=uyvy:norm=PAL:device=/dev/video0:input=0:fps=25 -vo sdl -nosound
and
Quote
vlc -vvv v4l2:///dev/video0:input=0:width=720:height=576:norm=pal

EasyCAP DC60:
Quote
mplayer tv:// -tv driver=v4l2:width=720:height=576:outfmt=uyvy:norm=PAL:device=/dev/video1:input=0:fps=25 -vo sdl -nosound
and
Quote
vlc -vvv v4l2:///dev/video1:input=0:width=720:height=576:norm=pal

Conclusion: No conflict as it uses a different /dev/video<n> number.

Additional info (with both connected):
Quote
bash-4.1$ ls /dev | grep video
video0
video1
bash-4.1$ ls /dev/v4l
by-id/  by-path/
bash-4.1$ ls /dev/v4l/by-id/
usb-Azurewave_USB_2.0_UVC_VGA_WebCam_0x0001-video-index0@
bash-4.1$ ls /dev/v4l/by-path/
pci-0000:00:1d.7-usb-0:6:1.0-video-index0@

« Last Edit: March 08, 2013, 03:27:06 AM by atolboo »

Offline Pussycat

  • Full Member
  • ***
  • Posts: 171
Re: Usb Video Capture (and Web Cam)
« Reply #67 on: March 08, 2013, 08:11:49 AM »
The only "video" entry in /dev on my system is video0.  There is no video1 or any other likely candidate.  Also as indicated earlier, my entries in /dev/v4l are identical to above except for a different make of webcam.

Whilst not familiar with the linux model, I note that all the "files" in /dev are 0kb and assume, therefore, that they are some kind of symbolic link or reference?

On my system, the clue seems to be in

somagic-capture | mplayer -vf yadif,screenshot -demuxer rawvideo -rawvideo "pal:format=uyvy:fps=25" -aspect 4:3 -


which pipes the output from somagic-capture to mplayer - though there is no sound and there is picture break-up so obviously some tweaking of the parameters is needed.

I've also tried piping somagic-capture to vlc with various combinations of switches/parameters (non of which I don't understand!) but vlc complains every time about missing MRL?

Perhaps installation procedure for the Somagic version of the Easycap dc60 is different and doesn't create a video1 file and consequently cannot be invoked from within an app but can only be piped?
« Last Edit: March 08, 2013, 08:34:11 AM by Pussycat »

Offline atolboo

  • Full Member
  • ***
  • Posts: 220
Re: Usb Video Capture (and Web Cam)
« Reply #68 on: March 08, 2013, 01:19:56 PM »
.... I note that all the "files" in /dev are 0kb
Here too except for the files core, stderr and stdout.
The symbolic link have a arrow in them.
The size displayed in Krusader is different from Dolphin.
I like Krusader ;) much more then the default file browser Dolphin.