Add TQUIC lib to FFmpeg network component
- FFmpeg version: 7.1.1 https://github.com/FFmpeg/FFmpeg/tree/n7.1.1
- QUIC version: TQUIC 1.6.0 https://github.com/Tencent/tquic/tree/release/v1.6.0
- libev, SDL2(For ffplay)
We have run this project on MacOS ARM system, but we do not guarantee working on other systems.
# Get source code
git clone https://github.com/Thuwzq/FFmpeg_with_tquic.git --recursive
# Build TQUIC
cd third_party/tquic
cargo build --release -F ffi
# Build ffmpeg
# Openssl and pthreads must be included, you can set other modules as you want
# --disable-videotoolbox videotoolbox may raise unexpected error in MacOS
# Configure example below:
./configure --prefix=/usr/local/ffmpeg --extra-cflags=-I/path/to/ev.h --extra-ldflags="/path/to/libev.a ./third_party/tquic/target/release/libtquic.a" --enable-gpl --enable-openssl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-libspeex --disable-videotoolbox --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --cc=clang --host-cflags= --host-ldflags=
make
sudo make install
# Get source code
git clone https://github.com/Thuwzq/FFmpeg_with_tquic.git --recursive
# Build TQUIC
cd build/ios
./build_for_ios
reference: https://tquic.net/zh/docs/getting_started/demo
ffplay "tquic://ip:port/filename"
If you use this project on an iPhone, you can experience the multi-path feature of TQUIC.
# Use TQUIC multi-path mode
ffplay "tquic://ip:port/filename?use_multipath=1"
# You can also specify that the client uses Wi-Fi or cellular network to access server resources. (Note: The use_multipath feature conflicts with this feature. When use_multipath=1, the parameters related to this feature will be ignored.)
ffplay "tquic://ip:port/filename?use_wifi=1" # Use wifi (Default)
ffplay "tquic://ip:port/filename?use_wifi=0" # Use cellular