Skip to content

Add ffmpeg with libx264, libx265, libvpx, libsvt-av1, libmp3-lame, libfdk-aac, libogg, libvorbis, libopus#82

Merged
jiegec merged 5 commits into
TermonyHQ:masterfrom
SwimmingTiger:add-ffmpeg
Jul 31, 2025
Merged

Add ffmpeg with libx264, libx265, libvpx, libsvt-av1, libmp3-lame, libfdk-aac, libogg, libvorbis, libopus#82
jiegec merged 5 commits into
TermonyHQ:masterfrom
SwimmingTiger:add-ffmpeg

Conversation

@SwimmingTiger

@SwimmingTiger SwimmingTiger commented Jul 30, 2025

Copy link
Copy Markdown
Contributor
  • 硬件加速视频解码:未知

  • 硬件加速视频编码:不可用。仅支持CPU编码。

  • 可用的命令:ffmpeg、ffprobe

  • 不可用的命令:ffplay

  • 目前实际可用的视频编码:h264、hevc、vp8、vp9、av1、flv1、mpeg4

  • 目前实际可用的音频编码:mp3、aac、vorbis、opus、flac、wav、ac3、dts、mp2

  • 启用的编码器:

    备注:所有 v4l2m2m 类型的编码器都会失败,只有其他类型的可用。

ffmpeg -codecs | grep encoders
 .EVIL. a64_multi            Multicolor charset for Commodore 64 (encoders: a64multi )
 .EVIL. a64_multi5           Multicolor charset for Commodore 64, extended with 5th color (colram) (encoders: a64multi5 )
 DEV.L. av1                  Alliance for Open Media AV1 (encoders: libsvtav1 )
 DEV.LS dirac                Dirac (encoders: vc2 )
 DEV.L. flv1                 FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (decoders: flv ) (encoders: flv )
 DEV.L. h263                 H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 (decoders: h263 h263_v4l2m2m ) (encoders: h263 h263_v4l2m2m )
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_v4l2m2m )
 DEV.L. hevc                 H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_v4l2m2m ) (encoders: libx265 hevc_v4l2m2m )
 DEV.L. mpeg4                MPEG-4 part 2 (decoders: mpeg4 mpeg4_v4l2m2m ) (encoders: mpeg4 mpeg4_v4l2m2m )
 DEV.L. msmpeg4v3            MPEG-4 part 2 Microsoft variant version 3 (decoders: msmpeg4 ) (encoders: msmpeg4 )
 DEVIL. prores               Apple ProRes (iCodec Pro) (encoders: prores prores_aw prores_ks )
 DEV.L. roq                  id RoQ video (decoders: roqvideo ) (encoders: roqvideo )
 DEV.L. vp8                  On2 VP8 (decoders: vp8 vp8_v4l2m2m libvpx ) (encoders: libvpx vp8_v4l2m2m )
 DEV.L. vp9                  Google VP9 (decoders: vp9 vp9_v4l2m2m libvpx-vp9 ) (encoders: libvpx-vp9 )
 DEAIL. aac                  AAC (Advanced Audio Coding) (decoders: aac aac_fixed libfdk_aac ) (encoders: aac libfdk_aac )
 DEAIL. ac3                  ATSC A/52A (AC-3) (decoders: ac3 ac3_fixed ) (encoders: ac3 ac3_fixed )
 DEAIL. adpcm_g722           G.722 ADPCM (decoders: g722 ) (encoders: g722 )
 DEAIL. adpcm_g726           G.726 ADPCM (decoders: g726 ) (encoders: g726 )
 DEAIL. adpcm_g726le         G.726 ADPCM little-endian (decoders: g726le ) (encoders: g726le )
 DEAILS dts                  DCA (DTS Coherent Acoustics) (decoders: dca ) (encoders: dca )
 DEAIL. mp2                  MP2 (MPEG audio layer 2) (decoders: mp2 mp2float ) (encoders: mp2 mp2fixed )
 DEAIL. mp3                  MP3 (MPEG audio layer 3) (decoders: mp3float mp3 ) (encoders: libmp3lame )
 DEAIL. opus                 Opus (Opus Interactive Audio Codec) (decoders: opus libopus ) (encoders: opus libopus )
 DEAIL. ra_144               RealAudio 1.0 (14.4K) (decoders: real_144 ) (encoders: real_144 )
 DEAIL. vorbis               Vorbis (decoders: vorbis libvorbis ) (encoders: vorbis libvorbis )
 DES... ass                  ASS (Advanced SSA) subtitle (decoders: ssa ass ) (encoders: ssa ass )
 DES... dvb_subtitle         DVB subtitles (decoders: dvbsub ) (encoders: dvbsub )
 DES... dvd_subtitle         DVD subtitles (decoders: dvdsub ) (encoders: dvdsub )
 DES... subrip               SubRip subtitle (decoders: srt subrip ) (encoders: srt subrip )

