Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to see from command line all informations pertaining to a given video file, including length, quality, bitrate, resolution, audio and video formats, number and language of audio streams and subtitles, and so on; the more, the best.

As far as now I must resort on the "information" tab of VLC because even Dolphin file manager isn't helping me with this: it shows me only some of these informations and just for some formats (i.e. .mkv doesn't seem supported that way).

share|improve this question
    
What about mediainfo ? –  Endoro May 13 '13 at 21:32
    
It seems ok, if you put this on an answer I can vote it –  Sekhemty May 13 '13 at 21:46
    
Take a look at mkvinfo and ffprobe as well. –  slhck May 14 '13 at 21:55
    
Thank to you too; as before, please answer so I can properly vote your suggestion –  Sekhemty May 14 '13 at 21:59
    
Mkvinfo is fine, but only for MKV videos : mkvinfo -v -v video.mkv –  Endoro May 14 '13 at 23:03
add comment

2 Answers

up vote 4 down vote accepted

Give mediainfo a try. On the command line type mediainfo input.mkv. For more detailed video information mediainfo --fullscan input.mkv.

Output example:

General
Unique ID                                : 239093944660469735839645243666869007606 (0xB3DFD199E22F0E7CBAE1FE52206834F6)
Complete name                            : input.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 39.6 MiB
Duration                                 : 20s 288ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 16.4 Mbps
Movie name                               : My best movie
Encoded date                             : UTC 2012-11-10 16:42:02
Writing application                      : mkvmerge v5.8.0 ('No Sleep / Pillow') built on Sep  2 2012 15:37:04
Writing library                          : libebml v1.2.3 + libmatroska v1.3.0
Produzent                                : ??? ???????
Thanks to                                : Bruce Davey
Lead performer                           : Rudy Youngblood
Remixed by                               : ©????

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.0
MultiView_Count                          : 2
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Format settings, GOP                     : M=2, N=13
Muxing mode                              : Header stripping
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 20s 280ms
Bit rate mode                            : Variable
Bit rate                                 : 15.8 Mbps
Maximum bit rate                         : 16.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 0.304
Stream size                              : 38.2 MiB (96%)
Title                                    : Sony Hardware Video H.264 Encoder
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : Header stripping
Codec ID                                 : A_AC3
Duration                                 : 20s 288ms
Bit rate mode                            : Constant
Bit rate                                 : 256 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -80ms
Stream size                              : 634 KiB (2%)
Title                                    : Sony Hardware Audio AC3 Encoder
Language                                 : Russian
Default                                  : Yes
Forced                                   : No

Text
ID                                       : 3
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : The same subtitle format used on BDs/HD-DVDs
Title                                    : Sony Hardware PGS Encoder
Language                                 : English
Default                                  : Yes
Forced                                   : No
share|improve this answer
add comment

You can use mplayer:

mplayer -vo null -ao null -frames 0 -identify videofile.mp4

Output:

MPlayer 1.1-4.2.1 (C) 2000-2012 MPlayer Team
Can't init Apple Remote.

Playing vid.mp4.
libavformat version 54.6.101 (internal)
libavformat file format detected.
ID_VIDEO_ID=0
[lavf] stream 0: video (h264), -vid 0
ID_AUDIO_ID=0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  480x360  24bpp  29.970 fps  700.7 kbps (85.5 kbyte/s)
Clip info:
 major_brand: qt
ID_CLIP_INFO_NAME0=major_brand
ID_CLIP_INFO_VALUE0=qt
 minor_version: 0
ID_CLIP_INFO_NAME1=minor_version
ID_CLIP_INFO_VALUE1=0
 compatible_brands: qt
ID_CLIP_INFO_NAME2=compatible_brands
ID_CLIP_INFO_VALUE2=qt
 creation_time: 2011-03-03 15:42:30
ID_CLIP_INFO_NAME3=creation_time
ID_CLIP_INFO_VALUE3=2011-03-03 15:42:30
 encoder: 4.2.1
ID_CLIP_INFO_NAME4=encoder
ID_CLIP_INFO_VALUE4=4.2.1
 encoder-eng: 4.2.1
ID_CLIP_INFO_NAME5=encoder-eng
ID_CLIP_INFO_VALUE5=4.2.1
 date: 2011-03-03T10:42:30-0500
ID_CLIP_INFO_NAME6=date
ID_CLIP_INFO_VALUE6=2011-03-03T10:42:30-0500
 date-eng: 2011-03-03T10:42:30-0500
ID_CLIP_INFO_NAME7=date-eng
ID_CLIP_INFO_VALUE7=2011-03-03T10:42:30-0500
ID_CLIP_INFO_N=8
Load subtitles in ./
ID_FILENAME=vid.mp4
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=700712
ID_VIDEO_WIDTH=480
ID_VIDEO_HEIGHT=360
ID_VIDEO_FPS=29.970
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=63600
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=1
ID_START_TIME=0.00
ID_LENGTH=3.83
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.23.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 1 ch, s16le, 63.6 kbit/9.01% (ratio: 7950->88200)
ID_AUDIO_BITRATE=63600
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=1
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [null] 44100Hz 1ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=ffaac
Starting playback...


Exiting... (End of file)
ID_EXIT=EOF
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.