You can get a list of Mediainfo parameters to use with “–Info-Parameters” argument. Mediainfo -Inform="Video %Width%,%Height%,%DisplayAspectRatio/String%,%BitRate%,%FrameRate%" $movieĪnd I get something like: Filename,PixelWidth,PixelHeight,DisplayRatio,Bitrate,FrameRate So this little script will find my MP4 movie files in the “/foo/*” directories and subdirectories, assign the name to the “movie” variable, print out the name and comma without a new line and then spit out a bunch of stuff about the video stream to get me a nice CSV output… #!/bin/shĮcho "Filename,PixelWidth,PixelHeight,DisplayRatio,Bitrate,FrameRate"įind /foo/ -type f | grep -i \.MP4 | while read movie do So I am going to cheat a little with the “echo” command and tell it to print the file name and a comma and not to print out a new line in order to have it create the first column for the CSV row. Changes made with SET will remain only for the duration of the current CMD session. First, you must create a directory which will receive the MediaInfo directory, and ZenLib and MediaInfoLib if you decide to compile them yourself. How to build MediaInfo Build under macOS and Linux. Download MediaInfo version 23. The file name is in the “General” bucket. Display, set, or remove CMD environment variables. MediaInfo is a convenient unified display of the most relevant technical and tag data for video and audio files. MediaInfo is a convenient unified display of the most relevant technical and tag data for video and audio files. For how to do it programmatically (what I like better), take a. Then parse that Log-File for the Video's Width&Height and copy them to Your FFmpeg-CommandLine. To do it via a Script, use -report to print the Output to a Log-File. Merge Media Info txt files by adding a separator between each content '-'. You have to read out the FFProbe-Output and copy the obtained Width/Height-Values to the FFmpeg-CommandLine. Creation of all the Media info txt files of the files contained in the folder 3. I just want a handful of things about the Video stream and the filename. Right click on the folder containing the files > send to > click on the Batch file. You can tell it to give you multiple data points about a particular stream or “General” aspect about the file. Seems the “Inform” argument can get me some of the way there. But I just want to get a certain set of data and want to move it into a CSV file so I can bring it into something like Google Sheets or Excel. It will also spit out a couple of formats in order parse the data such as XML. Mediainfo is a pretty handy tool to examine media files like MP4 containers and the streams in it such as the video and audio streams.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |