I open 2 tabs of Terminal in my Ubuntu Desktop.
In Terminal tab 1 I run netcat -l -p 5000 | mplayer -fps 60 -cache 2048 - and in
Terminal tab 2 I log in RPi 3B+ with Buster 32-bit via ssh and run
raspivid -t 0 --width 1280 --height 720 -o – | nc 192.168.1.33 5000
Immediately I get camera live from the Pi camera to the Ubuntu screen.
I have another card with a fresh installation of Bullseye 64-bit so I tried the same but replacing raspivid by libcamera-vid
I get:
Preview window unavailable
[0:05:48.051301446] [2579] INFO Camera camera_manager.cpp:293 libcamera v0.0.1+54-d528119f
[0:05:48.132842448] [2590] INFO RPI raspberrypi.cpp:1414 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media3 and ISP device /dev/media0
[0:05:48.134615487] [2579] INFO Camera camera.cpp:1026 configuring streams: (0) 1280x720-YUV420
[0:05:48.135269328] [2590] INFO RPI raspberrypi.cpp:800 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1920x1080-SGBRG10_1X10 - Selected unicam format: 1920x1080-pGAA
But I don't get live camera.
I also tried
libcamera-vid --timeout 0 --framerate 5 --nopreview --codec h264 --profile high --intra 5 --width 1280 --height 720 --output – | nc 192.168.1.33 5000
and the output is:
[26:05:32.265422903] [320017] INFO Camera camera_manager.cpp:293 libcamera v0.0.1+54-d528119f
[26:05:32.373530413] [320023] INFO RPI raspberrypi.cpp:1414 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media3 and ISP device /dev/media0
Mode selection:
SGBRG10_CSI2P 640x480 - Score: 6093.33
SGBRG10_CSI2P 1296x972 - Score: 4400.33
SGBRG10_CSI2P 1920x1080 - Score: 3250
SGBRG10_CSI2P 2592x1944 - Score: 4967.33
Stream configuration adjusted
[26:05:32.386422975] [320017] INFO Camera camera.cpp:1026 configuring streams: (0) 1280x720-YUV420 (1) 1920x1080-SGBRG10_CSI2P
[26:05:32.387950261] [320023] INFO RPI raspberrypi.cpp:800 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1920x1080-SGBRG10_1X10 - Selected unicam format: 1920x1080-pGAA
No output at all.
When I CONTROL-C libcamera-vid then netcat in Terminal tab 1 also exits.
UPDATE 1:
I tried the same thing from a laptop with Linux Mint I usually use in the field for that purpose and
libcamera-vid -t 0 --width 1280 --height 720 -o – | nc 192.168.1.33 5000 worked okay.
I'll make updates again in Ubuntu and retry...
Now I'm getting nc: port number invalid: /home/pi
(Laptop's ssh session is closed)
Finally I've just erased the nc command nc 192.168.1.33 5000 and wrote it again and it worked (!) I have live view now.