-
Update system packages:
sudo apt update
-
Install FFmpeg (version 7.0+ required):
sudo apt install ffmpeg
-
Install FFmpeg development libraries:
sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
-
Get library dependency paths:
pkg-config --cflags --libs libavformat libavcodec libavutil libswresample libswscale
-
Update
FFMPEG_INCLUDE_DIR
andFFMPEG_LIB_DIR
inbuild.sh
.
-
Create
examples/.keys
file and add:APP_ID=your_app_id TOKEN=your_token
If certificate is not enabled, TOKEN can be empty, for example:
APP_ID=abcd1234 TOKEN=
-
Prepare SDK files:
- Rename JAR to
agora-sdk.jar
- Place it in the
libs/
directory
- Rename JAR to
-
Extract SO files:
jar xvf agora-sdk.jar mv native/linux/x86_64/*.so libs/
Ensure the directory structure is as follows:
libs/ ├── agora-sdk.jar └── lib***.so
Execute the compilation script:
./build.sh [-ff]
- Use the
-ff
option to compile FFmpeg-related libraries (required for MP4 tests)
-
Enter the examples directory:
cd examples
-
Run the test script:
./script/TestCaseName.sh
-
Modify test parameters: directly edit the corresponding
.sh
file
- Ensure Java environment is correctly installed and configured
- Verify
agora-sdk.jar
version compatibility - Check
APP_ID
andTOKEN
configuration before running - Execute steps in order to avoid dependency issues