Ffprobe与print json不打印任何东西 [英] Ffprobe with print json doesn't print anything

查看:568
本文介绍了Ffprobe与print json不打印任何东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想以人类可读的方式获取有关电影的信息(分辨率,帧率,比特率,编解码器,持续时间等)。我发现这个commnad:

I am trying to get information about a movie (resolution, frame rate, bit rate, codecs, duration etc) in a human readable way. I found this commnad:

ffprobe -v quiet -print_format json -show_format -show_streams somefile.asf

在这个Stack Overflow问题中:以友好的方式获取ffmpeg信息

In this Stack Overflow question: Get ffmpeg information in friendly way

但它对我来说不起作用。当我在终端中尝试输出时,输出为空:

But it doesn't work for me. When I try it in a terminal, the output is empty:

richard@richard-desktop:~/projects/hello-python$ ffprobe -v quiet -print_format json -show_format -show_streams tests/test_1.mpg 
richard@richard-desktop:~/projects/hello-python$ 


推荐答案

好的,Ubuntu repos中的ffmpeg当前版本不是最新的。

Ok, the current version of ffmpeg in Ubuntu repos is not up to date.

我所做的是我添加了这个更新的存储库:

What I did was I added this more up to date repository:

sudo add-apt-repository ppa:jon-severinsson/ffmpeg

然后做了:

sudo apt-get remove ffmpeg
sudo apt-get autoremove
sudo apt-get update
sudo apt-get install ffmpeg

瞧。它工作,我得到正确的JSON输出从ffprobe:)

And voila. It works and I get correct JSON output from ffprobe :)

这篇关于Ffprobe与print json不打印任何东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