image image image

@SwimmingTiger SwimmingTiger changed the title Add ffmpeg with libx264, libx265, libvpx, libsvt-av1, libmp3-lame, libfdk-aac Add ffmpeg with libx264, libx265, libvpx, libsvt-av1, libmp3-lame, libfdk-aac, libogg, libvorbis, libopus Jul 30, 2025
@SwimmingTiger

SwimmingTiger commented Jul 30, 2025

Copy link
Copy Markdown
Contributor Author

自动测试报错的原因:

2025-07-30T08:27:22.5485401Z make[2]: Entering directory '/home/runner/work/Termony/Termony/build-hnp/libx264'
2025-07-30T08:27:22.5546590Z cd temp/x264-stable/build && ../configure --prefix=/data/app/base.org/base_1.0 --enable-shared
2025-07-30T08:27:22.8960644Z Found no assembler
2025-07-30T08:27:22.8961072Z Minimum version is nasm-2.13
2025-07-30T08:27:22.8961690Z If you really want to compile without asm, configure with --disable-asm.

我加一下 --disable-asm 吧。在ARM里编译的时候好像不会使用nasm。


不对,问题好像是 libx264 的 configure 脚本检测错了 host_cpu。如果 host_cpu 是 aarch64 的话不会使用 nasm。

等我用 x64 机器编译一下看看。我之前是在 ARM64 Linux 里编译的。


好像加一个 --host aarch64-unknown-linux-musl 参数就可以了。

之前就libx264libvpx没加,其他都加了。不过 libvpx 不支持 --host 参数,不知道会不会报错。我还没有在x64里试。


不对,libx264不支持--host选项。我还是写个补丁修改一下构建脚本吧。

2025-07-30T11:01:33.0180881Z cd temp/x264-stable/build && ../configure --prefix=/data/app/base.org/base_1.0 --host aarch64-unknown-linux-musl --enable-shared
2025-07-30T11:01:33.0273401Z Unknown option --host, ignored
2025-07-30T11:01:33.0273917Z Unknown option aarch64-unknown-linux-musl, ignored
2025-07-30T11:01:33.3940627Z Found no assembler
2025-07-30T11:01:33.3941024Z Minimum version is nasm-2.13
2025-07-30T11:01:33.3941379Z If you really want to compile without asm, configure with --disable-asm.

仔细看了看 libx264 的 configure,是要写成 --host=aarch64-unknown-linux-musl 才行,--host aarch64-unknown-linux-musl 不行。


libvpx 也添加了 --target=arm64-linux-gcc 参数。现在应该没问题了。

@jiegec jiegec merged commit 16cca5f into TermonyHQ:master Jul 31, 2025
2 checks passed
mix-il pushed a commit to mix-il/Termony that referenced this pull request Aug 26, 2025
Add ffmpeg with libx264, libx265, libvpx, libsvt-av1, libmp3-lame, libfdk-aac, libogg, libvorbis, libopus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants