cbird icon indicating copy to clipboard operation
cbird copied to clipboard

Ignore files with errors, do not add to the index

Open tehMArs opened this issue 1 year ago • 2 comments

Problem is when the file is damaged or has invalid format that couldn't be read by cbird, then the whole scan is lost.

[C][VideoContext::avLogger{Extra.mp4}] Missing Sequence Header. [C][VideoContext::decodeFrame{Extra.mp4}] avcodec_send_packet -41444e49 "Invalid data found when processing input" [C][VideoContext::avLogger{Extra.mp4}] Your platform doesn't support hardware accelerated AV1 decoding. [C][VideoContext::avLogger{Extra.mp4}] Failed to get pixel format.

[F][VideoIndex::load] failed to open: ~/Desktop/test/_index/video/6.vdx

  1. to solve this it should ignore bad files don't add them to the index and proceed scanning
  2. Add AV1 coded
  3. use external ffmpeg instead of compiled library

tehMArs avatar Jul 27 '24 10:07 tehMArs

Thanks for reporting. External FFmpeg is a problem because sending decompressed frames over a pipe can be very slow. I might consider loading FFmpeg libraries dynamically so it is easier to swap with a different version without recompiling cbird.

scrubbbbs avatar Jul 27 '24 11:07 scrubbbbs

to solve this it should ignore bad files don't add them to the index and proceed scanning

Currently only ignoring files that fail to open, which involves quite a few checks. The open is supposed to fail if the codec is not supported.

I'm not sure what to do here, as usually we would want to keep going provided that ffmpeg was able to recover from the error (it can recover most of the time).

  • decode the first few frames, if there is any error, reject the whole file
  • ignore files if error count is too high

scrubbbbs avatar Feb 18 '25 14:02 scrubbbbs