Page 1 of 2

FFMPEG IP Camera Buggy Snapshots

Posted: Wed Mar 08, 2017 5:59 pm
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?

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Wed Mar 08, 2017 6:19 pm
by mikb
Is any of this helpful ?

search.php?keywords=ffmpeg+smearing

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Wed Mar 08, 2017 6:24 pm
by Tuxxin
I'm sure it will, I wasn't aware it was called smearing. Thank you.

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Wed Mar 08, 2017 7:42 pm
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?

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Fri Mar 17, 2017 12:56 pm
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.

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Fri Mar 17, 2017 2:15 pm
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.

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Fri Mar 17, 2017 3:31 pm
by Tuxxin
I'm running 2.6.4, I'll try updating now.

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Fri Mar 17, 2017 4:18 pm
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.

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Mon Mar 20, 2017 2:05 pm
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.

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Mon Mar 20, 2017 8:31 pm
by SteveGilvarry
Tuxxin,
From your screenshot Remote Method = RTP/Unicast is still UDP. Change that to RTP/RTSP.

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Tue Mar 21, 2017 5:34 pm
by Tuxxin
Thank you, I have updated them to RTP/RTSP and cleared the events again.

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Thu Mar 30, 2017 9:59 am
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 ...

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Thu Mar 30, 2017 12:52 pm
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

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Thu Mar 30, 2017 3:49 pm
by DoubleHP
For me, using RTP-RTSP is much better than Unicast.

Johny, not sure what you call remote.

Re: FFMPEG IP Camera Buggy Snapshots

Posted: Thu Mar 30, 2017 7:34 pm
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