Advertisement
LAPINPT

MediaInfo CLI commands batch

Jun 11th, 2013
5,066
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.40 KB | None | 0 0
  1. # Command Line Examples #
  2.  
  3. # Listing of key attributes #
  4.  
  5.    mediainfo.exe "C:\movie.mkv"
  6.  
  7.  
  8. # Listing of all key attributes #
  9.  
  10.    mediainfo.exe -f "C:\movie.mkv"
  11.  
  12.  
  13. # Using the template option and pipe output to a file #
  14.  
  15.    mediainfo.exe  --Inform=file://C:\template.txt "C:\movie.mkv" > "result.txt"
  16.  
  17.  
  18.  
  19.  
  20. # for single file create batch mediainfo.bat #
  21. ---------------------------------------------------------------------------------------------------------------------
  22. set template="file://C:\Apps\MediaInfo\CLI\template.txt"
  23.  
  24. set MediaInfo="C:\Apps\MediaInfo\CLI\MediaInfo.exe"
  25.  
  26. %MediaInfo% --Inform=%template% "%~nx1" > "%~n1.txt"
  27.  
  28. exit
  29. ---------------------------------------------------------------------------------------------------------------------
  30.  
  31.  
  32.  
  33. # for multiple files create batch mediainfo.bat #
  34. ---------------------------------------------------------------------------------------------------------------------
  35. set template="file://C:\Apps\MediaInfo\CLI\template.txt"
  36.  
  37. set MediaInfo="C:\Apps\MediaInfo\CLI\MediaInfo.exe"
  38.  
  39. for %%I in (*.mkv *.mp4 *.avi) do %MediaInfo% --Inform=%template% "%%I" > "%%~nI.txt"
  40.  
  41. exit
  42. ---------------------------------------------------------------------------------------------------------------------
  43.  
  44.  
  45.  
  46. # template.txt example #
  47. ---------------------------------------------------------------------------------------------------------------------
  48. General;File Name...........: %FileName%\nRuntime.............: %Duration/String%\nFile Size...........: %FileSize/String3%\nFormat..............: %Format%\n
  49. Video;Video Bitrate.......: %BitRate/String%\nVideo Codec.........: %Format% %Format_Profile%\nAspect Ratio........: %DisplayAspectRatio/String%\nResolution..........: %Width%x%Height%\nFrame Rate..........: %FrameRate/String%\n
  50. Audio;Audio Codec.........: %Codec/String%$if(%BitRate%, @ %BitRate/String%)\nChannels............: %Channel(s)% CH\n$if(%Language%,Language............: %Language/String%)\n
  51. Text;Subtitle       : %Language/String%\n
  52. ---------------------------------------------------------------------------------------------------------------------
  53.  
  54.  
  55. # More info about %parameters% #
  56.  
  57. mediainfo.exe --Info-Parameters  > parameters.txt
  58.  
  59. http://pastebin.com/5sqzHG2y
  60.  
  61. http://crypt2.net/file/cngsyl
  62.  
  63.  
  64.  
  65. # Tip: You can copy .bat to SendTo menu and run it from there #
  66.  
  67. %USERPROFILE%\AppData\Roaming\Microsoft\Windows\SendTo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement