My USB webcam stopped working
afaik it's a generic usb webcam. it's not detected by pupcam[era.?] it was ok a few weeks ago, but i can't remember.
Discussion, talk and tips
https://forum.puppylinux.com/
afaik it's a generic usb webcam. it's not detected by pupcam[era.?] it was ok a few weeks ago, but i can't remember.
Code: Select all
#!/bin/bash -x
export TEXTDOMAIN=webcamtest
export OUTPUT_CHARSET=UTF-8
# Obtén una lista de todos los dispositivos de video
devices=$(ls /dev | grep video)
# Crea un array para almacenar las opciones del diálogo
options=()
# Llena el array con los dispositivos de video
for device in $devices; do
options+=("/dev/$device")
done
# Muestra el diálogo y guarda la selección del usuario
selected_device=$(yad --width=340 --height=150 --image="/usr/share/icons/Newaita-dark/devices/48/camera-web.svg" --window-icon="/usr/share/icons/Newaita-dark/devices/48/camera-web.svg" --title "$(gettext 'Select a video device')" --list --column "$(gettext 'Devices')": "${options[@]}")
# Elimina el carácter "|" del final de la selección del usuario
selected_device=${selected_device%|}
# Reproduce video desde el dispositivo seleccionado
if [ -n "$selected_device" ]; then
ffplay -f v4l2 -video_size 640x480 -i "$selected_device"
fi
Try this script
@nilsonmorales :-
Works nicely here, Nilson.....but then, my Logitech c920 IS Video4Linux-compliant anyway.
@boof :-
Boof, are you saying your webcam has simply stopped working?
In a terminal, what readout d'you get from
Code: Select all
lsusb
...??
Mike.
i'll check later thx. i've unplugged it temp.
HI @nilsonmorales :-
This script works well. Now, how would I store the image from the webcam into a .jpg ???
@Geek3579 :-
Geek3579 wrote: Sun Apr 07, 2024 12:37 pmHI @nilsonmorales :-
This script works well. Now, how would I store the image from the webcam into a .jpg ???
I don't think that would be possible with the script as-is. Currently, it's written to give a 'Live' videostream.....and from the sound of things, you're asking for a 'still' snapshot in JPG format. That would require some extra code, but.....heh; you've given ME something to research now, because it would be a useful addition to my 'CamRecord' utility.
Hmm. Now; let's see....
Mike.
@Geek3579 :-
You could try my latest creation if you ARE after capturing a 'still' JPG image.....FSWebcamGUI.
Entirely up to you.....unless of course, '.jpg' was a 'typo'..?
Mike.