How to connect a webcam
-
If I connect a usb web cam to my Meizu Pro 5 UBports 15.04 edition, how can a view the image on my device screen?
I installed cheese but it does not run giving an error of not being able to connect to the Mir server.
-
Try using http://appear.in and see if the browser uses your additional cam too.
-
-
When I do a connect with some USB cam, in /var/log/syslog the following lines show up:
Jan 25 11:26:57 ubuntu-phablet kernel: [63770.026862][USBPHY]slew calibration:FM_OUT =329,x=4183,value=4 Jan 25 11:26:57 ubuntu-phablet kernel: [63770.605713]usb 1-1: new full-speed USB device number 3 using musb-hdrc
and a new device is created in
/dev
:phablet@ubuntu-phablet-bq:~$ ls -ltr /dev/usb* crw------- 1 root root 189, 0 Jan 23 20:37 /dev/usbdev1.1 crw-rw---- 1 root root 10, 20 Jan 23 20:37 /dev/usb_accessory phablet@ubuntu-phablet-bq:~$ ls -ltr /dev/usb* crw------- 1 root root 189, 0 Jan 23 20:37 /dev/usbdev1.1 crw-rw---- 1 root root 10, 20 Jan 23 20:37 /dev/usb_accessory crw------- 1 root root 189, 3 Jan 25 11:28 /dev/usbdev1.3 <********* new
Connecting the browser to appear.in does not let you select any device and I have no idea about what else could be used to get the movie to the (MIR-) screen. Linux' vlc would be my first guess on any desktop system with X11.
-
@guru Oh, when I connect my usb cam, the /var/log/syslog says "Device not responding to set address" and no new device is created in /dev/usb* ...
-
@mihael I have to admit, that this BQ E4.5 still runs the latest OTA of Canonical. The UBports BQ E4.5 I do have too, sits at home, I will try it later/tomorrow.
-
@guru Thank you for offering to help with this. I have a usb endoscope camera that I want to use and that is why I would like to view it on my phone.
-
maybe the media player app can be hacked into submission to show the camera rather than a file
https://github.com/ubports/mediaplayer-app/blob/master/src/mediaplayer.cpp#L128
that is, IF the device is setup by the OS
-
I have no idea which devices are my cams. There are so many /dev/video* ...
-
Btw: I have no /dev/vi* device at all, not in my BQ E4.5 running Canonical's UT, and not in the UBport's one.
I pluged today a cam into the latter and the result is the same:
phablet@ubuntu-phablet:~$ ls -l /dev/vi* ls: cannot access /dev/vi*: No such file or directory phablet@ubuntu-phablet:~$ ls -l /dev/usb* crw-rw---- 1 root root 10, 20 Jan 26 07:59 /dev/usb_accessory crw------- 1 root root 189, 0 Jan 26 07:59 /dev/usbdev1.1 (plugin) an 26 08:03:28 ubuntu-phablet kernel: [ 222.669106][USBPHY]slew calibration:FM_OUT =329,x=4183,valu e=4 Jan 26 08:03:29 ubuntu-phablet kernel: [ 223.247221]usb 1-1: new full-speed USB device number 2 usi ng musb-hdrc phablet@ubuntu-phablet:~$ ls -l /dev/usb* crw-rw---- 1 root root 10, 20 Jan 26 07:59 /dev/usb_accessory crw------- 1 root root 189, 0 Jan 26 07:59 /dev/usbdev1.1 crw------- 1 root root 189, 1 Jan 26 08:03 /dev/usbdev1.2
Over the night I got an answer in the old ubuntu-phone mailing list, her it is:
Date: Thu, 25 Jan 2018 20:36:33 +0100 From: Christoph Schulz <ch.schulz@joinout.de> To: ubuntu-phone@lists.launchpad.net Subject: Re: [Ubuntu-phone] connecting an USB video cam to the BQ E4.5 -- how to view the video stream? ... Maybe QtMultimedia detects the webcam and you can use it from there? $ cat >cameras.qml <<EOT import QtQuick 2.4 import QtMultimedia 5.6 ListView { model: QtMultimedia.availableCameras delegate: Text { text: "id: " + modelData.id + ", name: " + modelData.displayName } } EOT $ cat >$HOME/.local/share/applications/cameras.desktop <<EOT [Desktop Entry] Name=Camera List Exec=qmlscene $HOME/cameras.qml Type=Application X-Ubuntu-Touch=true EOT Then refresh your app scope and start it from there and see if there are more than the two default cameras (front/back). My E4.5's output: id: undefined, name: Camera 0 Back facing id: undefined, name: Camera 1 Front facing Hope this helps.
For the moment this is all. No
I followed the advice of Christoph, and it shows only the two mentioned cams (Back and Front).