• # j'ai pas cherché loin

    Posté par . En réponse au message Informations de fichiers videos. Évalué à 4.

    http://lmgtfy.com/?q=extract+file+info+from+mkv

    ca m'envoie par exemple sur l'outil mkvinfo qui semble etre l'outil qui fait ce que tu veux (j'ai pas testé, j'ai pas de MKV)

    ensuite en effet, si ca sort un gros paté, ben il faut jouer de grep, sed, awk pour filtrer les infos utiles, reformater la sortie.

    sinon avec mediainfo,
    mediainfo --fullscan input.mkv.

    qui nous sort un truc comme ca

    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

    avec un simple egrep apres mediainfo on peut avec un truc comme ca

    monuser@mamachine: ~$ mediainfo --fullscan input.mkv | egrep 'ID|Video|Audio|Text|Language'
    Unique ID : 239093944660469735839645243666869007606 (0xB3DFD199E22F0E7CBAE1FE52206834F6)
    Video
    ID : 1
    Language : English
    Audio
    ID : 2
    Language : Russian
    Text
    ID : 3
    Language : English