pdf-icon

Product Guide

Offline Voice Recognition

Industrial Control

IoT Measuring Instruments

Air Quality

Module13.2 PPS

Ethernet Camera

DIP Switch Usage Guide

Module GPS v2.0

Module GNSS

Module ExtPort For Core2

Module LoRa868 V1.2

FFmpeg

Environment Preparation

The AXCL_FFMPEG dynamic libraries are located in /usr/lib/axcl/ffmpeg, and the AXCL_FFMPEG executable is located in /usr/bin/axcl/ffmpeg.

Before running FFmpeg, you must set the dynamic library search path by configuring the environment variable:

export LD_LIBRARY_PATH="/usr/lib/axcl/ffmpeg:$LD_LIBRARY_PATH";

How to Use

m5stack@raspberrypi5:~ $ /usr/bin/axcl/ffmpeg/ffmpeg -c:v h264_axdec -i input.mp4 -f rawvideo -pix_fmt yuv420p output.yuv

How to Rebuild FFmpeg

The SDK version of FFmpeg is based on version 7.1, with precompiled .so libraries and ffmpeg binary files available for direct linking and execution.

If you need to recompile FFmpeg, follow these steps:

  1. Download FFmpeg-n7.1.tar.gz from GitHub, and copy it to the axcl/3rdparty/ffmpeg directory.

  2. Extract it:

tar -zxvf FFmpeg-n7.1.tar.gz
  1. Apply the patch:
patch -p3 < FFmpeg-n7.1.patch
  1. Compile:
  • For arm64
cd axcl/3rdparty/ffmpeg
make host=arm64 clean all install

The target files will be located at:

lib: axcl/out/axcl_linux_arm64/lib/ffmpeg
bin: axcl/out/axcl_linux_arm64/bin/ffmpeg
  • For x86
cd axcl/3rdparty/ffmpeg
make host=x86 clean all install

The target files will be located at:

lib: axcl/out/axcl_linux_x86/lib/ffmpeg
bin: axcl/out/axcl_linux_x86/bin/ffmpeg
On This Page