No idea what I'm doing (Help!)

Started by DGenerateKane, January 24, 2018, 09:27:39 PM

Previous topic - Next topic

DGenerateKane

I've got a lot of video files that I'd like to extract metadata from and put in a spreadsheet. I was trying to just do it through the program I normally use to look at metadata, MediaInfo, but I was having issues. During a search, an old post on a forum directed me to this program. So, I gave it a shot, and can't for the life of me get it to do what I want. I (think) I'm trying to something relatively simple, but I'm sure not getting the expected results.

All I want to do is take a bunch of video files and output some data to a csv file. All I want is the file's name, video codec, aspect ratio, video bitrate, audio codec, audio bitrate, audio channels, file size and file date. Some have more than one audio stream, so I'm not sure how that would be handled. Can I even accomplish what I want with this program? I'm woefully ignorant when it comes to the command line. I'd appreciate any help.

Oh, besides not outputting all the info I'm trying to get, I have two issues due to my file structure. First off, the video files are not in the same older, each video file is in a sub folder, and some sub folders have another sub folder with more video files in them, which I do NOT want exported. If they are, I can manage manually deleting them from the spreadsheet. The other issue is I have other file types mixed in with them, predominantly jpg files which I also do not want info from, and would be difficult to delete from the spreadsheet later due to the large number of them. So I need to be able to exclude file types, which I can't figure out how to do.

Phil Harvey

First, you should figure out what tags you want extracted.  See FAQ 2 for help here.

Your basic command will look like this:

exiftool --ext jpg -TAG1 -TAG2 -TAG3 ... -csv DIR/* > out.csv

Where DIR is the root directory containing the other folders, and -TAG1 etc are the tags you want to extract.  Here I have excluded .JPG files with --ext jpg.  To avoid processing files in subfolders I haven't used the -r (recurse) option.  Instead I specified DIR/* to process all of the folders in DIR.  I think this should work as long as your folder names don't have extensions, but there are other ways to do this if it doesn't.

- 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 ($).