My NIKON D7000 cannot connect to any video streaming device , I have installed correctly gphoto2, v4l2loopback-utils, and ffmpeg - It is in PTP mode
https://askubuntu.com/questions/1562212/my-nikon-d7000-cannot-connect-to-any-video-streaming-device-i-have-installed-cMy DSLR NIKON D7000 cannot connect to any video streaming device although:
- I have installed correctly gphoto2, v4l2loopback-utils, and ffmpeg
- My camera appears connected in PTP mode
- I have unmounted it so that it does not appear as a mass storage device
Here are some of the verifications I made by running a few terminal commands:
sabinefauresamlle@sabinefauresamlle-ThinkCentre-M700:~$ gphoto2 --auto-detect
Model Port
----------------------------------------------------------
Nikon DSC D7000 (PTP mode) usb:001,008
sabinefauresamlle@sabinefauresamlle-ThinkCentre-M700:~$ gphoto2 --summary
gphoto2 --auto-detect
Model Port
----------------------------------------------------------
Nikon DSC D7000 (PTP mode) usb:001,009
gphoto2 --capture-movie --stdout --port=usb:001,009 | vlc -
abinefauresamlle@sabinefauresamlle-ThinkCentre-M700:~$ gphoto2 --capture-movie --stdout --port=usb:001,009 | vlc -
Capturing preview frames as movie to 'stdout'. Press Ctrl-C to abort.
*** Error ***
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
ERROR: Movie capture error... Exiting.
Movie capture finished (0 frames)
VLC media player 3.0.20 Vetinari (revision 3.0.20-1-g2617de71b6)
[000057ea1d974a00] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Qt: Session management error: Could not open network socket
[000077ae640010e0] mjpeg demux error: cannot peek
QObject::~QObject: Timers cannot be stopped from another thread
The error repeating endlessly is that video capturing apps cannot claim the USB device and cannot start using the camera….
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***
For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:
env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --summary
Please make sure there is sufficient quoting around the arguments.
sabinefauresamlle@sabinefauresamlle-ThinkCentre-M700:~$ ffmpeg -f x11grab -framerate 15 -video_size 1280x720 -i :0.0 -f v4l2 /dev/video0
ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu3)
configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
[x11grab @ 0x63c4f5309ec0] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':0.0':
Duration: N/A, start: 1766314841.677714, bitrate: 442368 kb/s
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1280x720, 442368 kb/s, 15 fps, 1000k tbr, 1000k tbn
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[video4linux2,v4l2 @ 0x63c4f5313740] Unable to open V4L2 device '/dev/video0'
[out#0/video4linux2,v4l2 @ 0x63c4f5312b00] Could not write header (incorrect codec parameters ?): No such file or directory
Error while filtering: No such file or directory
[out#0/video4linux2,v4l2 @ 0x63c4f5312b00] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=N/A bitrate=N/A speed=N/A
Conversion failed!
sabinefauresamlle@sabinefauresamlle-ThinkCentre-M700:~$ v4l2-ctl --list-devices
DSLR (platform:v4l2loopback-000):
/dev/video0
sabinefauresamlle@sabinefauresamlle-ThinkCentre-M700:~$ v4l2-ctl --list-devices
DSLR (platform:v4l2loopback-000):
/dev/video0
sabinefauresamlle@sabinefauresamlle-ThinkCentre-M700:~$ gphoto2 --stdout --capture-movie | ffmpeg -i - -c:v rawvideo -f v4l2 /dev/video0
Capturing preview frames as movie to 'stdout'. Press Ctrl-C to abort.
*** Error ***
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Device or resource busy). Make sure no other program (gvfs-gphoto2-volume-monitor) or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.
ERROR: Movie capture error... Exiting.
Movie capture finished (0 frames)
ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu3)
configuration: --prefix=/usr --extra-version=3ubuntu5 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --disable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
[in#0 @ 0x5968e464fd80] Error opening input: Invalid data found when processing input
Error opening input file -.
Error opening input files: Invalid data found when processing input

