Skip to content

build ffmpeg#184

Open
kiwec wants to merge 1 commit intomasterfrom
ffmpeg
Open

build ffmpeg#184
kiwec wants to merge 1 commit intomasterfrom
ffmpeg

Conversation

@kiwec
Copy link
Collaborator

@kiwec kiwec commented Feb 10, 2026

ci probably won't work first try, half vibe coded


if !WASM_PLATFORM
BUILT_SOURCES += $(DEPS_CACHE)/curl-$(CURL_VERSION)/certbundle/cacert.pem
BUILT_SOURCES += $(DEPS_PREFIX)/ffmpeg-$(FFMPEG_VERSION).built
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be on the same line

--enable-demuxer=mp3,aac,ogg,flac,wav,mov,m4a,matroska \
--enable-decoder=mp3,aac,vorbis,opus,flac,pcm_s16le,pcm_f32le \
--enable-parser=aac,flac,mpegaudio,vorbis,opus \
--enable-avutil \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why --disable- earlier then --enable- here

--enable-avcodec \
--enable-avformat \
--enable-swresample \
$(if $(WIN_PLATFORM),--target-os=mingw32,--target-os=$(if $(filter linux,$(SYSNAME)),linux,)) \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not macos/darwin?

--enable-avformat \
--enable-swresample \
$(if $(WIN_PLATFORM),--target-os=mingw32,--target-os=$(if $(filter linux,$(SYSNAME)),linux,)) \
$(if $(filter x86_64,$(host_cpu)),--arch=x86_64,--arch=$(host_cpu)) && \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just --arch=$(host_cpu)?

$(MKDIR_P) $(DEPS_PREFIX)/ffmpeg/build $(DEPS_PREFIX)/lib/pkgconfig
$(TAR) xf $(DEPS_CACHE)/ffmpeg-$(FFMPEG_VERSION).tar.xz -C $(DEPS_PREFIX)/ffmpeg --strip-components=1 && \
cd $(DEPS_PREFIX)/ffmpeg/build && \
CC="$(CC)" CXX="$(CXX)" ../configure \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may want --enable-gpl and --disable-nonfree

$(MKDIR_P) $(DEPS_PREFIX)/ffmpeg/build $(DEPS_PREFIX)/lib/pkgconfig
$(TAR) xf $(DEPS_CACHE)/ffmpeg-$(FFMPEG_VERSION).tar.xz -C $(DEPS_PREFIX)/ffmpeg --strip-components=1 && \
cd $(DEPS_PREFIX)/ffmpeg/build && \
CC="$(CC)" CXX="$(CXX)" ../configure \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also should do RANLIB="$(RANLIB)" AR="$(AR)" CC="$(CC)" CXX="$(CXX)" LD="$(LD)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)", instead of only CC/CXX, the flags aren't passed otherwise (see zlib build)

--disable-muxers \
--disable-hwaccels \
--disable-protocols \
--enable-protocol=file \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we need that?

--enable-protocol=file \
--enable-demuxer=mp3,aac,ogg,flac,wav,mov,m4a,matroska \
--enable-decoder=mp3,aac,vorbis,opus,flac,pcm_s16le,pcm_f32le \
--enable-parser=aac,flac,mpegaudio,vorbis,opus \
Copy link
Collaborator

@whrvt whrvt Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to also add mpeg4audio to these

also pcm_ things don't seem to exist (see ffmpeg configure) actually idk maybe they are parsers but not decoders? i just saw this in my logs by chance with the current ffmpeg builds (not from this branch):

[wav @ 0x7fff78053800] parser not found for codec pcm_s16le, packets or times may be invalid.
[wav @ 0x7fff78053800] Estimating duration from bitrate, this may be inaccurate
ffmpeg: seek skipped - already at frame 0
[pcm_s16le @ 0x7fff7802f980] Invalid PCM packet, data has size 2 but at least a size of 4 was expected

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