【问题标题】:Ffprobe with print json doesn't print anything带有 print json 的 Ffprobe 不打印任何内容
【发布时间】:2012-06-29 02:07:54
【问题描述】:

我正在尝试以人类可读的方式获取有关电影的信息(分辨率、帧速率、比特率、编解码器、持续时间等)。我找到了这个命令:

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

在这个 Stack Overflow 问题中:Get ffmpeg information in friendly way

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

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$ 

【问题讨论】:

  • 拿出-v quiet,看看上面写了什么

标签: python ubuntu ffmpeg ffprobe


【解决方案1】:

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

我所做的是我添加了更多最新的存储库:

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

然后瞧。它有效,我从 ffprobe 得到正确的 JSON 输出 :)

【讨论】:

    猜你喜欢
    • 2019-05-26
    • 2021-02-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多