首页 > 其他 > 详细

ffmpeg查看音频文件信息

时间:2019-02-26 14:41:52      阅读:714      评论:0      收藏:0      [点我收藏+]

查看音频文件的信息(基于本地路径)

import json
import subprocess
command = ["ffprobe.exe", "-loglevel", "quiet", "-print_format", "json", "-show_format", "-show_streams", "-i",
           rD:\learn\audio\2.aac]
result = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
out = result.stdout.read()
temp = str(out.decode(utf-8))
print(json.loads(temp))

也可以把本地路径换成文件的url地址

command = ["ffprobe.exe", "-loglevel", "quiet", "-print_format", "json", "-show_format", "-show_streams", "-i",
           rhttps://imglive.ehafo.com/course/temp/2019/02/ZlliRoa7fPPgofrGP2okVVBjgh3k43P518sw1AUd.aac]

 

ffmpeg查看音频文件信息

原文:https://www.cnblogs.com/li1992/p/10437101.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!