List Plex non-HEVC Movies

List movie files not HEVC encoded (ex. h264) for a given Plex server and library using Python

# run 'pip3 install plexapi' first
# run the code below with python 3.x

from plexapi.myplex import MyPlexAccount
account = MyPlexAccount('your_username', 'your_password')
plex = account.resource('your_server').connect()

movies = plex.library.section('your_movie_library')
for movie in
    for idx, part in enumerate(movie.iterParts()):
        if[idx].videoCodec != "hevc":
            print(f"Title: {movie.title}")
            print(f"File: {part.file}")
            print(f"Codec: {[idx].videoCodec}")
NOTE: HEVC encoded movies (ex. h265) are substantially smaller in size at the same quality or better than non-HEVC movies.