Skip to content

Instantly share code, notes, and snippets.

@YarikST
Created October 10, 2019 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YarikST/43d6c3c3d165e65cdd63ea6b4a018531 to your computer and use it in GitHub Desktop.
Save YarikST/43d6c3c3d165e65cdd63ea6b4a018531 to your computer and use it in GitHub Desktop.
# mediainfo
#http://manpages.ubuntu.com/manpages/bionic/man1/mediainfo.1.html
# mediainfo --help
# mediainfo --Info-Parameters
.get the duration of video stream:
mediainfo --Inform="Video;%Duration%" [inputfile]
.get the duration of video stream as text:
mediainfo --Inform="Video;%Duration/String3%" [inputfile]
.get the duration of the media file:
mediainfo --Inform="General;%Duration%" [inputfile]
.get the duration of audio stream only:
mediainfo --Inform="Audio;%Duration%" [inputfile]
.get values of more than one parameter:
mediainfo --Inform="Video;%Width%,%Height%,%BitRate%,%FrameRate%" [inputfile]
# convert
.clear orientation exif
convert #{path} -auto-orient #{path}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment