Rename video files with vertical resolution

Started by jason404, March 14, 2019, 08:23:47 AM

Previous topic - Next topic

jason404

I have a load of video files which I want to rename with the vertical resolution at the end.

eg.  VideoFileExample1.mp4 renamed to VideoFileExample1.1080.mp4

How would I do this?  I was going to write a Windows batch or bash file using the FOR command, but it seems that ExifTool can do batch operations itself.

Thanks.

Phil Harvey

Hi Jason,

Try this:

exiftool "-testname<%f.$imagewidth.%e" DIR

If this does what you want, then replace "testname" with "filename" to actually rename the files.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

I think ImageHeight would be the appropriate tag.

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Right, thanks:

exiftool "-testname<%f.$imageheight.%e" DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jason404

Brilliant, that worked.  Thanks Phil and StarGeek.

I only just realised that I had replies, as the forum settings don't seem to automatically set notifications for your own posts.