I need a command to quickly see in terminal essential information about an audio or video file.
(Then I'll consider adding that to Thunar's custom actions, etc.)
I need a command to quickly see in terminal essential information about an audio or video file.
(Then I'll consider adding that to Thunar's custom actions, etc.)
avprobe
from the packagelibav-tools
is pretty good.Sample output
avprobe somefile.mp4
To add to Thunar custom action, in relation to what was suggested here, the analog formula to add would be:
I use
mediainfo
to get all properties of media files ( audio and video files )mediainfo
is now in Ubuntu repositories and can be installed by runningPreviously it was necessary to use a PPA but this has no packages for current Ubuntu versions.
exiftool
This might be a surprise, but
exiftool
from libimage-exiftool-perl has this capability as well.It supports showing info from a lot of media file formats, and can write metadata too for some of these formats.
Example output for an audio file:
Depending on what you consider essential, you might want to use the
file
utility for this, which gives general information on any file. Its primary purpose is to tell you what type of file you have, but it may provide the level of detail you need.However, if you need to know the contents of tags--title, artists, etc.--
file
will not tell you that.There are also the following for audio files, although may not compete well with exiftool:
Also soxi supports video files as well.
The id3v2 and sox packages (which can be installed by clicking these links) provide those commands. They can also be installed in the Software Center, or by running:
An example:
id3v2 -l 'Beatles - Here Comes The Sun.mp3'
output:I knew about this command:
avconv -i <filename>
For myfile.flv:
avconv -i myfile.flv
My idea was to add that command to Thunar's custom actions and just run it from context menu no matter the extension. But it had to be run in terminal, so I took a look at this answer. (To open the terminal and keep it open, I created a new profile in gnome-terminal (Edit/Profiles) called "new1", and under Profile preferences/"Title and command" set it "When command exits" to "Hold the terminal open".)
In the end (by trial and error) I came up with this:
which works put in Thunar's custom actions - and should work for any media file.
If you are using Ubuntu Xfce with Thunar then this will work in the custom actions:
xfce4-terminal --hold -e "avprobe %f"