Store the output to a given file along with displaying in the console

mediainfo

mediainfo --Logfile={{out.txt}} {{file}}

click the source code to copy install mediainfo on any operating system with command-not-found.com