Friday, May 10, 2024
37
rated 0 times [  37] [ 0]  / answers: 1 / hits: 53686  / 2 Years ago, fri, april 15, 2022, 5:27:37

How can I get information about a video with a command-line tool? (e.g. video duration, audio codec, bitrate etc)


More From » command-line

 Answers
0

You have several commands to get that information:




avprobe from the package libav-tools is pretty good.



Sample output avprobe somefile.mp4



avprobe version 0.8.4-4:0.8.4-0ubuntu0.12.04.1, Copyright (c)
2007-2012 the Libav developers built on Nov 6 2012 16:51:33 with
gcc 4.6.3 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'somefile.mp4':
Metadata:
major_brand : avc1
minor_version : 0
compatible_brands: isomavc1
creation_time : 2012-08-10 15:01:14 Duration: 00:01:02.55, start: 0.000000, bitrate: 682 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1904x1040 [PAR 1:1 DAR 119:65], 680 kb/s, 19.18 fps, 20 tbr, 20 tbn, 40 tbc
Metadata:
creation_time : 2012-08-10 15:01:14


To add to Thunar custom action, in relation to what was suggested
here, the analog formula to add would be:



gnome-terminal --window-with-profile=new1 -e "avprobe %f"



Source: Command to see media file info in terminal? (then, duplicated).



And also you have:




You can use MPlayer to get that information.



$ mplayer -vo null -ao null -identify -frames 0 foo.avi



Source: https://superuser.com/questions/55780/linux-command-line-tool-to-get-bitrate-of-divx-xvid


[#30901] Saturday, April 16, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tatoethin

Total Points: 377
Total Questions: 110
Total Answers: 98

Location: Saudi Arabia
Member since Sat, Aug 20, 2022
2 Years ago
;