78 multimedia command-line metadata
我需要一个命令来快速查看有关音频或视频文件的终端基本信息。
(然后我会考虑将其添加到 Thunar 的自定义操作等中)
chr*_*tis 81
avprobe从包装libav-tools上来说还不错。
样本输出 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
Run Code Online (Sandbox Code Playgroud)
要添加到 Thunar 自定义操作,与此处建议的内容相关,要添加的模拟公式为:
gnome-terminal --window-with-profile=new1 -e "avprobe %f"
Run Code Online (Sandbox Code Playgroud)
小智 49
我mediainfo用来获取媒体文件(音频和视频文件)的所有属性
root@server:Videos::08:47 PM# mediainfo Vazquez.mp4
General
Complete name : Vazquez.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 103 MiB
Duration : 3mn 52s
Overall bit rate mode : Variable
Overall bit rate : 3 730 Kbps
Encoded date : UTC 2011-11-10 07:30:57
Tagged date : UTC 2011-11-10 07:30:57
gsst : 0
gstd : 232083
gssd : B7AA66E45HH1322313268839354
gshh : o-o.preferred.bhartibb-blr1.v12.lscache7.c.youtube.com
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 1 frame
Format settings, GOP : M=1, N=24
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3mn 52s
Bit rate : 3 576 Kbps
Maximum bit rate : 5 947 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.072
Stream size : 98.9 MiB (96%)
Tagged date : UTC 2011-11-10 07:30:58
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 3mn 52s
Bit rate mode : Variable
Bit rate : 152 Kbps
Maximum bit rate : 188 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 4.20 MiB (4%)
Title : IsoMedia File Produced by Google, 5-11-2011
Encoded date : UTC 2011-11-10 07:30:58
Tagged date : UTC 2011-11-10 07:30:58
Run Code Online (Sandbox Code Playgroud)
mediainfo 现在在 Ubuntu 存储库中,可以通过运行安装
sudo apt install mediainfo
Run Code Online (Sandbox Code Playgroud)
以前有必要使用PPA,但这没有适用于当前 Ubuntu 版本的软件包。
pho*_*bos 28
这可能是一个惊喜,但exiftool来自libimage-exiftool-perl 也有这个能力。
它支持显示来自许多媒体文件格式的信息,并且也可以为其中一些格式写入元数据。
音频文件的示例输出:
# exiftool The\ Police\ -\ Live\!\ Disc\ 2\ -\ Atlanta\ -\ 01.\ Synchronicity\ I.mp3
ExifTool Version Number : 9.13
File Name : The Police - Live! Disc 2 - Atlanta - 01. Synchronicity I.mp3
Directory : .
File Size : 3.9 MB
File Modification Date/Time : 2012:03:23 19:44:23+01:00
File Access Date/Time : 2012:12:26 11:44:38+01:00
File Inode Change Date/Time : 2012:03:23 19:44:23+01:00
File Permissions : rw-------
File Type : MP3
MIME Type : audio/mpeg
MPEG Audio Version : 1
Audio Layer : 3
Sample Rate : 44100
Channel Mode : Joint Stereo
MS Stereo : On
Intensity Stereo : Off
Copyright Flag : False
Original Media : True
Emphasis : None
VBR Frames : 6660
VBR Bytes : 4044318
VBR Scale : 57
Encoder : LAME3.96
Lame VBR Quality : 4
Lame Quality : 3
Lame Method : VBR (old/rh)
Lame Low Pass Filter : 18 kHz
Lame Bitrate : 32 kbps
Lame Stereo Mode : Joint Stereo
Track : 1/15
Disc : 2/2
Artist : The Police
Title : Synchronicity I
Album : Live!
Year : 2003
Genre : Rock
Comment : Atlanta
Discid : c611270f
ID3 Size : 128
Audio Bitrate : 186 kbps
Date/Time Original : 2003
Duration : 0:02:53 (approx)
Run Code Online (Sandbox Code Playgroud)
Eli*_*gan 10
根据您认为的重要内容,您可能希望为此使用该file实用程序,它提供有关任何文件的一般信息。它的主要目的是告诉您您拥有什么类型的文件,但它可能会提供您需要的详细程度。
$ file '01 - Nina Simone - Mood Indigo.mp3'
01 - Nina Simone - Mood Indigo.mp3: Audio file with ID3 version 2.3.0, contains: MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, JntStereo
Run Code Online (Sandbox Code Playgroud)
但是,如果您需要知道标签的内容——标题、艺术家等——file不会告诉你。