You are not logged in.

#1 2020-07-30 02:36:01

pfdint
Member
Registered: 2013-11-18
Posts: 43

VLC can't open webcam

My usb webcam works fine in chrome and similar applications, but VLC has never successfully started playback from it.
Prior to messing with this, from the Playlist View, opening the webcam under Video Capture just brought up

Your input can't be opened:
VLC is unable to open the MRL '[something]/dev/video0'. Check the log for details.

repeatedly until VLC is closed.
After messing with this stuff, at some point I installed v4l2loopback
Now, when I try to open up the webcam, it starts playing something 0 seconds in length and doesn't display anything, it doesn't leave the playlist view.
I activated logging, (no thanks to the notorious 'check the log' suggestion), and this is what's produced

udev debug: adding v4l2:///dev/video0 (1080P Webcam: 1080P Webcam)
main debug: adding: 1080P Webcam: 1080P Webcam
main debug: using services_discovery module "udev"
main debug: processing request item: 1080P Webcam: 1080P Webcam, node: Video capture, skip: 0
main debug: rebuilding array of current - root Video capture
main debug: rebuild done - 1 items, index 0
main debug: starting playback of new item
main debug: resyncing on 1080P Webcam: 1080P Webcam
main debug: 1080P Webcam: 1080P Webcam is at 0
main debug: creating new input thread
main debug: Creating an input for '1080P Webcam: 1080P Webcam'
main debug: requesting art for new input thread
main debug: using timeshift granularity of 50 MiB
main debug: using default timeshift path
main debug: `v4l2:///dev/video0' gives access `v4l2' demux `any' path `/dev/video0'
main debug: creating demux: access='v4l2' demux='any' location='/dev/video0' file='/dev/video0'
main debug: looking for access_demux module matching "v4l2": 18 candidates
v4l2 debug: opening device '/dev/video0'
qt debug: IM: Setting an input
main debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in /home/rusername/.local/share/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher
main debug: no meta fetcher modules matched
main debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua scripts in /home/rusername/.local/share/vlc/lua/meta/art
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/01_googleimage.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/02_frenchtv.luac
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/03_lastfm.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
main debug: no art finder modules matched
v4l2 debug: device 1080P Webcam: 1080P Webcam using driver uvcvideo (version 5.7.10) on usb-0000:00:14.0-9.3
v4l2 debug:  with capabilities 0x05200001 (overall 0x85A00001)
v4l2 debug: video input Camera 1 (0) is camera
v4l2 debug: selected input 0
v4l2 debug: no video standard selection
v4l2 debug: no tuning required (analog baseband input)
v4l2 debug: no audio input available
v4l2 debug:  supports compressed format MJPG (MJPG): Motion-JPEG
v4l2 debug:  supports raw format YUYV (YUY2): YUYV 4:2:2
v4l2 debug:  emulates raw format RGB3 (RV24): RGB3
v4l2 debug:  emulates raw format BGR3 (RV24): BGR3
v4l2 debug:  emulates raw format YU12 (I420): YU12
v4l2 debug:  emulates raw format YV12 (YV12): YV12
v4l2 debug: selected format YUYV (YUY2)
v4l2 debug:  requested frame internal: 1/60
v4l2 debug:  frame size 1920x1080
v4l2 debug:   discrete frame interval: 1/5
v4l2 debug:  frame size 1280x720
v4l2 debug:   discrete frame interval: 1/5
v4l2 debug:  frame size 640x480
v4l2 debug:   discrete frame interval: 1/5
v4l2 debug:  frame size 320x240
v4l2 debug:   discrete frame interval: 1/5
v4l2 debug:  frame size 1024x768
v4l2 debug:   discrete frame interval: 1/5
v4l2 debug:  frame size 1280x1024
v4l2 debug:   discrete frame interval: 1/5
v4l2 debug:  frame size 160x120
v4l2 debug:   discrete frame interval: 1/5
v4l2 debug:  frame size 800x600
v4l2 debug:   discrete frame interval: 1/5
v4l2 debug:  best discrete frame size: 1920x1080
v4l2 warning: cannot reset cropping limits: Inappropriate ioctl for device
v4l2 debug: 4147200 bytes maximum for complete image
v4l2 debug: Interlacing setting: progressive
v4l2 debug: color primaries: 8
v4l2 debug: transfer function: 0
v4l2 debug: YCbCr encoding: 0
v4l2 debug: quantization: 0
v4l2 debug: added new video ES YUY2 1920x1080 (1920x1080)
v4l2 debug:  frame rate: 5/1
v4l2 debug:  aspect ratio: 1/1
main debug: selecting program id=0
v4l2 debug: streaming with 4 memory-mapped buffers
v4l2 debug:  integer  Brightness (00980900)
main debug: using access_demux module "v4l2"
main debug: looking for video decoder module matching "any": 17 candidates
main debug: using video decoder module "rawvideo"
main debug: looking for meta reader module matching "any": 2 candidates
lua debug: Trying Lua scripts in /home/rusername/.local/share/vlc/lua/meta/reader
lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader
lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac
lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader
main debug: no meta reader modules matched
main debug: `v4l2:///dev/video0' successfully opened
main debug: incoming request - stopping current input
main debug: killing decoder fourcc `YUY2'
main debug: removing module "rawvideo"
main debug: removing module "v4l2"
main debug: Program doesn't contain anymore ES
main debug: dead input
main debug: nothing to play
qt debug: IM: Deleting the input

I assume I'm just missing some package or some gst-plugins?
It's not documented anywhere what's necessary for this though.

kamoso doesn't work, just a black screen, but cheese works fine.

Last edited by pfdint (2020-07-30 02:39:34)

Offline

#2 2020-07-30 02:41:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: VLC can't open webcam

You cannot open the device directly; you will need v4l2

https://wiki.archlinux.org/index.php/Webcam_setup

Edit:  Actually, you seem to have noted that.  Sorry.   Let me keep looking....

Edit 2:  Did you try vlc v4l2://    ?

Last edited by ewaller (2020-07-30 02:46:53)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2020-07-30 03:16:56

pfdint
Member
Registered: 2013-11-18
Posts: 43

Re: VLC can't open webcam

Yes vlc v4l2:///dev/video0 yields the same 0 length non-play as gui clickery

I'm thinking of this other thing as a problem to tackle after this is solved, but maybe it's a clue:
If I set an emulator in Android Device Manager to use "Webcam0" as Android Studio calls it, the emulator shows green as what the camera sees, and sometimes green static. Which seems like a diver issue? Please don't let it be drivers...

Offline

#4 2020-07-30 13:43:21

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: VLC can't open webcam

pfdint wrote:

Yes vlc v4l2:///dev/video0 yields the same 0 length non-play as gui clickery

ewaller wrote:

Did you try vlc v4l2://    ?

Offline

#5 2020-07-30 14:31:24

pfdint
Member
Registered: 2013-11-18
Posts: 43

Re: VLC can't open webcam

If you're implying you want me to try
vlc v4l2://dev/video0
instead of
vlc v4l2:///dev/video0

Sure, leaving out the root slash just yields more "input can't be opened" spam

If you wanted me to try just vlc v4l2://
That just opens vlc with no differences as far as I can see

Offline

#6 2020-08-26 11:02:45

johan.cb
Member
From: Leipzig, Germany
Registered: 2016-07-10
Posts: 62

Re: VLC can't open webcam

Hello pfdint,


you are missing following optional package for VLC:

zvbi

I haven't been able to use my webcam with VLC for months but thanks to you I found the solution smile

Offline

Board footer

Powered by FluxBB