avafinger / pine64_camera

Linux Device Tree with s5k4ec enabled - Howto
12 stars 3 forks source link

Not working on PINE64 command line #2

Open PanderMusubi opened 6 years ago

PanderMusubi commented 6 years ago

All latest version, not working on PINE64 command line:

$ guvcview -d /dev/video0 -x 640x480 -r none -m none -a none -g none -i cam.jpg
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

And it waits indefinitely.

What can I do to help fix this, please?

avafinger commented 6 years ago

@PanderMusubi Please, try the following command: guvcview -d /dev/video0 -x 640x480 -r sdl -f yu12

avafinger commented 6 years ago

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
PanderMusubi commented 6 years ago

$ 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

PanderMusubi commented 6 years ago

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
avafinger commented 6 years ago

Can you tell which Distro you are using?

PanderMusubi commented 6 years ago

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.

avafinger commented 6 years ago

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.

PanderMusubi commented 6 years ago

See also https://github.com/avafinger/cap-v4l2/issues/1