FFMPEG IP Camera Buggy Snapshots

Forum for questions and support relating to the 1.30.x releases only.
Tuxxin
Posts: 14
Joined: Fri Jan 06, 2017 3:09 pm

FFMPEG IP Camera Buggy Snapshots

Post by Tuxxin »

I'm getting a weird problem on many of my IP cameras at random times. Can anyone give me an idea of what could cause the problem with the attached image?
Attachments
zm-problem-1.jpg
zm-problem-1.jpg (59.93 KiB) Viewed 8668 times
mikb
Posts: 600
Joined: Mon Mar 25, 2013 12:34 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by mikb »

Is any of this helpful ?

search.php?keywords=ffmpeg+smearing
Tuxxin
Posts: 14
Joined: Fri Jan 06, 2017 3:09 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by Tuxxin »

I'm sure it will, I wasn't aware it was called smearing. Thank you.
Tuxxin
Posts: 14
Joined: Fri Jan 06, 2017 3:09 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by Tuxxin »

So I've been playing with this and it seems changing the colorspace from 32bit to 24 bit has made them much more stable. Now I'm seeing glitches on the screen that are not as severe, is this also called smearing?
Attachments
2017-03-08 14_27_30.jpg
2017-03-08 14_27_30.jpg (204.33 KiB) Viewed 8654 times
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: FFMPEG IP Camera Buggy Snapshots

Post by SteveGilvarry »

That is more like an artefact maybe caused by some missing data in the stream. Try the setting below if not already.

Smearing becomes a bigger issue with high res cameras running in UDP mode, it fills the buffers and image just finishes on the last row of pixels it got and it's like someone smeared the image down the page. For me swapping to Remote Method in the ffmpeg monitor to RTP/RTSP seemed to have the best results, you will see references to putting ?tcp in the url, this setting does that in the FFmpeg API.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Tuxxin
Posts: 14
Joined: Fri Jan 06, 2017 3:09 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by Tuxxin »

Yeah I'm still having a lot of problems with the system. I have the cameras set to run on TCP, but you can see my settings below. I have also attached a few screenshots.
Attachments
Settings
Settings
2017-03-17 10_13_55.jpg (34.92 KiB) Viewed 8570 times
Unknown cause?
Unknown cause?
2017-03-17 10_13_20.jpg (76.73 KiB) Viewed 8570 times
MOCORD - All events are smears/artifacts.
MOCORD - All events are smears/artifacts.
2017-03-17 10_13_10.jpg (11.66 KiB) Viewed 8570 times
Tuxxin
Posts: 14
Joined: Fri Jan 06, 2017 3:09 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by Tuxxin »

I'm running 2.6.4, I'll try updating now.
Tuxxin
Posts: 14
Joined: Fri Jan 06, 2017 3:09 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by Tuxxin »

3.2.4 is now installed, I'm cleaning the events and I'll update within the next few days. I appreciate your input.
Tuxxin
Posts: 14
Joined: Fri Jan 06, 2017 3:09 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by Tuxxin »

Well I let it run over the weekend, it doesn't have seemed to have helped. 423 events and 419 events on the 2 active cameras.
Attachments
2017-03-20 10_03_47.jpg
2017-03-20 10_03_47.jpg (32.2 KiB) Viewed 8538 times
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: FFMPEG IP Camera Buggy Snapshots

Post by SteveGilvarry »

Tuxxin,
From your screenshot Remote Method = RTP/Unicast is still UDP. Change that to RTP/RTSP.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Tuxxin
Posts: 14
Joined: Fri Jan 06, 2017 3:09 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by Tuxxin »

Thank you, I have updated them to RTP/RTSP and cleared the events again.
DoubleHP
Posts: 18
Joined: Fri Sep 02, 2016 1:13 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by DoubleHP »

I have similar issue: only happens on some cheap cams; some cams never have the trouble; some cams aways do.

Cams that have the bug usually have 60% or 70% top image fine; and bottom is garbage. For these cams, the image is always perfect when I view the cam via it's internal website: the defect is not in the CCD; and my browser can correctly decode the stream, when accessed directly.

Debian stretch
ffmpeg 3.2.4-1 is giving much better than 3.2.2 ...
johnnytaco
Posts: 26
Joined: Sun Feb 26, 2017 3:16 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by johnnytaco »

DoubleHP - same problem here, noted in another thread related to Reolink cameras. The stream is also fine via VLC while the smearing occurs in ZoneMinder.

The fix for me has been to change all my source types to Remote. I have yet to see smearing with it (vs ffmpeg).

jt
DoubleHP
Posts: 18
Joined: Fri Sep 02, 2016 1:13 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by DoubleHP »

For me, using RTP-RTSP is much better than Unicast.

Johny, not sure what you call remote.
pgrunwald
Posts: 71
Joined: Mon Mar 06, 2017 9:26 pm

Re: FFMPEG IP Camera Buggy Snapshots

Post by pgrunwald »

DoubleHP wrote:
Debian stretch
ffmpeg 3.2.4-1 is giving much better than 3.2.2 ...

Confirmed. I looked through the changes but could not really find anything that accounts for the better performance but they are working hard!

https://git.videolan.org/?p=ffmpeg.git; ... ags/n3.2.4
Locked