This question already has an answer here:
How can I get information about a video with a command-line tool? (e.g. video duration, audio codec, bitrate etc)
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
You have several commands to get that information:
Source: Command to see media file info in terminal? (then, duplicated).
And also you have:
There are several ways to achieve this. Here are three methods, using three different utilities.