Ffmpg image distortion

Forum for questions and support relating to the 1.29.x releases only.
Locked
algae
Posts: 16
Joined: Fri Jun 03, 2016 1:55 am

Ffmpg image distortion

Post by algae »

Hi, I'm running zoneminder 1.29 on Raspbian (RP 3b). I'm having an issue where the video gets distorted periodically, every couple minutes. This will often look like half the picture is smeared. It clears quickly but causes a motion alert. The same cameras set to remote and RTSP don't experience this issue but produce constant log entries stating "error while decoding frame...". I wouldn't mind ignoring these errors but one of my cameras will only work with ffmpg. I have found that if I lower the bit rate substantially on the ffmpg connected camera there is less issue but it's to the point of poor video quality.

I understand I'm working with limited resources on the PI but it doesn't appear to be sweating the load. CPU utilization hovers around 50% and I've got it booting from a USB hard drive so disk access is a bit more reasonable.

Any suggestions on where I should check? Thanks!
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Ffmpg image distortion

Post by PacoLM »

Slow down the FPS in the camera side and leave blank the FPS settings on the ZM monitor side. Usually works.

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
algae
Posts: 16
Joined: Fri Jun 03, 2016 1:55 am

Re: Ffmpg image distortion

Post by algae »

Thanks for the suggestion. I already have the FPS down to 5 but still have the issue.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ffmpg image distortion

Post by bbunge »

What camera are you using? Smearing can be frustrating...

bb
algae
Posts: 16
Joined: Fri Jun 03, 2016 1:55 am

Re: Ffmpg image distortion

Post by algae »

they're all Amcrest cameras, different models. All of them will experience this issue when connecting via ffmpeg but one of them will only work via ffmpeg. the others work via "direct".
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Ffmpg image distortion

Post by bbunge »

algae wrote:they're all Amcrest cameras, different models. All of them will experience this issue when connecting via ffmpeg but one of them will only work via ffmpeg. the others work via "direct".
What is the model of the camera causing problems?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Ffmpg image distortion

Post by knight-of-ni »

The ffmpeg smearing/tearing/distorted issue is a common problem and has been reported in this forum many times.
For some, simply changing from UDP to TCP clears up the issue. To do that, change your remote method from RTP/Unicast to RTP/RTSP.

You could also try the libvlc source type
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/
algae
Posts: 16
Joined: Fri Jun 03, 2016 1:55 am

Re: Ffmpg image distortion

Post by algae »

Kninggett, thanks for TCP suggestion, I will give it a shot. I had already tried libvlc, the camera doesn't work at all.

bbunge, I experience the issue on 3 Amcrest cameras - models are IP2M-844E, IP3M-954E and IPM-722S.
algae
Posts: 16
Joined: Fri Jun 03, 2016 1:55 am

Re: Ffmpg image distortion

Post by algae »

Changing to TCP took care of it. Thanks!
Locked