v4l2rtspserver Discarding frame [SOLVED]

Forum for questions and support relating to the 1.29.x releases only.
Locked
thorus
Posts: 2
Joined: Thu Dec 29, 2016 3:04 pm

v4l2rtspserver Discarding frame [SOLVED]

Post by thorus »

Hi,

I have an raspberry pi with an Noir V2.1 attached, and want to integrate it into zoneminder. So I compiled v4l2rtspserver(https://github.com/mpromonet/v4l2rtspserver) to stream the captured video stream via rtsp to zoneminder.

I started the v4l2rtspserver via "v4l2rtspserver -F 30" and configured the webcam in zoneminder as follows:

Server: None
Source Type: Remote
Function: Monitor


Remote Protocol: RTSP
Remote Method RTP/Unicast
Remote Host Name: 192.168.99.230 (The IP of the rpi)
Remote Host Port: 8554
Remote Host Path: /unicast
Target colorspace: 32bit


I can play the stream with mpv just fine: mpv rtsp://192.168.99.230:8554/unicast

But with zoneminder I get no picture, and in the logs its periodically written:

Dec 29 16:12:47 zoneminder zmc[18281]: WAR [Discarding frame 691]
Dec 29 16:12:47 zoneminder zmc[18281]: WAR [Discarding incomplete frame 691, 0 bytes]

What could be the problem?

Thanks!

EDIT: Also tried with Remote Method: RTP/RTSP which fits better I guess, was confused by unicast. But the I get this in the logs:

Dec 29 17:13:55 zoneminder zmdc[18009]: INF [Starting pending process, zmc -m 1]
Dec 29 17:13:55 zoneminder zmdc[18009]: INF ['zmc -m 1' starting at 16/12/29 17:13:55, pid = 18945]
Dec 29 17:13:55 zoneminder zmdc[18945]: INF ['zmc -m 1' started at 16/12/29 17:13:55]
Dec 29 17:13:55 zoneminder undef[18945]: INF [No Server ID or Name specified in config. Not using Multi-Server Mode.]
Dec 29 17:13:55 zoneminder zmc[18945]: INF [Starting Capture version 1.29.0]
Dec 29 17:13:56 zoneminder zmc[18945]: ERR [Response parse failure, 2 bytes follow]
Dec 29 17:13:56 zoneminder zmc[18945]: ERR [2: 24 01]
Dec 29 17:14:05 zoneminder zmc[18945]: FAT [No RTSP sources]
Dec 29 17:14:05 zoneminder zmdc[18009]: ERR ['zmc -m 1' exited abnormally, exit status 255]
Last edited by thorus on Sat Dec 31, 2016 8:13 am, edited 1 time in total.
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: v4l2rtspserver Discarding frame

Post by knight-of-ni »

Here is how I built my rasp pi camera:
http://zoneminder.blogspot.com/p/rasbpe ... amera.html

Look at the systemd service file I created to see how I run v4l2rtspserver.

For ip cameras, always start with a remote type of ffmpeg when programming the camera in zoneminder. Only use the libvlc or remote source types when/if ffmpeg gives problems.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
thorus
Posts: 2
Joined: Thu Dec 29, 2016 3:04 pm

Re: v4l2rtspserver Discarding frame

Post by thorus »

Thanks for your help!

Now it is working, I guess the h264_i_frame_period was missing.
Locked