Main Thread: UI thread; calls the Recorder interface. Capture Thread: Captures frames -> Format conversion/Resampling -> Writes to FIFO. Encoding/Muxing Thread: Loops to read frames from FIFO -> Encodes -> Writes to file.
VS: VS2017 or later recommended. Qt: Qt5.12 or later recommended. FFmpeg 5.1 (Included in the project; DLLs are automatically copied to the executable directory after building).
My development environment:
- VS2022
- Qt5.12.9
The solution supports Debug/Release and Win32/x64 configurations.
VS+Qt Development Environment Configuration
My development environment:
- Qt6.2.4
- FFmpeg5.1.2
Note:
Audio recording on Linux currently utilizes PulseAudio. Since FFmpeg does not support PulseAudio by default, you must compile FFmpeg manually. Add --enable-libpulse during the ./configure step. Refer to the following document for compilation details:
ffmpeg build reference
You need to modify the dependency paths for Qt and FFmpeg in CMakeLists.txt:
- QT_PATH
- FFMPEG_ROOT_DIR (The root directory of your compiled FFmpeg)
mkdir build && cd build
cmake ..
make -j4- Run directly via Qt Creator
- Launch via command line:
../bin/NanaRecorder
- High image quality, small file size, low bitrate
- Flush encoder
- Support simultaneous recording of speaker and microphone
- Support hardware encoding

