Open PanderMusubi opened 6 years ago
@PanderMusubi Please, try the following command: guvcview -d /dev/video0 -x 640x480 -r sdl -f yu12
Do you intend to capture images with a headless server image?
I have never tried but maybe this could work, please try this:
Type in shell:
guvcview --no_display -d /dev/video0 -x 640x480 -r sdl -f yu12 -n capture_file.avi
From a second shell window type in:
killall -s USR1 guvcview
This will start a video capture and save the file in the current directory.
Guvcview output:
GUVCVIEW Signals:
SIGUSR1: Video stop/start capture
SIGUSR2: Image capture
SIGINT (ctrl+c): Exit
$ guvcview -d /dev/video0 -x 640x480 -r sdl -f yu12 GUVCVIEW: version 2.0.3 V4L2_CORE: Unable to find parent usb device.V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device V4L2_CORE: (UVCIOC_CTRL_MAP) Error: Inappropriate ioctl for device V4L2_CORE: (VIDIOC_G_EXT_CTRLS) failed V4L2_CORE: using VIDIOC_G_CTRL for user class controls V4L2_CORE: (VIDIOC_G_EXT_CTRLS) failed V4L2_CORE: using VIDIOC_G_EXT_CTRLS on single controls for class: 0x009a0000 V4L2_CORE: control id: 0x009a091b failed to get (error -1) V4L2_CORE: control id: 0x009a091e failed to get (error 14) GUVCVIEW: couldn't get a valid audio context for the selected api - disabling audio
(process:7952): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. RENDER: Couldn't initialize SDL: Unable to open a console terminal RENDER: Couldn't create yuv overlay (try disabling hardware accelaration) Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused GUVCVIEW: (GUI) Gtk3 can't open display ^CGUVCVIEW Caught signal 2
also infinite loop
Hmmm, interesting:
$ guvcview --no_display -d /dev/video0 -x 640x480 -r sdl -f yu12 -i cam.jpg
guvcview: unrecognized option '--no_display'
Guvcview version 2.0.3
Can you tell which Distro you are using?
Yes, I am trying to use it in a headless way. It is with Ubuntu on a PINE64. I installed the deb packages for guvcview from GitHub and followed the other instructions.
Guvcview was meant to use SDL to render it on screen (X11), i thought that --no_display could work. I you just want to grab still image i suggest using https://github.com/avafinger/cap-v4l2 or the more complete app https://github.com/avafinger/fswebcam, both will work with pine64.
For video stream with headless i need to check if it would be possible with guvcview.
All latest version, not working on PINE64 command line:
And it waits indefinitely.
What can I do to help fix this, please?