【问题标题】:Trying to extract only the id3 size using exiftool.尝试使用 exiftool 仅提取 id3 大小。
【发布时间】:2018-02-09 20:12:16
【问题描述】:

有谁知道使用exiftool 只提取id3 大小信息的方法。有一个强大的文档,但我没有看到如何仅提取 id3 信息。

======== Test_file.mp3
ExifToolVersion                 : 10.78
FileName                        : First-time Bosses.mp3
Directory                       : .
FileSize                        : 33 MB
FileModifyDate                  : 2018:02:08 16:35:02-06:00
FileAccessDate                  : 2018:02:09 13:40:59-06:00
FileInodeChangeDate             : 2018:02:09 13:36:59-06:00
FilePermissions                 : rw-rw-r--
FileType                        : MP3
FileTypeExtension               : mp3
MIMEType                        : audio/mpeg
MPEGAudioVersion                : 1
AudioLayer                      : 3
AudioBitrate                    : 128 kbps
SampleRate                      : 44100
ChannelMode                     : Joint Stereo
MSStereo                        : Off
IntensityStereo                 : Off
CopyrightFlag                   : False
OriginalMedia                   : False
Emphasis                        : None
ID3Size                         : 222797
EncodedBy                       : iTunes 9.1
Title                           : Test_file
Artist                          : Test_file
Album                           : Test_file
Genre                           : Test_file
PictureFormat                   : PNG
PictureType                     : Other
PictureDescription              :
Picture                         : (Binary data 212414 bytes, use -b option 
 to extract)
Duration                        : 0:36:14 (approx)

【问题讨论】:

  • 你在什么环境?你试过什么?您在寻找什么格式的输出?

标签: mp3 id3


【解决方案1】:

我会使用 grep 查找该行,然后使用 awk 只保留最后一个单词:

grep ID3Size Test_file.mp3 | awk 'NF>1{print $NF}'

如果这是由某个函数 foo 生成的,则无需提及源文件:

foo | grep ID3Size | awk 'NF>1{print $NF}'

【讨论】:

    猜你喜欢
    • 2018-07-12
    • 1970-01-01
    • 2020-10-31
    • 1970-01-01
    • 1970-01-01
    • 2012-10-30
    • 2012-03-29
    • 2011-09-02
    • 1970-01-01
    相关资源
    最近更新 更多