Adding codec information to file name without conversion

I have a large number of files that in the past I had already converted some to either h.264 and h.265. Is there an easy way to not reconvert but to just rename them by appending h264 or h265 (depending on the codec that was used) to the file name?

The only way I can think to do this is to have 2 tasks. Both tasks would basically be the same, but they would have a filter for the codec and in the rename would have codec name hard set.
Selection Filter under Expert Settings:
image
Mpeg4 for h264 and MpegH for h265.

I think the prior post would apply to new recordings.

One way would be to download and install the “mediainfo” program (free, open source). Not sure if MCEBuddy doesn’t already have this inside its program folder somewhere if you’re comfortable poking around in Windows app install folders.

You just run it on the media file and it spits out all sorts of details. You would pipe that command into windows “find” command (like a simple version of the Linux “grep” command) to filter the codec line.

Combine the filename with matching the h.264 or h.265 codec (they may have different names, like AVC). You can confirm with inspecting the codec with VLC for the file.

Once you have the details lined up, it should be straightforward to write up a batch command file to rename the file based on what mediainfo outputs.