我在市圖借來的這本書第六章看到 FFmpeg :
Source : 天瓏
此書雖然有一章介紹 Python, 但那只是語法說明, 並非實際使用 Python 來實作語音辨識. 全書事實上主要是使用 Java, 不論是 FFT, MFCC, 或是深度學習都是用 Java. 雖然曾考過 SCJP, 但我這幾年改用 Python 後太久沒用 Java 了, 覺得很陌生.
FFmpeg 是一款可以進行音訊與視訊格式轉換, 錄影, 轉檔以及串流等功能的開放原始碼函式庫, 也是知名的開源影音播放器 MPlayer 背後所使用的技術之一. FFmpeg 開頭的 "FF" 並非 Fast Fourier 的意思, 而是 "Fast Forward", 參考 :
我參考下面這篇文章, 在我的 Raspberry Pi Zero W 上成功安裝了 FFmpeg :
一. 安裝 FFmpeg 函式庫 :
安裝所需指令有兩個 :
sudo apt update
sudo apt install -y ffmpeg
注意, 指令 sudo apt update 是必要的 (用來取得最新的安裝套件列表), 必須先執行, 否則安裝 FFmpeg 時會因為找不到 libav 編解碼器安裝套鍵而失敗.
安裝過程如下 :
pi@raspberrypi:~ $ sudo apt update
已有:1 http://archive.raspberrypi.org/debian buster InRelease
下載:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
E: Repository 'http://raspbian.raspberrypi.org/raspbian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
下載:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
下載:4 http://raspbian.raspberrypi.org/raspbian buster/contrib armhf Packages [58.8 kB]
下載:5 http://raspbian.raspberrypi.org/raspbian buster/non-free armhf Packages [104 kB]
取得 13.2 MB 用了 43s (305 kB/s)
正在讀取套件清單... 完成
正在重建相依關係
正在讀取狀態資料... 完成
440 packages can be upgraded. Run 'apt list --upgradable' to see them.
安裝 FFmpeg :
pi@raspberrypi:~ $ sudo apt install -y ffmpeg
正在讀取套件清單... 完成
正在重建相依關係
正在讀取狀態資料... 完成
下列的額外套件將被安裝:
libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4
libavutil56 libpostproc55 libswresample3 libswscale5 libwebpmux3
建議套件:
ffmpeg-doc
下列套件將會被升級:
ffmpeg libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4
libavutil56 libpostproc55 libswresample3 libswscale5 libwebpmux3
升級 11 個,新安裝 0 個,移除 0 個,有 429 個未被升級。
需要下載 14.6 MB 的套件檔。
此操作完成之後,會多佔用 318 kB 的磁碟空間。
下載:1 http://archive.raspberrypi.org/debian buster/main armhf ffmpeg armhf 7:4.1.8-0+deb10u1+rpt1 [1,437 kB]
下載:2 http://mirror.ossplanet.net/raspbian/raspbian buster/main armhf libwebpmux3 armhf 0.6.1-2+deb10u1 [94.0 kB]
下載:3 http://archive.raspberrypi.org/debian buster/main armhf libavdevice58 armhf 7:4.1.8-0+deb10u1+rpt1 [157 kB]
下載:4 http://archive.raspberrypi.org/debian buster/main armhf libavfilter7 armhf 7:4.1.8-0+deb10u1+rpt1 [1,456 kB]
下載:5 http://archive.raspberrypi.org/debian buster/main armhf libswscale5 armhf 7:4.1.8-0+deb10u1+rpt1 [259 kB]
下載:6 http://archive.raspberrypi.org/debian buster/main armhf libavformat58 armhf 7:4.1.8-0+deb10u1+rpt1 [1,526 kB]
下載:7 http://archive.raspberrypi.org/debian buster/main armhf libavcodec58 armhf 7:4.1.8-0+deb10u1+rpt1 [8,938 kB]
下載:8 http://archive.raspberrypi.org/debian buster/main armhf libswresample3 armhf 7:4.1.8-0+deb10u1+rpt1 [124 kB]
下載:9 http://archive.raspberrypi.org/debian buster/main armhf libpostproc55 armhf 7:4.1.8-0+deb10u1+rpt1 [101 kB]
下載:10 http://archive.raspberrypi.org/debian buster/main armhf libavresample4 armhf 7:4.1.8-0+deb10u1+rpt1 [110 kB]
下載:11 http://archive.raspberrypi.org/debian buster/main armhf libavutil56 armhf 7:4.1.8-0+deb10u1+rpt1 [362 kB]
取得 14.6 MB 用了 7s (2,238 kB/s)
apt-listchanges: 讀取改變紀錄(changelogs)...
(讀取資料庫 ... 目前共安裝了 157416 個檔案和目錄。)
正在準備解包 .../00-ffmpeg_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking ffmpeg (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../01-libavdevice58_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking libavdevice58:armhf (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../02-libavfilter7_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking libavfilter7:armhf (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../03-libswscale5_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking libswscale5:armhf (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../04-libavformat58_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking libavformat58:armhf (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../05-libavcodec58_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking libavcodec58:armhf (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../06-libswresample3_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking libswresample3:armhf (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../07-libpostproc55_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking libpostproc55:armhf (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../08-libavresample4_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking libavresample4:armhf (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../09-libavutil56_7%3a4.1.8-0+deb10u1+rpt1_armhf.deb……
Unpacking libavutil56:armhf (7:4.1.8-0+deb10u1+rpt1) over (7:4.1.4-1+rpt7~deb10u1) ...
正在準備解包 .../10-libwebpmux3_0.6.1-2+deb10u1_armhf.deb……
Unpacking libwebpmux3:armhf (0.6.1-2+deb10u1) over (0.6.1-2) ...
設定 libavutil56:armhf (7:4.1.8-0+deb10u1+rpt1) ...
設定 libpostproc55:armhf (7:4.1.8-0+deb10u1+rpt1) ...
設定 libswscale5:armhf (7:4.1.8-0+deb10u1+rpt1) ...
設定 libwebpmux3:armhf (0.6.1-2+deb10u1) ...
設定 libswresample3:armhf (7:4.1.8-0+deb10u1+rpt1) ...
設定 libavresample4:armhf (7:4.1.8-0+deb10u1+rpt1) ...
設定 libavcodec58:armhf (7:4.1.8-0+deb10u1+rpt1) ...
設定 libavformat58:armhf (7:4.1.8-0+deb10u1+rpt1) ...
設定 libavfilter7:armhf (7:4.1.8-0+deb10u1+rpt1) ...
設定 libavdevice58:armhf (7:4.1.8-0+deb10u1+rpt1) ...
設定 ffmpeg (7:4.1.8-0+deb10u1+rpt1) ...
執行 man-db (2.8.5-2) 的觸發程式……
執行 libc-bin (2.28-10+rpi1) 的觸發程式……
這樣 FFmpeg 就安裝完成了.
二. 檢查 FFmpeg 版本 :
接著用下列指令檢查 FFmpeg 版本 :
ffmpeg -version
pi@raspberrypi:~ $ ffmpeg -version
ffmpeg version 4.1.8-0+deb10u1+rpt1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6+rpi1)
configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
可見安裝的 FFmpeg 版本是 v4.1.8.
三. 檢視 FFmpeg 的編解碼器 :
可用下列兩個指令檢查編解碼器 :
ffmpeg -encoders (檢視編碼器)
ffmpeg -decoders (檢視解碼器)
檢視編碼器 :
pi@raspberrypi:~ $ ffmpeg -encoders
ffmpeg version 4.1.8-0+deb10u1+rpt1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6+rpi1)
configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Encoders:
V..... = Video
A..... = Audio
S..... = Subtitle
.F.... = Frame-level multithreading
..S... = Slice-level multithreading
...X.. = Codec is experimental
....B. = Supports draw_horiz_band
.....D = Supports direct rendering method 1
------
V..... a64multi Multicolor charset for Commodore 64 (codec a64_multi)
V..... a64multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5)
V..... alias_pix Alias/Wavefront PIX image
V..... amv AMV Video
V..... apng APNG (Animated Portable Network Graphics) image
V..... asv1 ASUS V1
V..... asv2 ASUS V2
V..X.. libaom-av1 libaom AV1 (codec av1)
V..... avrp Avid 1:1 10-bit RGB Packer
V..X.. avui Avid Meridien Uncompressed
V..... ayuv Uncompressed packed MS 4:4:4:4
V..... bmp BMP (Windows and OS/2 bitmap)
V..... cinepak Cinepak
V..... cljr Cirrus Logic AccuPak
V.S... vc2 SMPTE VC-2 (codec dirac)
VFS... dnxhd VC3/DNxHD
V..... dpx DPX (Digital Picture Exchange) image
VFS... dvvideo DV (Digital Video)
V.S... ffv1 FFmpeg video codec #1
VF.... ffvhuff Huffyuv FFmpeg variant
V..... fits Flexible Image Transport System
V..... flashsv Flash Screen Video
V..... flashsv2 Flash Screen Video Version 2
V..... flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1)
V..... gif GIF (Graphics Interchange Format)
V..... h261 H.261
V..... h263 H.263 / H.263-1996
V..... h263_v4l2m2m V4L2 mem2mem H.263 encoder wrapper (codec h263)
V.S... h263p H.263+ / H.263-1998 / H.263 version 2
V..... libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
V..... libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
V..... h264_omx OpenMAX IL H.264 video encoder (codec h264)
V..... h264_v4l2m2m V4L2 mem2mem H.264 encoder wrapper (codec h264)
V..... h264_vaapi H.264/AVC (VAAPI) (codec h264)
V..... hap Vidvox Hap
V..... libx265 libx265 H.265 / HEVC (codec hevc)
V..... hevc_v4l2m2m V4L2 mem2mem HEVC encoder wrapper (codec hevc)
V..... hevc_vaapi H.265/HEVC (VAAPI) (codec hevc)
VF.... huffyuv Huffyuv / HuffYUV
V..... jpeg2000 JPEG 2000
VF.... libopenjpeg OpenJPEG JPEG 2000 (codec jpeg2000)
VF.... jpegls JPEG-LS
VF.... ljpeg Lossless JPEG
VF.... magicyuv MagicYUV video
VFS... mjpeg MJPEG (Motion JPEG)
V..... mjpeg_vaapi MJPEG (VAAPI) (codec mjpeg)
V.S... mpeg1video MPEG-1 video
V.S... mpeg2video MPEG-2 video
V..... mpeg2_vaapi MPEG-2 (VAAPI) (codec mpeg2video)
V.S... mpeg4 MPEG-4 part 2
V..... libxvid libxvidcore MPEG-4 part 2 (codec mpeg4)
V..... mpeg4_v4l2m2m V4L2 mem2mem MPEG4 encoder wrapper (codec mpeg4)
V..... msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2
V..... msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3)
V..... msvideo1 Microsoft Video-1
V..... pam PAM (Portable AnyMap) image
V..... pbm PBM (Portable BitMap) image
V..... pcx PC Paintbrush PCX image
V..... pgm PGM (Portable GrayMap) image
V..... pgmyuv PGMYUV (Portable GrayMap YUV) image
VF.... png PNG (Portable Network Graphics) image
V..... ppm PPM (Portable PixelMap) image
VF.... prores Apple ProRes
VF.... prores_aw Apple ProRes (codec prores)
VFS... prores_ks Apple ProRes (iCodec Pro) (codec prores)
V..... qtrle QuickTime Animation (RLE) video
V..... r10k AJA Kona 10-bit RGB Codec
V..... r210 Uncompressed RGB 10-bit
V..... rawvideo raw video
V..... roqvideo id RoQ video (codec roq)
V..... rv10 RealVideo 1.0
V..... rv20 RealVideo 2.0
V..... sgi SGI image
V..... snow Snow
V..... sunrast Sun Rasterfile image
V..... svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
V..... targa Truevision Targa image
V..... libtheora libtheora Theora (codec theora)
VF.... tiff TIFF image
VF.... utvideo Ut Video
V..... v210 Uncompressed 4:2:2 10-bit
V..... v308 Uncompressed packed 4:4:4
V..... v408 Uncompressed packed QT 4:4:4:4
V..... v410 Uncompressed 4:4:4 10-bit
V..... libvpx libvpx VP8 (codec vp8)
V..... vp8_v4l2m2m V4L2 mem2mem VP8 encoder wrapper (codec vp8)
V..... vp8_vaapi VP8 (VAAPI) (codec vp8)
V..... libvpx-vp9 libvpx VP9 (codec vp9)
V..... vp9_vaapi VP9 (VAAPI) (codec vp9)
V..... libwebp_anim libwebp WebP image (codec webp)
V..... libwebp libwebp WebP image (codec webp)
V..... wmv1 Windows Media Video 7
V..... wmv2 Windows Media Video 8
V..... wrapped_avframe AVFrame to AVPacket passthrough
V..... xbm XBM (X BitMap) image
V..... xface X-face image
V..... xwd XWD (X Window Dump) image
V..... y41p Uncompressed YUV 4:1:1 12-bit
V..... yuv4 Uncompressed packed 4:2:0
VF.... zlib LCL (LossLess Codec Library) ZLIB
V..... zmbv Zip Motion Blocks Video
A..... aac AAC (Advanced Audio Coding)
A..... ac3 ATSC A/52A (AC-3)
A..... ac3_fixed ATSC A/52A (AC-3) (codec ac3)
A..... adpcm_adx SEGA CRI ADX ADPCM
A..... g722 G.722 ADPCM (codec adpcm_g722)
A..... g726 G.726 ADPCM (codec adpcm_g726)
A..... g726le G.726 little endian ADPCM ("right-justified") (codec adpcm_g726le)
A..... adpcm_ima_qt ADPCM IMA QuickTime
A..... adpcm_ima_wav ADPCM IMA WAV
A..... adpcm_ms ADPCM Microsoft
A..... adpcm_swf ADPCM Shockwave Flash
A..... adpcm_yamaha ADPCM Yamaha
A..... alac ALAC (Apple Lossless Audio Codec)
A..... aptx aptX (Audio Processing Technology for Bluetooth)
A..... aptx_hd aptX HD (Audio Processing Technology for Bluetooth)
A..... libcodec2 codec2 encoder using libcodec2 (codec codec2)
A..... comfortnoise RFC 3389 comfort noise generator
A..X.. dca DCA (DTS Coherent Acoustics) (codec dts)
A..... eac3 ATSC A/52 E-AC-3
A..... flac FLAC (Free Lossless Audio Codec)
A..... g723_1 G.723.1
A..... libgsm libgsm GSM (codec gsm)
A..... libgsm_ms libgsm GSM Microsoft variant (codec gsm_ms)
A..X.. mlp MLP (Meridian Lossless Packing)
A..... mp2 MP2 (MPEG audio layer 2)
A..... mp2fixed MP2 fixed point (MPEG audio layer 2) (codec mp2)
A..... libtwolame libtwolame MP2 (MPEG audio layer 2) (codec mp2)
A..... libmp3lame libmp3lame MP3 (MPEG audio layer 3) (codec mp3)
A..... libshine libshine MP3 (MPEG audio layer 3) (codec mp3)
A..... nellymoser Nellymoser Asao
A..X.. opus Opus
A..... libopus libopus Opus (codec opus)
A..... pcm_alaw PCM A-law / G.711 A-law
A..... pcm_f32be PCM 32-bit floating point big-endian
A..... pcm_f32le PCM 32-bit floating point little-endian
A..... pcm_f64be PCM 64-bit floating point big-endian
A..... pcm_f64le PCM 64-bit floating point little-endian
A..... pcm_mulaw PCM mu-law / G.711 mu-law
A..... pcm_s16be PCM signed 16-bit big-endian
A..... pcm_s16be_planar PCM signed 16-bit big-endian planar
A..... pcm_s16le PCM signed 16-bit little-endian
A..... pcm_s16le_planar PCM signed 16-bit little-endian planar
A..... pcm_s24be PCM signed 24-bit big-endian
A..... pcm_s24daud PCM D-Cinema audio signed 24-bit
A..... pcm_s24le PCM signed 24-bit little-endian
A..... pcm_s24le_planar PCM signed 24-bit little-endian planar
A..... pcm_s32be PCM signed 32-bit big-endian
A..... pcm_s32le PCM signed 32-bit little-endian
A..... pcm_s32le_planar PCM signed 32-bit little-endian planar
A..... pcm_s64be PCM signed 64-bit big-endian
A..... pcm_s64le PCM signed 64-bit little-endian
A..... pcm_s8 PCM signed 8-bit
A..... pcm_s8_planar PCM signed 8-bit planar
A..... pcm_u16be PCM unsigned 16-bit big-endian
A..... pcm_u16le PCM unsigned 16-bit little-endian
A..... pcm_u24be PCM unsigned 24-bit big-endian
A..... pcm_u24le PCM unsigned 24-bit little-endian
A..... pcm_u32be PCM unsigned 32-bit big-endian
A..... pcm_u32le PCM unsigned 32-bit little-endian
A..... pcm_u8 PCM unsigned 8-bit
A..... pcm_vidc PCM Archimedes VIDC
A..... real_144 RealAudio 1.0 (14.4K) (codec ra_144)
A..... roq_dpcm id RoQ DPCM
A..X.. s302m SMPTE 302M
A..... sbc SBC (low-complexity subband codec)
A..X.. sonic Sonic
A..X.. sonicls Sonic lossless
A..... libspeex libspeex Speex (codec speex)
A..X.. truehd TrueHD
A..... tta TTA (True Audio)
A..X.. vorbis Vorbis
A..... libvorbis libvorbis (codec vorbis)
A..... wavpack WavPack
A..... libwavpack (codec wavpack)
A..... wmav1 Windows Media Audio 1
A..... wmav2 Windows Media Audio 2
S..... ssa ASS (Advanced SubStation Alpha) subtitle (codec ass)
S..... ass ASS (Advanced SubStation Alpha) subtitle
S..... dvbsub DVB subtitles (codec dvb_subtitle)
S..... dvdsub DVD subtitles (codec dvd_subtitle)
S..... mov_text 3GPP Timed Text subtitle
S..... srt SubRip subtitle (codec subrip)
S..... subrip SubRip subtitle
S..... text Raw text subtitle
S..... webvtt WebVTT subtitle
S..... xsub DivX subtitles (XSUB)
檢查解碼器 :
pi@raspberrypi:~ $ ffmpeg -decoders
ffmpeg version 4.1.8-0+deb10u1+rpt1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6+rpi1)
configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Decoders:
V..... = Video
A..... = Audio
S..... = Subtitle
.F.... = Frame-level multithreading
..S... = Slice-level multithreading
...X.. = Codec is experimental
....B. = Supports draw_horiz_band
.....D = Supports direct rendering method 1
------
V....D 012v Uncompressed 4:2:2 10-bit
V....D 4xm 4X Movie
V....D 8bps QuickTime 8BPS video
V....D aasc Autodesk RLE
VF...D aic Apple Intermediate Codec
V....D alias_pix Alias/Wavefront PIX image
V....D amv AMV Video
V....D anm Deluxe Paint Animation
V....D ansi ASCII/ANSI art
VF...D apng APNG (Animated Portable Network Graphics) image
V....D asv1 ASUS V1
V....D asv2 ASUS V2
V....D aura Auravision AURA
V....D aura2 Auravision Aura 2
V....D libaom-av1 libaom AV1 (codec av1)
V..... avrn Avid AVI Codec
V....D avrp Avid 1:1 10-bit RGB Packer
V....D avs AVS (Audio Video Standard) video
V....D avui Avid Meridien Uncompressed
V....D ayuv Uncompressed packed MS 4:4:4:4
V....D bethsoftvid Bethesda VID video
V....D bfi Brute Force & Ignorance
V....D binkvideo Bink video
V....D bintext Binary text
V..X.. bitpacked Bitpacked
V....D bmp BMP (Windows and OS/2 bitmap)
V....D bmv_video Discworld II BMV video
V....D brender_pix BRender PIX image
V....D c93 Interplay C93
V....D cavs Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)
V....D cdgraphics CD Graphics video
V....D cdxl Commodore CDXL video
VF...D cfhd Cineform HD
V....D cinepak Cinepak
V....D clearvideo Iterated Systems ClearVideo
V....D cljr Cirrus Logic AccuPak
VF...D cllc Canopus Lossless Codec
V....D eacmv Electronic Arts CMV video (codec cmv)
V....D cpia CPiA video format
V....D camstudio CamStudio (codec cscd)
V....D cyuv Creative YUV (CYUV)
V.S..D dds DirectDraw Surface image decoder
V....D dfa Chronomaster DFA
V.S..D dirac BBC Dirac VC-2
VFS..D dnxhd VC3/DNxHD
V....D dpx DPX (Digital Picture Exchange) image
V....D dsicinvideo Delphine Software International CIN video
V.S..D dvvideo DV (Digital Video)
V....D dxa Feeble Files/ScummVM DXA
V....D dxtory Dxtory
VFS..D dxv Resolume DXV
V....D escape124 Escape 124
V....D escape130 Escape 130
VFS..D exr OpenEXR image
VFS..D ffv1 FFmpeg video codec #1
VF..BD ffvhuff Huffyuv FFmpeg variant
V.S..D fic Mirillis FIC
V....D fits Flexible Image Transport System
V....D flashsv Flash Screen Video v1
V....D flashsv2 Flash Screen Video v2
V....D flic Autodesk Animator Flic video
V...BD flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1)
V....D fmvc FM Screen Capture Codec
VF...D fraps Fraps
V....D frwu Forward Uncompressed
V....D g2m Go2Meeting
V....D gdv Gremlin Digital Video
V....D gif GIF (Graphics Interchange Format)
V....D h261 H.261
V...BD h263 H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
V..... h263_v4l2m2m V4L2 mem2mem H.263 decoder wrapper (codec h263)
V...BD h263i Intel H.263
V...BD h263p H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2
VFS..D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
V..... h264_v4l2m2m V4L2 mem2mem H.264 decoder wrapper (codec h264)
V..... h264_mmal h264 (mmal) (codec h264)
VFS..D hap Vidvox Hap
VFS..D hevc HEVC (High Efficiency Video Coding)
VF...D hevc_rpi HEVC (rpi) (codec hevc)
V..... hevc_v4l2m2m V4L2 mem2mem HEVC decoder wrapper (codec hevc)
V....D hnm4video HNM 4 video
V....D hq_hqa Canopus HQ/HQA
VFS..D hqx Canopus HQX
VF..BD huffyuv Huffyuv / HuffYUV
V....D idcinvideo id Quake II CIN video (codec idcin)
V....D idf iCEDraw text
V....D iff IFF ACBM/ANIM/DEEP/ILBM/PBM/RGB8/RGBN (codec iff_ilbm)
V....D imm4 Infinity IMM4
V....D indeo2 Intel Indeo 2
V....D indeo3 Intel Indeo 3
V....D indeo4 Intel Indeo Video Interactive 4
V....D indeo5 Intel Indeo Video Interactive 5
V....D interplayvideo Interplay MVE video
VFS..D jpeg2000 JPEG 2000
VF...D libopenjpeg OpenJPEG JPEG 2000 (codec jpeg2000)
V....D jpegls JPEG-LS
V....D jv Bitmap Brothers JV video
V....D kgv1 Kega Game Video
V....D kmvc Karl Morton's video codec
VF...D lagarith Lagarith lossless
V....D loco LOCO
V....D m101 Matrox Uncompressed SD
V....D eamad Electronic Arts Madcow Video (codec mad)
VFS..D magicyuv MagicYUV video
VF...D mdec Sony PlayStation MDEC (Motion DECoder)
VF...D mimic Mimic
V....D mjpeg MJPEG (Motion JPEG)
V....D mjpegb Apple MJPEG-B
V....D mmvideo American Laser Games MM Video
V....D motionpixels Motion Pixels video
V.S.BD mpeg1video MPEG-1 video
V..... mpeg1_v4l2m2m V4L2 mem2mem MPEG1 decoder wrapper (codec mpeg1video)
V.S.BD mpeg2video MPEG-2 video
V.S.BD mpegvideo MPEG-1 video (codec mpeg2video)
V..... mpeg2_mmal mpeg2 (mmal) (codec mpeg2video)
V..... mpeg2_v4l2m2m V4L2 mem2mem MPEG2 decoder wrapper (codec mpeg2video)
VF..BD mpeg4 MPEG-4 part 2
V..... mpeg4_v4l2m2m V4L2 mem2mem MPEG4 decoder wrapper (codec mpeg4)
V..... mpeg4_mmal mpeg4 (mmal) (codec mpeg4)
V....D msa1 MS ATC Screen
V....D mscc Mandsoft Screen Capture Codec
V...BD msmpeg4v1 MPEG-4 part 2 Microsoft variant version 1
V...BD msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2
V...BD msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3)
V....D msrle Microsoft RLE
V....D mss1 MS Screen 1
V....D mss2 MS Windows Media Video V9 Screen
V....D msvideo1 Microsoft Video 1
VF...D mszh LCL (LossLess Codec Library) MSZH
V....D mts2 MS Expression Encoder Screen
V....D mvc1 Silicon Graphics Motion Video Compressor 1
V....D mvc2 Silicon Graphics Motion Video Compressor 2
V....D mwsc MatchWare Screen Capture Codec
V....D mxpeg Mobotix MxPEG video
V....D nuv NuppelVideo/RTJPEG
V....D paf_video Amazing Studio Packed Animation File Video
V....D pam PAM (Portable AnyMap) image
V....D pbm PBM (Portable BitMap) image
V....D pcx PC Paintbrush PCX image
V....D pgm PGM (Portable GrayMap) image
V....D pgmyuv PGMYUV (Portable GrayMap YUV) image
V....D pictor Pictor/PC Paint
VF...D pixlet Apple Pixlet
VF...D png PNG (Portable Network Graphics) image
V....D ppm PPM (Portable PixelMap) image
VFS..D prores ProRes (iCodec Pro)
V....D prosumer Brooktree ProSumer Video
VF...D psd Photoshop PSD file
V....D ptx V.Flash PTX image
V....D qdraw Apple QuickDraw
V....D qpeg Q-team QPEG
V....D qtrle QuickTime Animation (RLE) video
V....D r10k AJA Kona 10-bit RGB Codec
V....D r210 Uncompressed RGB 10-bit
V....D rasc RemotelyAnywhere Screen Capture
V..... rawvideo raw video
V....D rl2 RL2 video
V....D roqvideo id RoQ video (codec roq)
V....D rpza QuickTime video (RPZA)
V....D rscc innoHeim/Rsupport Screen Capture Codec
V....D rv10 RealVideo 1.0
V....D rv20 RealVideo 2.0
VF...D rv30 RealVideo 3.0
VF...D rv40 RealVideo 4.0
V....D sanm LucasArts SANM/Smush video
V....D scpr ScreenPressor
V....D screenpresso Screenpresso
V....D sgi SGI image
V....D sgirle Silicon Graphics RLE 8-bit video
VF...D sheervideo BitJazz SheerVideo
V....D smackvid Smacker video (codec smackvideo)
V....D smc QuickTime Graphics (SMC)
V..... smvjpeg SMV JPEG
V....D snow Snow
V....D sp5x Sunplus JPEG (SP5X)
V....D speedhq NewTek SpeedHQ
V....D srgc Screen Recorder Gold Codec
V....D sunrast Sun Rasterfile image
V....D librsvg Librsvg rasterizer (codec svg)
V....D svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1
V...BD svq3 Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3
V....D targa Truevision Targa image
V....D targa_y216 Pinnacle TARGA CineWave YUV16
V....D tdsc TDSC
V....D eatgq Electronic Arts TGQ video (codec tgq)
V....D eatgv Electronic Arts TGV video (codec tgv)
VF..BD theora Theora
V....D thp Nintendo Gamecube THP video
V....D tiertexseqvideo Tiertex Limited SEQ video
VF...D tiff TIFF image
V....D tmv 8088flex TMV
V....D eatqi Electronic Arts TQI Video (codec tqi)
V....D truemotion1 Duck TrueMotion 1.0
V....D truemotion2 Duck TrueMotion 2.0
V....D truemotion2rt Duck TrueMotion 2.0 Real Time
V....D camtasia TechSmith Screen Capture Codec (codec tscc)
V....D tscc2 TechSmith Screen Codec 2
V....D txd Renderware TXD (TeXture Dictionary) image
V....D ultimotion IBM UltiMotion (codec ulti)
VF...D utvideo Ut Video
V....D v210 Uncompressed 4:2:2 10-bit
V....D v210x Uncompressed 4:2:2 10-bit
V....D v308 Uncompressed packed 4:4:4
V....D v408 Uncompressed packed QT 4:4:4:4
V....D v410 Uncompressed 4:4:4 10-bit
V....D vb Beam Software VB
VF...D vble VBLE Lossless Codec
V....D vc1 SMPTE VC-1
V..... vc1_mmal vc1 (mmal) (codec vc1)
V..... vc1_v4l2m2m V4L2 mem2mem VC1 decoder wrapper (codec vc1)
V....D vc1image Windows Media Video 9 Image v2
V....D vcr1 ATI VCR1
V....D xl Miro VideoXL (codec vixl)
V....D vmdvideo Sierra VMD video
V....D vmnc VMware Screen Codec / VMware Video
VF..BD vp3 On2 VP3
V....D vp5 On2 VP5
V....D vp6 On2 VP6
V.S..D vp6a On2 VP6 (Flash version, with alpha channel)
V....D vp6f On2 VP6 (Flash version)
V....D vp7 On2 VP7
VFS..D vp8 On2 VP8
V..... vp8_v4l2m2m V4L2 mem2mem VP8 decoder wrapper (codec vp8)
V....D libvpx libvpx VP8 (codec vp8)
VFS..D vp9 Google VP9
V..... vp9_v4l2m2m V4L2 mem2mem VP9 decoder wrapper (codec vp9)
V....D libvpx-vp9 libvpx VP9 (codec vp9)
V....D wcmv WinCAM Motion Video
VF...D webp WebP image
V...BD wmv1 Windows Media Video 7
V...BD wmv2 Windows Media Video 8
V....D wmv3 Windows Media Video 9
V....D wmv3image Windows Media Video 9 Image
V....D wnv1 Winnov WNV1
V..... wrapped_avframe AVPacket to AVFrame passthrough
V....D vqavideo Westwood Studios VQA (Vector Quantized Animation) video (codec ws_vqa)
V....D xan_wc3 Wing Commander III / Xan
V....D xan_wc4 Wing Commander IV / Xxan
V....D xbin eXtended BINary text
V....D xbm XBM (X BitMap) image
V..... xface X-face image
V....D xpm XPM (X PixMap) image
V....D xwd XWD (X Window Dump) image
V....D y41p Uncompressed YUV 4:1:1 12-bit
VF...D ylc YUY2 Lossless Codec
V..... yop Psygnosis YOP Video
V....D yuv4 Uncompressed packed 4:2:0
V....D zerocodec ZeroCodec Lossless Video
VF...D zlib LCL (LossLess Codec Library) ZLIB
V....D zmbv Zip Motion Blocks Video
A....D 8svx_exp 8SVX exponential
A....D 8svx_fib 8SVX fibonacci
A....D aac AAC (Advanced Audio Coding)
A....D aac_fixed AAC (Advanced Audio Coding) (codec aac)
A....D aac_latm AAC LATM (Advanced Audio Coding LATM syntax)
A....D ac3 ATSC A/52A (AC-3)
A....D ac3_fixed ATSC A/52A (AC-3) (codec ac3)
A....D adpcm_4xm ADPCM 4X Movie
A....D adpcm_adx SEGA CRI ADX ADPCM
A....D adpcm_afc ADPCM Nintendo Gamecube AFC
A....D adpcm_aica ADPCM Yamaha AICA
A....D adpcm_ct ADPCM Creative Technology
A....D adpcm_dtk ADPCM Nintendo Gamecube DTK
A....D adpcm_ea ADPCM Electronic Arts
A....D adpcm_ea_maxis_xa ADPCM Electronic Arts Maxis CDROM XA
A....D adpcm_ea_r1 ADPCM Electronic Arts R1
A....D adpcm_ea_r2 ADPCM Electronic Arts R2
A....D adpcm_ea_r3 ADPCM Electronic Arts R3
A....D adpcm_ea_xas ADPCM Electronic Arts XAS
A....D g722 G.722 ADPCM (codec adpcm_g722)
A....D g726 G.726 ADPCM (codec adpcm_g726)
A....D g726le G.726 ADPCM little-endian (codec adpcm_g726le)
A....D adpcm_ima_amv ADPCM IMA AMV
A....D adpcm_ima_apc ADPCM IMA CRYO APC
A....D adpcm_ima_dat4 ADPCM IMA Eurocom DAT4
A....D adpcm_ima_dk3 ADPCM IMA Duck DK3
A....D adpcm_ima_dk4 ADPCM IMA Duck DK4
A....D adpcm_ima_ea_eacs ADPCM IMA Electronic Arts EACS
A....D adpcm_ima_ea_sead ADPCM IMA Electronic Arts SEAD
A....D adpcm_ima_iss ADPCM IMA Funcom ISS
A....D adpcm_ima_oki ADPCM IMA Dialogic OKI
A....D adpcm_ima_qt ADPCM IMA QuickTime
A....D adpcm_ima_rad ADPCM IMA Radical
A....D adpcm_ima_smjpeg ADPCM IMA Loki SDL MJPEG
A....D adpcm_ima_wav ADPCM IMA WAV
A....D adpcm_ima_ws ADPCM IMA Westwood
A....D adpcm_ms ADPCM Microsoft
A....D adpcm_mtaf ADPCM MTAF
A....D adpcm_psx ADPCM Playstation
A....D adpcm_sbpro_2 ADPCM Sound Blaster Pro 2-bit
A....D adpcm_sbpro_3 ADPCM Sound Blaster Pro 2.6-bit
A....D adpcm_sbpro_4 ADPCM Sound Blaster Pro 4-bit
A....D adpcm_swf ADPCM Shockwave Flash
A....D adpcm_thp ADPCM Nintendo THP
A....D adpcm_thp_le ADPCM Nintendo THP (little-endian)
A....D adpcm_vima LucasArts VIMA audio
A....D adpcm_xa ADPCM CDROM XA
A....D adpcm_yamaha ADPCM Yamaha
AF...D alac ALAC (Apple Lossless Audio Codec)
A....D amrnb AMR-NB (Adaptive Multi-Rate NarrowBand) (codec amr_nb)
A....D amrwb AMR-WB (Adaptive Multi-Rate WideBand) (codec amr_wb)
A....D ape Monkey's Audio
A....D aptx aptX (Audio Processing Technology for Bluetooth)
A....D aptx_hd aptX HD (Audio Processing Technology for Bluetooth)
A....D atrac1 ATRAC1 (Adaptive TRansform Acoustic Coding)
A....D atrac3 ATRAC3 (Adaptive TRansform Acoustic Coding 3)
A....D atrac3al ATRAC3 AL (Adaptive TRansform Acoustic Coding 3 Advanced Lossless)
A....D atrac3plus ATRAC3+ (Adaptive TRansform Acoustic Coding 3+) (codec atrac3p)
A....D atrac3plusal ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless) (codec atrac3pal)
A....D atrac9 ATRAC9 (Adaptive TRansform Acoustic Coding 9)
A....D on2avc On2 Audio for Video Codec (codec avc)
A....D binkaudio_dct Bink Audio (DCT)
A....D binkaudio_rdft Bink Audio (RDFT)
A....D bmv_audio Discworld II BMV audio
A..... libcodec2 codec2 decoder using libcodec2 (codec codec2)
A....D comfortnoise RFC 3389 comfort noise generator
A....D cook Cook / Cooker / Gecko (RealAudio G2)
A....D dolby_e Dolby E
A..... dsd_lsbf DSD (Direct Stream Digital), least significant bit first
A..... dsd_lsbf_planar DSD (Direct Stream Digital), least significant bit first, planar
A..... dsd_msbf DSD (Direct Stream Digital), most significant bit first
A..... dsd_msbf_planar DSD (Direct Stream Digital), most significant bit first, planar
A....D dsicinaudio Delphine Software International CIN audio
A....D dss_sp Digital Speech Standard - Standard Play mode (DSS SP)
A....D dst DST (Digital Stream Transfer)
A....D dca DCA (DTS Coherent Acoustics) (codec dts)
A....D dvaudio Ulead DV Audio
A....D eac3 ATSC A/52B (AC-3, E-AC-3)
A....D evrc EVRC (Enhanced Variable Rate Codec)
AF...D flac FLAC (Free Lossless Audio Codec)
A....D g723_1 G.723.1
A....D g729 G.729
A....D gremlin_dpcm DPCM Gremlin
A....D gsm GSM
A....D libgsm libgsm GSM (codec gsm)
A....D gsm_ms GSM Microsoft variant
A....D libgsm_ms libgsm GSM Microsoft variant (codec gsm_ms)
A....D iac IAC (Indeo Audio Coder)
A....D ilbc iLBC (Internet Low Bitrate Codec)
A....D imc IMC (Intel Music Coder)
A....D interplay_dpcm DPCM Interplay
A....D interplayacm Interplay ACM
A....D mace3 MACE (Macintosh Audio Compression/Expansion) 3:1
A....D mace6 MACE (Macintosh Audio Compression/Expansion) 6:1
A....D metasound Voxware MetaSound
A....D mlp MLP (Meridian Lossless Packing)
A....D mp1 MP1 (MPEG audio layer 1)
A....D mp1float MP1 (MPEG audio layer 1) (codec mp1)
A....D mp2 MP2 (MPEG audio layer 2)
A....D mp2float MP2 (MPEG audio layer 2) (codec mp2)
A....D mp3float MP3 (MPEG audio layer 3) (codec mp3)
A....D mp3 MP3 (MPEG audio layer 3)
A....D mp3adufloat ADU (Application Data Unit) MP3 (MPEG audio layer 3) (codec mp3adu)
A....D mp3adu ADU (Application Data Unit) MP3 (MPEG audio layer 3)
A....D mp3on4float MP3onMP4 (codec mp3on4)
A....D mp3on4 MP3onMP4
A....D als MPEG-4 Audio Lossless Coding (ALS) (codec mp4als)
A....D mpc7 Musepack SV7 (codec musepack7)
A....D mpc8 Musepack SV8 (codec musepack8)
A....D nellymoser Nellymoser Asao
A....D opus Opus
A....D libopus libopus Opus (codec opus)
A....D paf_audio Amazing Studio Packed Animation File Audio
A....D pcm_alaw PCM A-law / G.711 A-law
A....D pcm_bluray PCM signed 16|20|24-bit big-endian for Blu-ray media
A....D pcm_dvd PCM signed 16|20|24-bit big-endian for DVD media
A....D pcm_f16le PCM 16.8 floating point little-endian
A....D pcm_f24le PCM 24.0 floating point little-endian
A....D pcm_f32be PCM 32-bit floating point big-endian
A....D pcm_f32le PCM 32-bit floating point little-endian
A....D pcm_f64be PCM 64-bit floating point big-endian
A....D pcm_f64le PCM 64-bit floating point little-endian
A....D pcm_lxf PCM signed 20-bit little-endian planar
A....D pcm_mulaw PCM mu-law / G.711 mu-law
A....D pcm_s16be PCM signed 16-bit big-endian
A....D pcm_s16be_planar PCM signed 16-bit big-endian planar
A....D pcm_s16le PCM signed 16-bit little-endian
A....D pcm_s16le_planar PCM signed 16-bit little-endian planar
A....D pcm_s24be PCM signed 24-bit big-endian
A....D pcm_s24daud PCM D-Cinema audio signed 24-bit
A....D pcm_s24le PCM signed 24-bit little-endian
A....D pcm_s24le_planar PCM signed 24-bit little-endian planar
A....D pcm_s32be PCM signed 32-bit big-endian
A....D pcm_s32le PCM signed 32-bit little-endian
A....D pcm_s32le_planar PCM signed 32-bit little-endian planar
A....D pcm_s64be PCM signed 64-bit big-endian
A....D pcm_s64le PCM signed 64-bit little-endian
A....D pcm_s8 PCM signed 8-bit
A....D pcm_s8_planar PCM signed 8-bit planar
A....D pcm_u16be PCM unsigned 16-bit big-endian
A....D pcm_u16le PCM unsigned 16-bit little-endian
A....D pcm_u24be PCM unsigned 24-bit big-endian
A....D pcm_u24le PCM unsigned 24-bit little-endian
A....D pcm_u32be PCM unsigned 32-bit big-endian
A....D pcm_u32le PCM unsigned 32-bit little-endian
A....D pcm_u8 PCM unsigned 8-bit
A....D pcm_vidc PCM Archimedes VIDC
A....D pcm_zork PCM Zork
A....D qcelp QCELP / PureVoice
A....D qdm2 QDesign Music Codec 2
A....D qdmc QDesign Music Codec 1
A....D real_144 RealAudio 1.0 (14.4K) (codec ra_144)
A....D real_288 RealAudio 2.0 (28.8K) (codec ra_288)
A....D ralf RealAudio Lossless
A....D roq_dpcm DPCM id RoQ
A....D s302m SMPTE 302M
A....D sbc SBC (low-complexity subband codec)
A....D sdx2_dpcm DPCM Squareroot-Delta-Exact
A....D shorten Shorten
A....D sipr RealAudio SIPR / ACELP.NET
A....D smackaud Smacker audio (codec smackaudio)
A....D sol_dpcm DPCM Sol
A..X.D sonic Sonic
A....D libspeex libspeex Speex (codec speex)
AF...D tak TAK (Tom's lossless Audio Kompressor)
A....D truehd TrueHD
A....D truespeech DSP Group TrueSpeech
AF...D tta TTA (True Audio)
A....D twinvq VQF TwinVQ
A....D vmdaudio Sierra VMD audio
A....D vorbis Vorbis
A..... libvorbis libvorbis (codec vorbis)
A....D wavesynth Wave synthesis pseudo-codec
AF...D wavpack WavPack
A....D ws_snd1 Westwood Audio (SND1) (codec westwood_snd1)
A....D wmalossless Windows Media Audio Lossless
A....D wmapro Windows Media Audio 9 Professional
A....D wmav1 Windows Media Audio 1
A....D wmav2 Windows Media Audio 2
A....D wmavoice Windows Media Audio Voice
A....D xan_dpcm DPCM Xan
A....D xma1 Xbox Media Audio 1
A....D xma2 Xbox Media Audio 2
S..... ssa ASS (Advanced SubStation Alpha) subtitle (codec ass)
S..... ass ASS (Advanced SubStation Alpha) subtitle
S..... dvbsub DVB subtitles (codec dvb_subtitle)
S..... libzvbi_teletextdec Libzvbi DVB teletext decoder (codec dvb_teletext)
S..... dvdsub DVD subtitles (codec dvd_subtitle)
S..... cc_dec Closed Caption (EIA-608 / CEA-708) (codec eia_608)
S..... pgssub HDMV Presentation Graphic Stream subtitles (codec hdmv_pgs_subtitle)
S..... jacosub JACOsub subtitle
S..... microdvd MicroDVD subtitle
S..... mov_text 3GPP Timed Text subtitle
S..... mpl2 MPL2 subtitle
S..... pjs PJS subtitle
S..... realtext RealText subtitle
S..... sami SAMI subtitle
S..... stl Spruce subtitle format
S..... srt SubRip subtitle (codec subrip)
S..... subrip SubRip subtitle
S..... subviewer SubViewer subtitle
S..... subviewer1 SubViewer1 subtitle
S..... text Raw text subtitle
S..... vplayer VPlayer subtitle
S..... webvtt WebVTT subtitle
S..... xsub XSUB
四. 用 FFmpeg 將 mp4 轉成 mkv 檔 :
先下載作者所提供放在 GitHub 的約 5MB 大小的 mp4 檔 :
下載後會放在使用者目錄 (home/pi) 底下, 檔名為 test.mp4, 轉檔指令如下 :
結果如下 :
pi@raspberrypi:~ $ ffmpeg -i test.mp4 out.mkv
ffmpeg version 4.1.8-0+deb10u1+rpt1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6+rpi1)
configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2010-02-09T01:55:39.000000Z
Duration: 00:01:00.10, start: 0.000000, bitrate: 733 kb/s
Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 65 kb/s (default)
Metadata:
creation_time : 2010-02-09T01:55:39.000000Z
handler_name : Apple Sound Media Handler
Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x360, 612 kb/s, 23.96 fps, 24 tbr, 600 tbn, 1200 tbc (default)
Metadata:
creation_time : 2010-02-09T01:55:39.000000Z
handler_name : Apple Video Media Handler
Stream #0:2(eng): Data: none (rtp / 0x20707472), 45 kb/s
Metadata:
creation_time : 2010-02-09T01:55:39.000000Z
handler_name : hint media handler
Stream #0:3(eng): Data: none (rtp / 0x20707472), 5 kb/s
Metadata:
creation_time : 2010-02-09T01:55:39.000000Z
handler_name : hint media handler
Stream mapping:
Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (aac (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
[libx264 @ 0x1593eb0] using cpu capabilities: none!
[libx264 @ 0x1593eb0] profile High, level 3.0
[libx264 @ 0x1593eb0] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to 'out.mkv':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
encoder : Lavf58.20.100
Stream #0:0(eng): Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 640x360, q=-1--1, 24 fps, 1k tbn, 24 tbc (default)
Metadata:
creation_time : 2010-02-09T01:55:39.000000Z
handler_name : Apple Video Media Handler
encoder : Lavc58.35.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1(eng): Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 22050 Hz, stereo, fltp (default)
Metadata:
creation_time : 2010-02-09T01:55:39.000000Z
handler_name : Apple Sound Media Handler
encoder : Lavc58.35.100 libvorbis
frame= 6 fps=0.0 q=0.0 size= 5kB time=00:00:00.41 bitrate= 92.0kbits/sframe= 16 fps= 15 q=0.0 size= 5kB time=00:00:00.92 bitrate= 41.2kbits/sframe= 24 fps= 16 q=0.0 size= 5kB time=00:00:01.29 bitrate= 29.4kbits/sframe= 35 fps= 17 q=0.0 size= 5kB time=00:00:01.46 bitrate= 26.0kbits/sframe= 43 fps=4.9 q=28.0 size= 5kB time=00:00:01.95 bitrate= 19.5kbits/frame= 45 fps=4.8 q=28.0 size= 5kB time=00:00:01.95 bitrate= 19.5kbits/frame= 47 fps=4.2 q=28.0 size= 5kB time=00:00:01.95 bitrate= 19.5kbits/frame= 48 fps=3.9 q=28.0 size= 5kB time=00:00:02.00 bitrate= 19.0kbits/frame= 50 fps=3.7 q=28.0 size= 5kB time=00:00:02.42 bitrate= 15.8kbits/frame= 51 fps=3.5 q=28.0 size= 5kB time=00:00:02.42 bitrate= 15.8kbits/frame= 52 fps=3.3 q=28.0 size= 5kB time=00:00:02.42 bitrate= 15.8kbits/frame= 53 fps=3.2 q=28.0 size= 5kB time=00:00:02.42 bitrate= 15.8kbits/frame= 54 fps=3.0 q=28.0 size= 5kB time=00:00:02.42 bitrate= 15.8kbits/
...... (略).....
frame= 1439 fps=1.0 q=28.0 size= 4622kB time=00:00:59.90 bitrate= 632.0kbits/frame= 1440 fps=1.0 q=28.0 size= 4622kB time=00:00:59.90 bitrate= 632.0kbits/frame= 1440 fps=1.0 q=28.0 size= 4622kB time=00:00:59.95 bitrate= 631.5kbits/frame= 1440 fps=1.0 q=28.0 Lsize= 4734kB time=00:01:00.13 bitrate= 644.8kbits/s speed=0.041x
video:4308kB audio:392kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.703682%
[libx264 @ 0x1593eb0] frame I:9 Avg QP:18.98 size: 39815
[libx264 @ 0x1593eb0] frame P:801 Avg QP:22.26 size: 4371
[libx264 @ 0x1593eb0] frame B:630 Avg QP:27.41 size: 876
[libx264 @ 0x1593eb0] consecutive B-frames: 38.9% 5.6% 8.3% 47.2%
[libx264 @ 0x1593eb0] mb I I16..4: 11.1% 21.6% 67.3%
[libx264 @ 0x1593eb0] mb P I16..4: 1.1% 2.6% 0.9% P16..4: 33.7% 11.7% 6.2% 0.0% 0.0% skip:43.8%
[libx264 @ 0x1593eb0] mb B I16..4: 0.9% 0.8% 0.1% B16..8: 38.3% 5.9% 1.4% direct: 2.2% skip:50.4% L0:49.8% L1:44.3% BI: 5.9%
[libx264 @ 0x1593eb0] 8x8 transform intra:48.4% inter:42.0%
[libx264 @ 0x1593eb0] coded y,uvDC,uvAC intra: 39.5% 48.7% 21.3% inter: 11.2% 12.9% 1.6%
[libx264 @ 0x1593eb0] i16 v,h,dc,p: 37% 34% 15% 14%
[libx264 @ 0x1593eb0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 21% 37% 2% 3% 3% 3% 3% 3%
[libx264 @ 0x1593eb0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 16% 17% 7% 8% 7% 7% 7% 8%
[libx264 @ 0x1593eb0] i8c dc,h,v,p: 57% 24% 13% 6%
[libx264 @ 0x1593eb0] Weighted P-Frames: Y:2.2% UV:1.5%
[libx264 @ 0x1593eb0] ref P L0: 81.0% 8.4% 8.7% 1.8% 0.0%
[libx264 @ 0x1593eb0] ref B L0: 94.2% 5.3% 0.5%
[libx264 @ 0x1593eb0] ref B L1: 97.1% 2.9%
[libx264 @ 0x1593eb0] kb/s:588.12
可見這個測試視訊檔有 1440 個訊框 (Frame), 雖然只是 5MB 左右的視訊, 但 Pi Zero W 的運算效能不算高, 花了近半個小時才轉換完成.
五. 其他常用 FFmpeg 指令 :
書中列舉了幾個常用的 FFmpeg 指令, 紀錄如下 :
ffmpeg -h (查詢 FFmpeg 命令列參數)
ffmpeg -i A.wav -acodec libmp3lame A.mp3 (將 wav 格式音訊轉成 mp3)
ffmpeg -i A.ogg -acodec libmp3lame A.mp3 (將 ogg 格式音訊轉成 mp3)
ffmpeg -i A.ac3 -acodec libmp3lame A.mp3 (將 ac3 格式音訊轉成 mp3)
ffmpeg -i A.aac -acodec libmp3lame A.mp3 (將 aac 格式音訊轉成 mp3)
六. 移除 FFmpeg :
移除 FFmpeg 指令如下 :
因我還要繼續測試 FFmpeg, 所以就留著別移除啦.
沒有留言 :
張貼留言