To ensure your media server (Plex, Emby, Jellyfin) correctly identifies the episodes and pulls the correct metadata (posters, cast info), use the following naming structure:

ffmpeg -i "The.First.Lady.S01E01.input.mkv" \ -c:v libx265 -crf 18 -preset slow \ -pix_fmt yuv420p10le \ -c:a copy \ -c:s copy \ "The.First.Lady.S01E01.archive.mkv"

ffmpeg -i input.mkv -c:v libx264 -preset medium -crf 22 -c:a aac output.mp4

ffmpeg -i "The.First.Lady.S01E01.mkv" -c copy output.mp4