find video codec from terminal
This won't work for .avi files (at least it didn't for one I tried), but for .mp4 or .mov files, it should.

To list a file's codecs:

$ mdls -name kMDItemCodecs "/path/to/some/file.mp4"
kMDItemCodecs = (
    "H.264",
    AAC
)


To find files that are movies, but don't have the H.264 codec:

mdfind "kMDItemContentTypeTree == 'public.movie' &amp;&amp; kMDItemCodecs != '*H.264*'"