Skip to content

ffiirree/ffmpeg-tutorials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFmpeg Examples

包括 解 / 编码(复杂)滤波器屏幕 / 摄像头 / 音频捕获音视频播放 的基础示例以及相关教程。

Examples and tutorials for decoding / encoding, (complex) filtering, screen, camera, and audio capture, audio / video playing, etc.

Examples

Platform Specific

Installation

Windows

Windows Graphics Capture 示例需要较高的Windows版本:

  • Windows Version >= 10.0.17134.48 (aka Windows 10 Version 1803)
  • Windows SDK Version >= 10.0.20348.0
  • FFmpeg >= 6.0

如果你的Windows或SDK不能满足要求,你可以选择:

  • 通过 -DDISABLE_WGC=ON 来禁用 Windows Graphics Capture 示例
  • 通过 Visual Studio Installer 安装最新的 Windows SDK

FFmpeg

Version : > 4.3 (-DDISABLE_WGC=OFF : >= 6.0)

Qt5

6.0 > Version >= 5.12

  • Download: 安装后注意添加目录到环境变量

Ubuntu

sudo apt install build-essential git cmake

sudo apt install ffmpeg libavfilter-dev libavdevice-dev libavutil-dev libavformat-dev libswresample-dev libswscale-dev

# Ubuntu 20.04 
sudo apt install qt5-default libqt5x11extras5-dev qtmultimedia5-dev
# Ubuntu 22.04
sudo apt install qtbase5-dev libqt5x11extras5-dev qtmultimedia5-dev

# pulse
sudo apt install libpulse-dev

# v4l2
sudo apt install libv4l-dev v4l-utils

# for error: GL/gl.h: No such file or directory
sudo apt install mesa-common-dev

C++ & CMake

  • C++ 20
  • CMake >= 3.16

Other dependencies

No installation required

  • glog: Google Logging (glog) is a C++98 library that implements application-level logging. The library provides logging APIs based on C++-style streams and various helper macros.
  • fmt: {fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.

Usage

git clone https://github.com/ffiirree/ffmpeg_examples.git --recursive

# 或者单独获取子模块
git submodule init
git submodule update

References