ffmpeg Blue Screen errros

Forum for questions and support relating to the 1.30.x releases only.
Locked
asantaga
Posts: 22
Joined: Sat Apr 13, 2013 12:47 am

ffmpeg Blue Screen errros

Post by asantaga »

Hi all,

Hoping someone can help.. I have used ZM for years using a USB and cheapo camera. I now have a nice 1080p MPEG camera outside and finding it and zoneminder struggle to work together and I regularly get the dredded blue screen :-(

Im thinking its probably because the wifi signal isnt the best but at the same time other (inferior) packages dont appear to have any issues.

Looking at the log file Im seeing its littered with error messages, sometimes its a signal loss then an unable to read the packet error etc etc.

Heres an example of what Im seeing

Code: Select all


DATE/TIME
COMPONENT	SERVER	PID	LEVEL	MESSAGE	FILE	LINE
2018-09-11 13:55:06.145364	zma_m11		3941	INF	BackCam: 1808 - Closing event 178845, signal loss	zm_monitor.cpp	1432
2018-09-11 13:55:06.100217	zma_m11		3941	WAR	Signal: Lost	zm_monitor.cpp	1429
2018-09-11 13:55:05.766789	zmc_m11		4333	ERR	Unable to read packet from stream 0: error -541478725 "End of file".	zm_ffmpeg_camera.cpp	167
2018-09-11 13:55:05.744873	zma_m11		3941	INF	BackCam: 1807 - Gone into alert state	zm_monitor.cpp	1704
2018-09-11 13:55:05.690818	zmc_m11		4333	INF	av_read_frame returned "End of file". Reopening stream.	zm_ffmpeg_camera.cpp	163
2018-09-11 13:55:05.010009	zma_m11		3941	INF	BackCam: 1806 - Opening new event 178845, alarm start	zm_monitor.cpp	1660
2018-09-11 13:55:04.900433	zma_m11		3941	INF	BackCam: 1806 - Gone into alarm state	zm_monitor.cpp	1614
2018-09-11 13:55:04.849034	zma_m11		3941	WAR	Signal: Reacquired	zm_monitor.cpp	1429
2018-09-11 13:55:04.661288	zmc_m11		4333	INF	Successfully reopened stream.	zm_ffmpeg_camera.cpp	134
2018-09-11 13:54:52.157712	zma_m11		3941	INF	BackCam: 1742 - Closing event 178844, signal loss	zm_monitor.cpp	1432
2018-09-11 13:54:52.113683	zma_m11		3941	WAR	Signal: Lost	zm_monitor.cpp	1429
2018-09-11 13:54:51.867964	zmc_m11		4333	ERR	Unable to read packet from stream 0: error -541478725 "End of file".	zm_ffmpeg_camera.cpp	167
2018-09-11 13:54:51.824591	zmc_m11		4333	INF	av_read_frame returned "End of file". Reopening stream.	zm_ffmpeg_camera.cpp	163
2018-09-11 13:54:51.089140	zmaudit		5301	INF	Deleted 75 log table entries by time	zmaudit.pl	
2018-09-11 13:54:42.373270	zmeventnotification		5291	INF	Broadcasting new events to all 0 websocket clients	zmeventnotification.pl

I also regularly see

Code: Select all

2018-09-11 13:51:56.637063	zmc_m11		4334	ERR	Unable to open input rtsp://xxx:yyyy@192.168.0.26:554/11 due to: Operation now in progress	
and others..

As for settings

sourcetype=Ffmpeg
analysis fps=3.0
max fps =7 (Camera is set to max 5fps)
alarm max = 5

Sourcepath = rtsp://admin:xxxx8@192.168.0.26:554/11
remoteMethod= tcp

Buffers
- Image Buffer Size (frames) 50
- Warmup Frames 25
- Pre Event Image Count 25
- Post Event Image Count 25
- Stream Replay Image Buffer 1000
- Alarm Frame Count 1


Any advice?
I was thinking of trying out the beta of ZM 1.32, but not 100% sure how a) stable it is and b) how to install

Any advice?

My alternative is to move to something like shinobi,xeoma or something, but I like ZM, and been with me for a long time!
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ffmpeg Blue Screen errros

Post by bbunge »

First, blank out these settings.
analysis fps=
max fps =
alarm max =

In your camera set the key frame interval to send a full frame more often.

