[英]Ffprobe with print json doesn't print anything
我試圖以人類可讀的方式獲取有關電影的信息(分辨率,幀速率,比特率,編解碼器,持續時間等)。 我找到了這個commnad:
ffprobe -v quiet -print_format json -show_format -show_streams somefile.asf
在此Stack Overflow問題中: 以友好的方式獲取ffmpeg信息
但它對我不起作用。 當我在終端中嘗試它時,輸出為空:
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不是最新的。
我做的是我添加了這個更新的存儲庫:
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輸出:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.