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 movies.search():
for idx, part in enumerate(movie.iterParts()):
if movie.media[idx].videoCodec != "hevc":
print(f"Title: {movie.title}")
print(f"File: {part.file}")
print(f"Codec: {movie.media[idx].videoCodec}")
print("")
NOTE: HEVC encoded movies (ex. h265) are substantially smaller in size at the same quality or better than non-HEVC movies.