Encoding multi-jpegs with mencoder, skipping broken files

2

I've multiple jpegs uploaded form IP cam via FTP, I use mencoder to periodically pack them into single avi file, problem is that sometimes one or two jpegs submitted by cam are broken, and this make mencoder exit, without producing movie :/

Is there a way to force mencoder to skip broken jpeg files?

canni

Posted 2011-01-16T22:30:33.923

Reputation: 205

why not just validate every individual jpeg before trying to make the avi? – RobotHumans – 2011-01-16T23:03:09.213

sorry it just sounds too much like build my commercial app for me based on open source products for me to really post a constructive solution... – RobotHumans – 2011-01-16T23:04:25.670

@aking1012, how can i validate jpegs? and for second comment, sorry but I do not undersand Yours comment... – canni – 2011-01-16T23:29:14.777

Answers

1

I have the same problem - mencoder quits 25% or so along the way with the -mf:*jpg option.

I initially used IrfanView and did a 100% jpeg batch convert on a directory.

That told me there was a 0 byte file which it couldn't load there.

Because my files are all jpg's from a cctv they are all about the same size - 40k, so I decided all i have to do is look for any files < 38k and remove them.

DIR /OS > Files_in_Size_Order_Smallest_First.txt

Then just delete the few files which are likely corrupt being under 10k or so (found a lot of good files are smaller than 38k)

Tony Hammond

Posted 2011-01-16T22:30:33.923

Reputation: 11