獲取所需的軟件
sudo pacman -Syy mkvtoolnix-cli
從matroska文件中提取視頻和音頻
首先你需要檢查matroska文件包含哪些音軌
mkvmerge --identify video.mkv
File 'video.mkv': container: Matroska Track ID 1: video (V_MPEG4/ISO/AVC) Track ID 2: audio (A_AC3)
然後根據他們的音軌提取視頻和音頻:
文章內容來源︰https://ubuntuqa.com/zh-tw/article/608.html
mkvextract tracks video.mkv 1:video.h264 2:audio.ac3
Extracting track 1 with the CodecID 'V_MPEG4/ISO/AVC' to the file 'video.h264'. Container format: AVC/h.264 elementary stream Extracting track 2 with the CodecID 'A_AC3' to the file 'audio.ac3'. Container format: Dolby Digital (AC3) Progress:100%
沒有留言:
張貼留言