當前位置: 首頁>>技術教程>>正文


sound – 如何找出視頻中使用的編解碼器

, ,

問題描述

我如何查看視頻(音頻/視頻)中使用的編解碼器以及有關使用什麽來重現與視頻相同的壓縮/質量的額外信息。

最佳回答

一種方法是使用 VLC。打開有問題的文件,在播放列表中右鍵單擊它,您將看到如下內容:

我在 OS X 上,但想法是一樣的。

另一種方法是打開終端,導航到包含該文件的目錄並執行以下操作:

file foo.avi

這並沒有提供大量信息,但它是一個開始。

次佳回答

另一個 “harsh” 信息較少的命令行選項:

ffprobe -show_streams "file.mp4"

即使有更好的輸出,普通人仍然很難理解。如果您需要多種文件格式的樣本來測試它:

Video Format Examples

第三種回答

您可以通過安裝 mediainfo 獲取有關音頻/視頻編解碼器的信息和其他信息。 GUI(圖形用戶界麵)和 命令行 實用程序均可用。使用這些命令來安裝:

sudo apt-get update
sudo apt-get install mediainfo

如果要安裝 GUI,

sudo apt-get install mediainfo-gui

參考訪問 mediainfo

第四種回答

很難找到 ‘midenitfy’ 腳本。一個古老的副本看起來像:

#!/bin/sh
#
# This is a wrapper around the -identify functionality.
# It is supposed to escape the output properly, so it can be easily
# used in shellscripts by 'eval'ing the output of this script. 
#
# Written by Tobias Diedrich <ranma+mplayer@tdiedrich.de>
# Licensed under GNU GPL.

if [ -z "$1" ]; then
        echo "Usage: midentify <file> [<file> ...]"
        exit 1
fi

 mplayer -vo null -ao null -frames 0 -identify "$@" 2>/dev/null |
        sed -ne '/^ID_/ {
                           s/[]()|&;<>`'"'"'\\!$" []/\\&/g;p
                        }'

參考資料

本文由Ubuntu問答整理, 博文地址: https://ubuntuqa.com/zh-tw/article/13307.html,未經允許,請勿轉載。