Skip to content
 
 

Repository files navigation

English version

NanaRecorder: A Screen Recording Application Based on Qt and FFmpeg

UI

QQ Screenshot 20230119022010

Recording Workflow

flowchart

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.

Environment Dependencies

Windows

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

Linux

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)

Build

mkdir build && cd build
cmake ..
make -j4

Run App

  1. Run directly via Qt Creator
  2. Launch via command line: ../bin/NanaRecorder

TODO

  • High image quality, small file size, low bitrate
  • Flush encoder
  • Support simultaneous recording of speaker and microphone
  • Support hardware encoding

About

A screen recorder based on Qt and FFmpeg(基于Qt+FFmpeg的录屏软件)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages