Custom Thumbnails for Video

I’m working on a theme where it’s preferable to use a standard icon for video thumbnails, particularly in search results. I know it’s simple to add a custom fallback image for audio, eg add_file_fallback_image('audio','audio.png') but since most of my videos actually already have thumbnails, I’m wondering if there’s a standard way to filter record_image($record, 'square_thumbnail') so that files with a video mime type returns, e.g., ‘video.png’ instead of the actual thumbnail. I just want to be sure before I add a bunch of extra code. Thanks! – E

I didn’t see a way to filter that function, so I just did this where needed if anyone else is interested…

$record=get_record_by_id($s['record_type'], $s['record_id']);
$mime = metadata($record,'MIME Type');
if(substr($mime,0,5)=='video'){
    $img='<img src="'.img('video.png').'" alt="'.$s['title'].'" title="'.$s['title'].'">';
}else{
    $img=record_image($record, 'square_thumbnail');
}

Yeah, the only other option I can immediately think of is to take the File object and set its $has_derivative_image flag to zero before calling record_image on it.