Motion - Bug Report 2008x 09x 28x 002613
You are here: Foswiki>Motion Web>BugReports>BugReport2008x09x28x002613 (21 Mar 2010, AngelCarpintero)Edit Attach

BUG: strict jpg quality check doesn't work

I'm using two grantec ipcam II as netcams. I access a picture, not a movie. Sometimes the jpg is read incomplete, so there is a big error in the bottom of the picture. Unfortunately this triggers motion detection. I tried netcam_tolerant_check on/off, but in both cases the bad pics appear. (about 5 bad pics per hour average) I also own a 9100a videolan-server which doesn't suffer this problem on the same setup.

Environment

Motion version: 3.2.11
ffmpeg version: 4.9.1
Shared libraries: ffmpeg
Server OS: OpenSuse 10.3, kernel 2.6.22

-- JudasHui - 28 Sep 2008

Follow up

I don't see anything interesting in your debug .... you should try to get the return code from those "corrupted" images.

So netcam_tolerant_check option doesn't handle all errors , only some warnings to don't return a fatal error. In your case what do you get ?

- Corrupt end of image ?

- Content-length !!= Image size ?

- Missing jpeg markers, headers ,etc ?

-- AngelCarpintero - 28 Sep 2008

Follow up

I see missing data and the end of some frames , but not sure if because missing data , bad jpeg markers .

I try to find something interesing in your log file , but time of video and log is not matching at all :

Camera : Date: Tue, 30 Sep 2008 17:39:53 GMT

Video : 2008 18:44:53 - 2008 18:46:xx

Probably you sent me a wrong log file ... so please attach your config files and try to send a log file with a video with time synced , NTP in computer

and netcam will help.

A suggestion , grandtec is well know that have broken firmwares , probably you can find some hacked firmware with a lot of fixes.

-- AngelCarpintero - 01 Oct 2008

Follow up

20081008: I did some further tests with some printf within the code.

Although I get messages like "fake EOI inserted" or "Corrupt jpg detected", the error information is not propagated to the next level, so the motion processing triggers unwanted. I must admit that I haven't understood the error propagation mechanism completely, so that I could try some fix on my own.

Follow up

"fake EOI inserted" is not an error , some image miss that marker but are good.

"Corrupt jpg detected" : That's an error ... probably looking at your videos reason is your camera because not sending the complete image so

content-lenght not satisfied ( buggy cam ? )

-- AngelCarpintero - 10 Oct 2008

Follow up

I see "Corrupt Jpeg data: premature end of data segment" and the picture shows that some data was missing in the middle of the jpeg. Unfortunately I didn't manage to get a fixed firmware yet, so my hope is to get motion ignore pictures which were found bad during decompression. Within netcam.c I saw a "FIX ME" which exactly claims a missing check for this kind of errors. Is there a beta awailable where this FIXME is fixed ?

-- JudasHui - 10 Oct 2008


I can add a patch against trunk version to skip images with critical errors , so they won't produce false detection.

-- AngelCarpintero - 18 Oct 2008

Fix record

Closed , reopen if still problem remains in trunk.

-- AngelCarpintero - 21 Mar 2010

BugReportForm edit

TopicTitle strict jpg quality check doesn't work
BugStatus Rejected
AssignedBugTo AngelCarpintero
SubmittedBy JudasHui
Topic attachments
I Attachment Action Size Date Who Comment
motionlog.zipzip motionlog.zip manage 672 K 30 Sep 2008 - 17:53 UnknownUser two corrupted movies and the according logfile
Topic revision: r10 - 21 Mar 2010, AngelCarpintero
Copyright © 1999-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.