Ffprobe with print json doesn't print anything

不羁岁月 提交于 2019-12-22 09:04:05

问题


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

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$ 

回答1:


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

And then did:

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

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



来源:https://stackoverflow.com/questions/11229660/ffprobe-with-print-json-doesnt-print-anything

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!