Check the camera resolution with VLC, (Tools, Media Information, Codec) to check camera Display Resolution. You can then set the resolution in Zoneminder to those values or divide them by half or quarter to reduce load.

ZM 1.32.0 will be released Wednesday but if you are having issues with this version the same will happen in 1.32.0
asantaga
Posts: 22
Joined: Sat Apr 13, 2013 12:47 am

Re: ffmpeg Blue Screen errros

Post by asantaga »

oooo Wednesday!!! OK, I'll try your suggestions first..

thanks
asantaga
Posts: 22
Joined: Sat Apr 13, 2013 12:47 am

Re: ffmpeg Blue Screen errros

Post by asantaga »

I thought best practice was to set the max fps to a number slightly higher than the camera fps to stop ZM going nuts if the camera went offline?

Also I checked the keyframe interval and its set to 10, so every 10 frames it sends a key frame isnt that already quite low?

Regardless Ive set it to 3 and also set the bitrate to 1000, it was 2000... ( it can go from 32Kbps to 6000kbps)

lets see what that does
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ffmpeg Blue Screen errros

Post by bbunge »

asantaga wrote: Tue Sep 11, 2018 4:51 pm I thought best practice was to set the max fps to a number slightly higher than the camera fps to stop ZM going nuts if the camera went offline?

Also I checked the keyframe interval and its set to 10, so every 10 frames it sends a key frame isnt that already quite low?

Regardless Ive set it to 3 and also set the bitrate to 1000, it was 2000... ( it can go from 32Kbps to 6000kbps)

lets see what that does
And, what did VLC say the camera resolution was?
asantaga
Posts: 22
Joined: Sat Apr 13, 2013 12:47 am

Re: ffmpeg Blue Screen errros

Post by asantaga »

VLC Codec Info confirms the camera resolution is 1920x1080

Still not working though :-(
asantaga
Posts: 22
Joined: Sat Apr 13, 2013 12:47 am

Re: ffmpeg Blue Screen errros

Post by asantaga »

Current Settings are


Camera
- 5 FPS
- 1000 kbps Bitrate
- 10
- VBR (CBR also available)
- image quality=3 (out of 6)
- resolution 1920x1080 (confirmed by VLC)


Zoneminder
- SourceType= ffmpeg
- Function Mocord
- Max FPS 7 (so when the signal dies I dont kill the CPU - happened before)
Ref Image Blend = 12.5%
Alarm Image 12.5%
Source = rtsp://admin:xxxxx@192.168.0.26:554/11
remote Method= tcp
Width=1920
Height=1080

The rest all default
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ffmpeg Blue Screen errros

Post by bbunge »

Please give this a try.

Source Type Remote
Remote Protocol RTSP
Remote Method RTP/RTSP
Remote Host Name 192.168.0.26
Remote Host Port 554
Remote Host Path /11?user=admin&pwd=xxxxx
Target Colorspace 32 bit color
capture width 1920
capture height 1080

also try 960x540 resolution
asantaga
Posts: 22
Joined: Sat Apr 13, 2013 12:47 am

Re: ffmpeg Blue Screen errros

Post by asantaga »

thanks bbunge, I think I tried the remote+rtsp apporach when I first got the camera and it didnt work well at all. I'll however give it a go..
Ive also put a WIFI repeater close to the camera to help boost the signal. The only issue where is that the wifi repeater is in the same room as the WIFI router so thats gonna be fun!

Thanks again..

On a side note, have you heard/seen when we'll be seeing an ubuntu package for the latest ZM (1.32) , be nice to try it on the latest and greatest.

thanks again
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ffmpeg Blue Screen errros

Post by bbunge »

What is the make/model of the camera? Also possible there could be issues with your WIFI settings. May sound counter productive but set your 2.4 GHZ band in the router to 20 MHZ bandwidth. Also look for settings like Airtime Fairness and turn them off.

Source code for 1.32.0 was released to the package maintainers on 12SEP. I'm waiting to test as soon as it hits the PPA/repository.
asantaga
Posts: 22
Joined: Sat Apr 13, 2013 12:47 am

Re: ffmpeg Blue Screen errros

Post by asantaga »

thanks,

the camera is iegeek outdoor camera. (http://www.iegeek.com) but these guys just rebadge it..

Also my virgin media doesnt support the ability to change bandwidth or airtime fairness..

I'll see how the above settings goes..
Locked