How to check available webcams from the command line?
Is there a terminal command that lists all the webcams connected to my computer, including the native one? Maybe using ffmpeg package?
command-line webcam
add a comment |
Is there a terminal command that lists all the webcams connected to my computer, including the native one? Maybe using ffmpeg package?
command-line webcam
<<<<< lsusb >>>>
– Qasim
Sep 22 '13 at 20:33
add a comment |
Is there a terminal command that lists all the webcams connected to my computer, including the native one? Maybe using ffmpeg package?
command-line webcam
Is there a terminal command that lists all the webcams connected to my computer, including the native one? Maybe using ffmpeg package?
command-line webcam
command-line webcam
edited May 11 '18 at 14:24
Ciro Santilli 新疆改造中心 六四事件 法轮功
9,99444650
9,99444650
asked Sep 22 '13 at 20:26
marcelosalloummarcelosalloum
200116
200116
<<<<< lsusb >>>>
– Qasim
Sep 22 '13 at 20:33
add a comment |
<<<<< lsusb >>>>
– Qasim
Sep 22 '13 at 20:33
<<<<< lsusb >>>>
– Qasim
Sep 22 '13 at 20:33
<<<<< lsusb >>>>
– Qasim
Sep 22 '13 at 20:33
add a comment |
3 Answers
3
active
oldest
votes
To list all video devices picked up by the kernel
ls -ltrh /dev/video*
To list all devices attached to USB use lsusb
; to list all devices attached to PCI use lspci
1
$ ls -ltrh /dev/video* ls: cannot access '/dev/video*': No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
@MonaJalal That means it couldn’t find any devices.
– JMY1000
Jan 25 at 22:23
add a comment |
v4l2-ctl --list-devices
sudo apt-get install v4l-utils
v4l2-ctl --list-devices
Sample output with a single camera:
Integrated Camera (usb-0000:00:1a.0-1.6):
/dev/video0
Tested on Ubuntu 16.04.
More details can be found here: https://stackoverflow.com/questions/4290834/how-to-get-a-list-of-video-capture-devices-web-cameras-on-linux-ubuntu-c
3
On 16.04.1 error:Failed to open /dev/video0: No such file or directory
– Xaqron
Jan 3 '17 at 16:41
@Xaqron also try installinglibv4l-dev
if not already installed. Also give computer model if you can. Cheers.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jan 3 '17 at 18:00
1
Just because I keep coming back to this answer, it's now:v4l2-ctl --list-devices
. That's lower in the answer but the top in bold text doesn't have the 2.
– ksclarke
Oct 11 '17 at 16:40
1
$ v4l2-ctl --list-devices Failed to open /dev/video0: No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
This doesn't work if I have a Sony PS3 eye camera connected to my ubuntu 16.04
– Mona Jalal
Jun 21 '18 at 21:13
|
show 3 more comments
For Windows you can use the pygrabber library: https://github.com/bunkahle/pygrabber
To check the user friendly names of the connected webcams:
from __future__ import print_function
from pygrabber.dshow_graph import FilterGraph
graph = FilterGraph()
print(graph.get_input_devices())
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f348838%2fhow-to-check-available-webcams-from-the-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
To list all video devices picked up by the kernel
ls -ltrh /dev/video*
To list all devices attached to USB use lsusb
; to list all devices attached to PCI use lspci
1
$ ls -ltrh /dev/video* ls: cannot access '/dev/video*': No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
@MonaJalal That means it couldn’t find any devices.
– JMY1000
Jan 25 at 22:23
add a comment |
To list all video devices picked up by the kernel
ls -ltrh /dev/video*
To list all devices attached to USB use lsusb
; to list all devices attached to PCI use lspci
1
$ ls -ltrh /dev/video* ls: cannot access '/dev/video*': No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
@MonaJalal That means it couldn’t find any devices.
– JMY1000
Jan 25 at 22:23
add a comment |
To list all video devices picked up by the kernel
ls -ltrh /dev/video*
To list all devices attached to USB use lsusb
; to list all devices attached to PCI use lspci
To list all video devices picked up by the kernel
ls -ltrh /dev/video*
To list all devices attached to USB use lsusb
; to list all devices attached to PCI use lspci
answered Sep 22 '13 at 20:46
connie newconnie new
53235
53235
1
$ ls -ltrh /dev/video* ls: cannot access '/dev/video*': No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
@MonaJalal That means it couldn’t find any devices.
– JMY1000
Jan 25 at 22:23
add a comment |
1
$ ls -ltrh /dev/video* ls: cannot access '/dev/video*': No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
@MonaJalal That means it couldn’t find any devices.
– JMY1000
Jan 25 at 22:23
1
1
$ ls -ltrh /dev/video* ls: cannot access '/dev/video*': No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
$ ls -ltrh /dev/video* ls: cannot access '/dev/video*': No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
@MonaJalal That means it couldn’t find any devices.
– JMY1000
Jan 25 at 22:23
@MonaJalal That means it couldn’t find any devices.
– JMY1000
Jan 25 at 22:23
add a comment |
v4l2-ctl --list-devices
sudo apt-get install v4l-utils
v4l2-ctl --list-devices
Sample output with a single camera:
Integrated Camera (usb-0000:00:1a.0-1.6):
/dev/video0
Tested on Ubuntu 16.04.
More details can be found here: https://stackoverflow.com/questions/4290834/how-to-get-a-list-of-video-capture-devices-web-cameras-on-linux-ubuntu-c
3
On 16.04.1 error:Failed to open /dev/video0: No such file or directory
– Xaqron
Jan 3 '17 at 16:41
@Xaqron also try installinglibv4l-dev
if not already installed. Also give computer model if you can. Cheers.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jan 3 '17 at 18:00
1
Just because I keep coming back to this answer, it's now:v4l2-ctl --list-devices
. That's lower in the answer but the top in bold text doesn't have the 2.
– ksclarke
Oct 11 '17 at 16:40
1
$ v4l2-ctl --list-devices Failed to open /dev/video0: No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
This doesn't work if I have a Sony PS3 eye camera connected to my ubuntu 16.04
– Mona Jalal
Jun 21 '18 at 21:13
|
show 3 more comments
v4l2-ctl --list-devices
sudo apt-get install v4l-utils
v4l2-ctl --list-devices
Sample output with a single camera:
Integrated Camera (usb-0000:00:1a.0-1.6):
/dev/video0
Tested on Ubuntu 16.04.
More details can be found here: https://stackoverflow.com/questions/4290834/how-to-get-a-list-of-video-capture-devices-web-cameras-on-linux-ubuntu-c
3
On 16.04.1 error:Failed to open /dev/video0: No such file or directory
– Xaqron
Jan 3 '17 at 16:41
@Xaqron also try installinglibv4l-dev
if not already installed. Also give computer model if you can. Cheers.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jan 3 '17 at 18:00
1
Just because I keep coming back to this answer, it's now:v4l2-ctl --list-devices
. That's lower in the answer but the top in bold text doesn't have the 2.
– ksclarke
Oct 11 '17 at 16:40
1
$ v4l2-ctl --list-devices Failed to open /dev/video0: No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
This doesn't work if I have a Sony PS3 eye camera connected to my ubuntu 16.04
– Mona Jalal
Jun 21 '18 at 21:13
|
show 3 more comments
v4l2-ctl --list-devices
sudo apt-get install v4l-utils
v4l2-ctl --list-devices
Sample output with a single camera:
Integrated Camera (usb-0000:00:1a.0-1.6):
/dev/video0
Tested on Ubuntu 16.04.
More details can be found here: https://stackoverflow.com/questions/4290834/how-to-get-a-list-of-video-capture-devices-web-cameras-on-linux-ubuntu-c
v4l2-ctl --list-devices
sudo apt-get install v4l-utils
v4l2-ctl --list-devices
Sample output with a single camera:
Integrated Camera (usb-0000:00:1a.0-1.6):
/dev/video0
Tested on Ubuntu 16.04.
More details can be found here: https://stackoverflow.com/questions/4290834/how-to-get-a-list-of-video-capture-devices-web-cameras-on-linux-ubuntu-c
edited Oct 11 '17 at 16:43
answered Nov 11 '16 at 23:08
Ciro Santilli 新疆改造中心 六四事件 法轮功Ciro Santilli 新疆改造中心 六四事件 法轮功
9,99444650
9,99444650
3
On 16.04.1 error:Failed to open /dev/video0: No such file or directory
– Xaqron
Jan 3 '17 at 16:41
@Xaqron also try installinglibv4l-dev
if not already installed. Also give computer model if you can. Cheers.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jan 3 '17 at 18:00
1
Just because I keep coming back to this answer, it's now:v4l2-ctl --list-devices
. That's lower in the answer but the top in bold text doesn't have the 2.
– ksclarke
Oct 11 '17 at 16:40
1
$ v4l2-ctl --list-devices Failed to open /dev/video0: No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
This doesn't work if I have a Sony PS3 eye camera connected to my ubuntu 16.04
– Mona Jalal
Jun 21 '18 at 21:13
|
show 3 more comments
3
On 16.04.1 error:Failed to open /dev/video0: No such file or directory
– Xaqron
Jan 3 '17 at 16:41
@Xaqron also try installinglibv4l-dev
if not already installed. Also give computer model if you can. Cheers.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jan 3 '17 at 18:00
1
Just because I keep coming back to this answer, it's now:v4l2-ctl --list-devices
. That's lower in the answer but the top in bold text doesn't have the 2.
– ksclarke
Oct 11 '17 at 16:40
1
$ v4l2-ctl --list-devices Failed to open /dev/video0: No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
This doesn't work if I have a Sony PS3 eye camera connected to my ubuntu 16.04
– Mona Jalal
Jun 21 '18 at 21:13
3
3
On 16.04.1 error:
Failed to open /dev/video0: No such file or directory
– Xaqron
Jan 3 '17 at 16:41
On 16.04.1 error:
Failed to open /dev/video0: No such file or directory
– Xaqron
Jan 3 '17 at 16:41
@Xaqron also try installing
libv4l-dev
if not already installed. Also give computer model if you can. Cheers.– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jan 3 '17 at 18:00
@Xaqron also try installing
libv4l-dev
if not already installed. Also give computer model if you can. Cheers.– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jan 3 '17 at 18:00
1
1
Just because I keep coming back to this answer, it's now:
v4l2-ctl --list-devices
. That's lower in the answer but the top in bold text doesn't have the 2.– ksclarke
Oct 11 '17 at 16:40
Just because I keep coming back to this answer, it's now:
v4l2-ctl --list-devices
. That's lower in the answer but the top in bold text doesn't have the 2.– ksclarke
Oct 11 '17 at 16:40
1
1
$ v4l2-ctl --list-devices Failed to open /dev/video0: No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
$ v4l2-ctl --list-devices Failed to open /dev/video0: No such file or directory
– Mona Jalal
Jun 21 '18 at 21:11
This doesn't work if I have a Sony PS3 eye camera connected to my ubuntu 16.04
– Mona Jalal
Jun 21 '18 at 21:13
This doesn't work if I have a Sony PS3 eye camera connected to my ubuntu 16.04
– Mona Jalal
Jun 21 '18 at 21:13
|
show 3 more comments
For Windows you can use the pygrabber library: https://github.com/bunkahle/pygrabber
To check the user friendly names of the connected webcams:
from __future__ import print_function
from pygrabber.dshow_graph import FilterGraph
graph = FilterGraph()
print(graph.get_input_devices())
New contributor
add a comment |
For Windows you can use the pygrabber library: https://github.com/bunkahle/pygrabber
To check the user friendly names of the connected webcams:
from __future__ import print_function
from pygrabber.dshow_graph import FilterGraph
graph = FilterGraph()
print(graph.get_input_devices())
New contributor
add a comment |
For Windows you can use the pygrabber library: https://github.com/bunkahle/pygrabber
To check the user friendly names of the connected webcams:
from __future__ import print_function
from pygrabber.dshow_graph import FilterGraph
graph = FilterGraph()
print(graph.get_input_devices())
New contributor
For Windows you can use the pygrabber library: https://github.com/bunkahle/pygrabber
To check the user friendly names of the connected webcams:
from __future__ import print_function
from pygrabber.dshow_graph import FilterGraph
graph = FilterGraph()
print(graph.get_input_devices())
New contributor
New contributor
answered 37 mins ago
bunkusbunkus
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f348838%2fhow-to-check-available-webcams-from-the-command-line%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
<<<<< lsusb >>>>
– Qasim
Sep 22 '13 at 20:33