rc cameras, section 'video conferencing'. ffmpeg/v4l2 options currently still valid?

Ulrich Salaschek <[email protected]>
Newsgroups gmane.comp.multimedia.gphoto.devel
Message-ID <[email protected]>
Hi to all,

first, the obligatory Thank You for gphoto!!

using a command from the wiki, I encountered an error message though, 
aiming to use my Nikon D7100 as a webcam.

When running
$ gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo 
-pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
the camera's mirror opens but then gphoto aborts with the following 
error message from ffmpeg/v4l2


[error message]
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt 
yuv420p -threads 0 -f v4l2 /dev/video0
ffmpeg version 4.4-6ubuntu5 Copyright (c) 2000-2021 the FFmpeg developers
   built with gcc 11 (Ubuntu 11.2.0-7ubuntu1)
   configuration: --prefix=/usr --extra-version=6ubuntu5 
--toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu 
--incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl 
--disable-stripping --enable-gnutls --enable-ladspa --enable-libaom 
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca 
--enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite 
--enable-libfontconfig --enable-libfreetype --enable-libfribidi 
--enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame 
--enable-libmysofa --enable-libopenjpeg --enable-libopenmpt 
--enable-libopus --enable-libpulse --enable-librabbitmq 
--enable-librubberband --enable-libshine --enable-libsnappy 
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh 
--enable-libtheora --enable-libtwolame --enable-libvidstab 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 
--enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq 
--enable-libzvbi --enable-lv2 --enable-omx --enable-openal 
--enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx 
--enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm 
--enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r 
--enable-libx264 --enable-shared
   libavutil      56. 70.100 / 56. 70.100
   libavcodec     58.134.100 / 58.134.100
   libavformat    58. 76.100 / 58. 76.100
   libavdevice    58. 13.100 / 58. 13.100
   libavfilter     7.110.100 /  7.110.100
   libswscale      5.  9.100 /  5.  9.100
   libswresample   3.  9.100 /  3.  9.100
   libpostproc    55.  9.100 / 55.  9.100
Nehme Vorschaubilder als Film in 'stdout' auf. Drücke Ctrl-C zum abbrechen.
[mjpeg @ 0x5633a608f440] Format mjpeg detected only with low score of 
25, misdetection possible!
Input #0, mjpeg, from 'pipe:':
   Duration: N/A, bitrate: N/A
   Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, 
bt470bg/unknown/unknown), 640x360, 25 tbr, 1200k tbn, 25 tbc
Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg (native) -> rawvideo (native))
[swscaler @ 0x5633a60f7b80] deprecated pixel format used, make sure you 
did set range correctly
[video4linux2,v4l2 @ 0x5633a6092f40] ioctl(VIDIOC_G_FMT): Invalid argument
Could not write header for output file #0 (incorrect codec parameters 
?): Invalid argument
Error initializing output stream 0:0 --
Conversion failed!
[/error message]


Help is appreciated.
Kind regards
Ulrich



Running Ubuntu 21.10 with Kernel 5.13.0-22
v4l2loopback kernel module is installed and loaded alongside videodev
$ gphoto2 --summary displays the camera infos correctly
$ gphoto2 --capture-image-and-download and other commands work as expected

Versions:
This version of gphoto2 is using the following software versions and 
options:
gphoto2         2.5.27         gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2      2.5.27         standard camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 
usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking



_______________________________________________
Gphoto-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.