TCP streaming not recording video

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
bosun
Posts: 13
Joined: Fri Jan 12, 2024 5:24 pm

TCP streaming not recording video

Post by bosun »

I have an x86 Core i5 16GB RAM running fully updated Ubuntu Desktop 22.04 LTS running Zoneminder 1.36.33. Into this I successfully stream from several Raspberry Pi 4's with Camera V2.1 rtsp video, which records video in 9 second bursts.

I have a Raspberry Pi 5 8GB with a Camera Module 3, with a fully updated RPiOS 64- bit Bookworm, which does not stream rtsp, but does stream tcp successfully to other raspberry Pi's. This appears to successfully stream tcp to my ZM server using the code below.

The streamer code:

Code: Select all

rpicam-vid -t 0 --libav-format mpegts --width 1920 --height 1080 --listen -o "tcp://0.0.0.0:8080?listen=1"
The ZM server entries are:
General:

Name= Monitor-1
Notes= blank
Server= None
Source Type = Ffmpeg
Function= Monitor

Analysis FPSs = blank
Maximum FPSs = blank
Alarm Maximum FPSs = blank
Reference Image Blend %ges = 6.25% (Indoor)
Alarm Reference Image Blend %ges = 6.25%
Triggers = None available

Source:

Source Path = tcp://192.168.1.23:8080
Method = TCP
Options = blank
SourceSecondPath = blank
DecoderHWAccelName = blank
DecoderHWAccelDevice = blank
Target colorspace = 32 bit colur
Capture Resolution (pixels) = 1920 1080 1920x1080 1080p
Preserve Aspect Ratio = blank
Orientation = Normal
Deinterlacing = Disabled
The Function column indicates: Modetect / Capturing 30.01/0.00 fps 705.92kB/s - I am confused by the 0.00 number.

I can see video displayed onscreen, but it does not record video. 'Events' has entries, but they appear as failures, with a black screen image showing:

Code: Select all

Can't open /var/cache/zoneminder/events/3/2024-01-28/7878/00003-capture.jpg: No such file or directory
Is this likely to be to do with my stream or the ZM server settings? Any ideas?
dougmccrary
Posts: 1271
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: TCP streaming not recording video

Post by dougmccrary »

Source Path = tcp://192.168.1.23:8080
:8080 would more likely be http://....

TCP is a method, not a protocol.
bosun
Posts: 13
Joined: Fri Jan 12, 2024 5:24 pm

Re: TCP streaming not recording video

Post by bosun »

Thank you for the speedy reply. The 8080 port seems to work, even if it is not http - could this be the cause of the lack of video?

I do not understand your comment
TCP is a method, not a protocol
In the Source tab of the camera settings the second section down is labelled Method, and provides a pull down list of 4 protocols from which one can select: TCP, UDP, UDP Multicast and HTTP Tunnel. I select TCP ie Transmission Control Protocol.
bosun
Posts: 13
Joined: Fri Jan 12, 2024 5:24 pm

Re: TCP streaming not recording video

Post by bosun »

I have now managed to get my ZM server to successfully record video from a Raspberry Pi 5 using a Camera Module 3 by using the following options:

Raspberry Pi 5 camera:

Code: Select all

rpicam-vid -t 0 --libav-format mpegts --width 1280 --height 720 --framerate 15 --listen -o "tcp://0.0.0.0:8080?listen=1"
ZM server

Code: Select all

Source Path: tcp://192.168.1.23:8080
Method (?) : TCP
Options (?) : -vf "setpts=N/15" -fflags nobuffer -flags low_delay -framedrop
Thank you.
mikb
Posts: 622
Joined: Mon Mar 25, 2013 12:34 pm

Re: TCP streaming not recording video

Post by mikb »

bosun wrote: Mon Jan 29, 2024 2:03 pm Thank you for the speedy reply. The 8080 port seems to work, even if it is not http - could this be the cause of the lack of video?

I do not understand your comment
TCP is a method, not a protocol
In the Source tab of the camera settings the second section down is labelled Method, and provides a pull down list of 4 protocols from which one can select: TCP, UDP, UDP Multicast and HTTP Tunnel. I select TCP ie Transmission Control Protocol.
Glad you've got it working, but note the important distinction that was made. It is labelled METHOD and provides you a list of 4 METHODS (not protocols) ... TCP / UDP etc. etc.

http:// is a protocol. As is rtsp:// or ftp:// or many others. The protocol is what you say. The method is how you say it ;)

tcp://something as a URL doesn't make sense to me, and is not something I've seen used before.
Post Reply