Even though go pro is being detected, I get video IO error when I am trying to access it from a script.
I can’t answer the video part, but I want to point out that there is an earlier kernel module load error. It fails to find bcm2835-v4l2
. The kernel is “uname -r
” of “4.9.337-tegra
”, which seems correct. Do you see a number of kernel modules in subdirectories of this base directory:
/lib/modules/4.9.337-tegra/kernel
If that is missing all kernel modules, then I’d say the new kernel failed to install modules. If there are modules there, then what other subdirectories are visible at:
/lib/modules
Within those other module directories (if any), do you see anything named “bcm2835-v4l2*
”? Example:
cd /lib/modules
find . -name '*bcm2835*'
Also, what is the output of “lsmod
”? I don’t know which modules are required for that camera, but someone who does answer will want to know if the modules are all present.
hello sadiac,
may I know what’s the physical setup you’re used to fetch the stream via GoPro?
I was able to get it to stream a few months ago but now I am trying to redo it and I am having these issues. I have only just connected it through a USB cable.
Not sure, but it may involve some software such as ffmpeg and v4l2loopback for having that working.
It may depend on your actual GoPro model (note that I have none, so my understanding may just be speculation), but IIRC my understanding was that there was an IP connection over USB, GoPro was streaming RTP/MP2T over UDP. Software such as this may use ffmpeg for decoding and feed a v4l2loopback virtual video node as /dev/video42 as show your logs.
Do you have v4l2loopback module built ?
If yes, what version ?
Is the module loaded beforehand and /dev/video42 created ?
If not try:
sudo modprobe v4l2loopback video_nr=42
Also note that video number 42 may not be the easiest way, as there might be many warning messages about all video nodes missing from next to last real camera up to 42… If you don’t have another camera, you may change the script for running into /dev/video0 (You would change https://github.com/jschmid1/gopro_as_webcam_on_linux/blob/24a5e04e96aaa68dddc356e9fd491d73a396c55c/gopro#L48 and may be more).
Also note that ffmpeg decoding would be CPU-based, and v4l2loopback may also result in significant CPU load at high pixel rate. You may get better HW leveraging with gstreamer.
You may better tell your case for better advice.
I have the v4l2loopback module built. I am actually new to linux so I am having a hard time describing the issues. I tried what you suggested, nothing happens. I tried following this with no luck GitHub - jschmid1/gopro_as_webcam_on_linux: Allows to use your GoPro camera as a webcam on linux.
This isn’t specifically for the problem, but I’m going to add some information you might want to know for this…
The kernel has the drivers for most hardware. The kernel itself is more or less a large file with a number of drivers and the software that makes it all work together. This is available in the form of source code, but you would need to configure it before compiling (there are a LOT of options). In most cases you have the option to build an entire kernel or build a driver as a module. The former isn’t necessarily hard, but install is a bit involved, whereas the latter is quite simple to install.
When someone suggests using “lsmod
” and asking for the result, it is to see what modular format drivers are actually running (you ran modprobe
earlier, which tries to configure for the kernel to see the modules correctly; this is needed before a module can load, but it doesn’t necessarily cause load so much as it configures for it…if the hardware is present it probably would load, but I was curious if the driver actually made its way in).
If someone asks to see some command related to “/proc/config.gz
”, then it means they’re asking to see some specific configuration of the main (integrated, non-modular) kernel image (usually in a file “Image
” for a Jetson). That file is actually not a real file, but the kernel pretending to be a file as a way to publish its configuration. An example to look for the configuration of a feature with the name “bcm2835”, case-insensitive, is:
zcat /proc/config.gz | grep -i 'bcm2835'
The result of the above might be important since you were trying to modprobe
, it would confirm if the driver is configured, and if it is, whether it is in the form of a module. It’d be quite useful to know the configuration of that driver in the integrated kernel Image
, plus whether (if module format) it actually loaded.
I may help for decoding with gstreamer.
What gives:
gst-discoverer-1.0 'udp://@0.0.0.0:8554'
# Or
gst-discoverer-1.0 'udp://0.0.0.0:8554'
# Or
gst-discoverer-1.0 'udp://@0.0.0.0:8554?overrun_nonfatal=1&fifo_size=50000000'
# Or
gst-discoverer-1.0 'rtsp://0.0.0.0:8554?overrun_nonfatal=1&fifo_size=50000000'
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.