1. 程式人生 > >ffmpeg八大模組及常用函式介紹

ffmpeg八大模組及常用函式介紹

八大庫

  1. avcodec:編解碼()最重要的庫
  2. avformat:封裝格式處理
  3. avfilter:濾鏡特效處理
  4. avdevice:各種裝置的輸入輸出
  5. avutil:工具庫(大部分哭都需要這個庫的支援)
  6. postproc:後加工
  7. swresample:音訊取樣資料格式轉換
  8. swscale:視訊畫素資料格式轉換

常用函式

  • av_register_all():註冊所有元件
  • avformat_open_input():開啟輸入視訊檔案
  • avformat_find_stream_info():獲取視訊檔案資訊
  • avcodec_find_decoder():查詢解碼器
  • avcodec_open1():開啟解碼器
  • av_read_frame():從輸入檔案讀取一幀壓縮資料
  • avcodec_decode_video2():解碼一楨壓縮資料
  • avcodec_close():關閉解碼器
  • avformat_close_input():關閉輸入視訊檔案