fn generate_thumbnail(entry: &DirEntry, width: u32, height: u32) -> Result<RgbImage, VideoError> {
ffmpeg_next::init().unwrap();
let mut context = ffmpeg_next::format::input(&entry.path())?;
let stream = context.streams().best(ffmpeg_next::media::Type::Video).ok_or(VideoError::FfmpegError(ffmpeg_next::Error::StreamNotFound))?;
let codec = Context::from_parameters(stream.parameters())?;
let mut decoder = codec.decoder().video()?;
let mut decoded = VideoFrame::empty();