server: cat /dev/video0 | nc <laptop ip> <port>
client: nc -l -p <port> | mplayer -- -# aptitude install v4l2loopback-dkms# make./v4l2lepton /dev/videoXOnce this is done reboot.Go here and download the zip and unzip it anywhere. Make sure you sudo everything
Hi,
thank you so much for your support and your efforts! I finally got the V4L2Loopback running
and can view the thermal image with VLC Media Player on my raspberry pi 2.
The next step is to display the image in Matlab Simulink using the raspberry support package,
but I dont know if its even possible to do this.
My raspberry is connected to the host computer via ethernet cable and I can successfully ping
the raspberry, thats why I guess the setup should work like this. In the matlab raspberry tutorial they're
using an ethernet-to-USB dongle, but I dont know why an ethernet cable would be inappropriate.
Unfortunately the SDL Video display block is only showing some kind of test image that is
moving a bit or flickering/jittering, sorry it's hard for me to find the right words to describe (see
below) when the simulink file is running. I'm not quite sure if the pixel format (RGB) is correct.
The other option is YCbCr 4:2:2. Maybe it is necessary to do a colour space conversion in
matlab before displaying it? How can I determine what kind of pixel format is coming from
the raspberry via the V4L2loopback in /dev/video0? Maybe also the sample time isn't
correct at all?!
Thank you very much in advance.
Ron
v4l2-ctl -d /dev/video0 --list-formats
For example, a simple solution could have been:
On the pi connected to the PT1:
sudo su
cat /dev/video0 | nc -u 192.168.1.xxx 8000
and on the target:
nc -lu -p 8000 > a.mjpg | mplayer -cache 32 -vo gl -demuxer lavf a.mjpg
but i get /dev/vidoe0 invalid argument.
This works with the pi camera using raspivid as detailed here https://www.raspberrypi.org/forums/viewtopic.php?f=26&t=7557
I have also tried gstreamer (based on the example here https://github.com/groupgets/purethermal1-uvc-capture) and other examples I have found for streaming video from a webcam using various programs but none of them have worked.