如何从 mp3 文件中提取详细信息?

V S*_*ssh 1 command-line media

如何使用 linux 命令提取歌曲位置、艺术家、专辑、比特率、年份、流派等详细信息?我试过 mp3info,但它没有提供太多信息。请帮忙。谢谢!

wal*_*tor 7

你读了man mp3info吗?它部分说:

     -p "FORMAT_STRING"

          Print MP3 attributes according to FORMAT_STRING.  FORMAT_STRING is similar to a printf(3) format string in that it is printed verbatim except  for  the
          following conversions and escape sequences. Any conversion specifier may optionally include the various alignment, precision, and field width modifiers
          accepted by printf(3).  See the EXAMPLES section below for examples of how format strings are used in mp3info.

          Conversion Specifiers

             %f     Filename without the path [string]
             %F     Filename with the path [string]
             %k     File size in KB [integer]
             %a     Artist [string]
             %c     Comment [string]
             %g     Musical genre [string]
             %G     Musical genre number [integer]
             %l     Album name [string]
             %n     Track [integer]
             %t     Track Title [string]
             %y     Year [string]
             %C     Copyright flag [string]
             %e     Emphasis [string]
             %E     CRC Error protection [string]
             %L     MPEG Layer [string]
             %O     Original material flag [string]
             %o     Stereo/mono mode [string]
             %p     Padding [string]
             %v     MPEG Version [float]
             %u     Number of good audio frames [integer]
             %b     Number of corrupt audio frames [integer]
             %Q     Sampling frequency in Hz [integer]
             %q     Sampling frequency in kHz [integer]
             %r     Bit Rate in kbps (type and meaning affected by -r option)
             %m     Playing time: minutes only [integer]
             %s     Playing time: seconds only [integer] (usually used in conjunction with %m)
             %S     Total playing time in seconds [integer]
             %%     A single percent sign
Run Code Online (Sandbox Code Playgroud)

  • 新用户应该阅读手册页,我展示了如何做。手册页(`man mp3info`)比大多数手册页有更多的例子。 (4认同)