Identify H.265 from the OSX Command Line? Can anyone suggest a way to tell the difference, from the OSX command line, between .mkv files encoded with H.265 from those encoded with H.264?

Plex H.265 streams viewed from some devices (e.g. LG net-enabled TVs) stall frequently, probably due to the lack of H.265 decoding hardware.

I'd rather not have to re-encode all of the MKVs in my video library, so I'd like to be able to process only the H.265 files.
You can use ffprobe for this

ffprobe file.mkv -show_entries stream=codec_name -select_streams v:0 -of compact=p=0:nk=1 -v 0


For H.265/HEVC, this will print hevc; for H.264, h264 .