Introductory
Currently, the C3V Ubuntu rootfs have included the FFmpeg 4.4.4 prebuilt for version 20.04/22.04 and FFmpeg 6.1.1 for version 24.04 by default. It carries the commonly used elements and hardware media codec functions. If you don’t want to use it, disable the install in the file <C3V_PRJ>/linux/rootfs/initramfs/build_disk.sh before running make config.
The prebuilt FFmpeg is located in the path <C3V_PRJ>/linux/rootfs/initramfs/ubuntu/prebuilt-app-xxx. If your C3V system doesn’t have it or you feel the provided does not meet your needs, you can recompile it as below.
...
View file | ||
---|---|---|
|
Extract patch files: patch files will be extracted in ~/code/ffmpeg
Code Block |
---|
7ztar xzxvf ffmpeg-4.4.4-20250207-patch.7ztar.gz |
Info |
---|
The patches in this document may not be up to date, if you are using the latest code of C3V, you can get the newest patch in the directory <C3V_PRJ>/linux/rootfs/initramfs/buildroot/package/ffmpeg directly. |
Apply patch
Code Block |
---|
cd ~/code/ffmpeg-4.4.4 patch -p1 < ../ffmpeg/0001-swscale-x86-yuv2rgb-Fix-build-without-SSSE3.patch patch -p1 < ../ffmpeg/0002-avcodec-vaapi_h264-skip-decode-if-pic-has-no-slices.patch patch -p1 < ../ffmpeg/0003-libavutil-Fix-mips-build.patch patch -p1 < ../ffmpeg/0004-configure-add-extralibs-to-extralibs_xxx.patch patch -p1 < ../ffmpeg/0005-Fixes-assembling-with-binutils-as-2.41.patch patch -p1 < ../ffmpeg/0006-v4l2-hw-codec-support.patch patch -p1 < ../ffmpeg/0007-v4l2-enc-add-spspps-to-each-idr.patch patch -p1 < ../ffmpeg/0008-use-v4l2-codec-default-if-find-by-id.patch patch -p1 < ../ffmpeg/0009-dma-copy-and-remap-options-to-videocodec.patch |
...