Atitit 获取多媒体mp3 mp4 m4a元数据
目录
1.1. Cli \paidashi\bin\ffprobe.exe 1
1.2. Gui 使用TagExplorer查看一首MP3中的tag: 7
ffprobe -i 1.flv -print_format json -show_frames -show_format -show_streams -v 0
在外部程序调用并处理音频视频信息时,通过ffmpeg/ffprobe查看音频视频文件信息并输出为json格式是非常实用的功能,在终端输入以下命令:
ffprobe -v quiet -print_format json -show_format -show_streams #{source}
---------------------
#{source}部分替换为mp3文件所在路径。输出如下:
{
"streams": [
{
"index": 0,
"codec_name": "mp3",
"codec_long_name": "MP3 (MPEG audio layer 3)",
"codec_type": "audio",
"codec_time_base": "1/44100",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"sample_fmt": "s16p",
"sample_rate": "44100",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/14112000"