This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 12 - Pages: 1 - Last Post: 24-Sep-2019 21:07 Last Post By: RobM
MarkusD

Posts: 457
Registered: 13-Apr-2006
Detecting „broken“ images, how to?
Posted: 23-Sep-2019 19:02
 
  Click to reply to this thread Reply
Hi,

recently I started to download web cam pictures with a tool. Some downloaded pictures are kind of broken. The obvious ones are 0 KB in size, that's easy to detect and to delete them. But there are also a lot which are not ok. The goal is to „compile“ a video out of the pictures, but ffmpeg reports some errors, where its not clear which files are involved. So, the question is, do you know any tool (standalone application for Windows) to detect broken pictures (JPG or PNG) out of some ten thousands of pictures? I uploaded a pack of some broken pictures, here.

Thanks in advance, Markus
RobM

Posts: 3,107
Registered: 4-Aug-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 19:08   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Maybe it is poor download tool and another one might be better than wading through the bad images?

Curious too as to the error ffmpeg gives, and is that via the command line, jAlbum or some other application?
MarkusD

Posts: 457
Registered: 13-Apr-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 19:28   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Maybe it is poor download tool and another one might be better than wading through the bad images?
Currently I use SeqDownload (from NirSoft) for some dozen different cams, but only a few cams do produce broken images at all. So I assume the web cam itself is not very reliable.

Curious too as to the error ffmpeg gives, and is that via the command line, jAlbum or some other application?
Yes it is via the command line. I can't give you an example right now, because my hard drive with the pictures just died some hours ago. ;-) But the code I use looks like here (scroll down to near the bottom of the page)
RobM

Posts: 3,107
Registered: 4-Aug-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 19:40   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
Yes it is via the command line. I can't give you an example right now, because my hard drive with the pictures just died some hours ago. ;-) But the code I use looks like here (scroll down to near the bottom of the page)
Is your hard drive dying maybe the cause of the broken images, dodgy file sectors etc.?
MarkusD

Posts: 457
Registered: 13-Apr-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 21:30   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
MarkusD wrote:
Yes it is via the command line. I can't give you an example right now, because my hard drive with the pictures just died some hours ago. ;-) But the code I use looks like here (scroll down to near the bottom of the page)
Is your hard drive dying maybe the cause of the broken images, dodgy file sectors etc.?
No no. ;-) I'm storing the pictures on my NAS, which is healthy. ;-)
MarkusD

Posts: 457
Registered: 13-Apr-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 21:37   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
The problem cams are:
https://sortland-havn.no/webcamera/havnnord.jpg
https://sortland-havn.no/webcamera/havsor.jpg

Right now I collected some 125,000 files, and these two cams make the most trouble at all.
RobM

Posts: 3,107
Registered: 4-Aug-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 22:20   in response to: MarkusD in response to: MarkusD
Helpful
  Click to reply to this thread Reply
From the webcam site: 'Due to technical problems are webcameraene our inoperative. We apologize for this and working on it.'!

From the web, for Windows users, maybe this will help give you some ideas.

https://superuser.com/questions/562886/how-do-i-find-and-remove-corrupt-images-from-directory#562989
jGromit

Posts: 7,367
Registered: 31-Jan-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 22:39   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Attachment ss006062.png (64.2 KB)
Those kinds of broken images are almost always the result of connection problems - bad router, bad cable modem, or an intermittent, unreliable connection.

There may not be any way to detect them directly, because most of them are still perfectly valid JPG-formatted files - they're just missing most of the data. They do have one characteristic that makes them stand out when viewed in File Explorer, however. The file sizes are much too small for the dimensions. I would sort by file size, and display both the file size and the dimensions. See screenshot.

If the dimensions are missing completely (as in one of your files), that's a certain sign of trouble. And the others have suspicious data - 32KB for a 2592x1944 image? I think not. ;)
MarkusD

Posts: 457
Registered: 13-Apr-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 22:47   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
From the webcam site: 'Due to technical problems are webcameraene our inoperative. We apologize for this and working on it.'!

From the web, for Windows users, maybe this will help give you some ideas.

https://superuser.com/questions/562886/how-do-i-find-and-remove-corrupt-images-from-directory#562989

I searched the web for repairing tools before but found no applications, but I'll give "BadPeggy" a try. Thanks for this!
MarkusD

Posts: 457
Registered: 13-Apr-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 22:55   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Those kinds of broken images are almost always the result of connection problems - bad router, bad cable modem, or an intermittent, unreliable connection.
I don't think that all these problems could be the reason for the broken image on my side of the internet, because thousands of other pictures are just downloading well.

There may not be any way to detect them directly, because most of them are still perfectly valid JPG-formatted files - they're just missing most of the data.
Correct.

They do have one characteristic that makes them stand out when viewed in File Explorer, however. The file sizes are much too small for the dimensions. I would sort by file size, and display both the file size and the dimensions. See screenshot.
Sorting them by size makes only sense when sorting them for each camera separate, which takes to much time to do that sorting for each and every day manually.

If the dimensions are missing completely (as in one of your files), that's a certain sign of trouble. And the others have suspicious data - 32KB for a 2592x1944 image? I think not. ;)
That's true too, yes.

I'll try to find out which properties I have to enable in the Explorer to watch for corrupt files.

Thanks so far four your assistance. I'll let you know what works best.
jGromit

Posts: 7,367
Registered: 31-Jan-2006
Re: Detecting „broken“ images, how to?
Posted: 23-Sep-2019 23:16   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
...thousands of other pictures are just downloading well.

No comment.
MarkusD

Posts: 457
Registered: 13-Apr-2006
Re: Detecting „broken“ images, how to?
Posted: 24-Sep-2019 18:58   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
From the web, for Windows users, maybe this will help give you some ideas.

https://superuser.com/questions/562886/how-do-i-find-and-remove-corrupt-images-from-directory#562989

I tried BadPeggy and it found over 1000 corrupt files. And there was no false positive at all. I can recommend this tool for detecting corrupt pictures. Thanks for your tip!
RobM

Posts: 3,107
Registered: 4-Aug-2006
Re: Detecting „broken“ images, how to?
Posted: 24-Sep-2019 21:07   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
RobM wrote:
From the web, for Windows users, maybe this will help give you some ideas.

https://superuser.com/questions/562886/how-do-i-find-and-remove-corrupt-images-from-directory#562989

I tried BadPeggy and it found over 1000 corrupt files. And there was no false positive at all. I can recommend this tool for detecting corrupt pictures. Thanks for your tip!
It was just a lucky find really but glad it was of use to you. I’ve downloaded a copy for Mac OS, just in case my own photo library throws a wobbler ;)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums