Fastest way to validate media file
⚓ Rust 📅 2025-09-27 👤 surdeus 👁️ 8I have lots (tens of thousands) media files, some of which are corrupted. I'm thinking of way to check their integrity in Rust, so I need a non-panicking way to parse them (and to validate that, given resolution w by h, there are indeed w*h pixels).
Those files are mostly jpeg, png, mp4, with a few files of other formats also present.
What solution would be the fastest? I'm considering
- Invoking ffmpeg -i ... -f null /dev/nulland checking exit code;
- imageRust crate, and something else for video.
1 post - 1 participant
🏷️ Rust_feed