GyanD / codexffmpeg

Support for https://www.gyan.dev/ffmpeg
1.48k stars 109 forks source link

Compilation workflow #91

Closed FrostKiwi closed 1 year ago

FrostKiwi commented 1 year ago

Hey there :] I am trying to figure out the difference between your Windows FFmpeg builds and my attempt to replicate your build 5.1.2-full_build-www.gyan.dev. Can you give a short two sentence version of how these builds come to be? What compiler, what environment, what version, what ./configure call?

This concerns issue https://github.com/Ruslan-B/FFmpeg.AutoGen/issues/250 . I am trying to build ffmpeg, generate C# bindings and use those in a C# program. This works with your 5.1.2-full_build-www.gyan.dev, but not with my builds. I have no issue creating ffmpeg builds and use them in my C programs, but I fail to create a build that works when called via https://github.com/Ruslan-B/FFmpeg.AutoGen

The ultimate goal is to create a 32-bit ffmpeg library, with a very specific minimal set of features, but I fail to replicate even the default, non-customized 64-bit library.

I have tried following https://www.roxlu.com/2019/062/compiling-ffmpeg-with-x264-on-windows-10-using-msvc , https://trac.ffmpeg.org/wiki/CompilationGuide/MinGW#MSys and https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC all with succefully built and working ffmpeg, but failing to get called by the auto generated C# bindings. So what was your workflow for 5.1.2-full_build-www.gyan.dev? I wish to replicate it and go form there to customize a version for my use-case.

GyanD commented 1 year ago

I use a msys2 / mingw-64 environment with gcc + gnu toolchain.

What's your full msys2 ./configure string? And your CLFAGS / LDFLAGS / pkg config flags?

FrostKiwi commented 1 year ago

I use a msys2 / mingw-64 environment with gcc + gnu toolchain.

What's your full msys2 ./configure string? And your CLFAGS / LDFLAGS / pkg config flags?

Ohh, that surprised me! It is also my favorite environment and toolchain on windows. Since my GCC compiled libs instantly resulted in exceptions when called in C# via FFmpeg.AutoGen, I figured there was some kind of underlying cross-compiler in-compatibility. But clearly my assumption was wrong. I took some time now to recompile again and note down every step along the way

Configure Step

I did the whole shebang again. Msys2 + the MinGW64 environment. GCC 12.2.0. FFmpeg Tag n5.1.2 Compiled with ../configure --prefix=installed --enable-shared --disable-static --disable-programs --disable-vulkan --enable-libx264 --enable-gpl (Trying to stick close to the defaults for now)

@GyanD do you think --target-os=win64 or --arch=x86_64 is required? Do you get libx264 from the package manager or do you compile your own?

This results in the following compile log

Configure log of the above configure command ``` install prefix installed source path /home/artsimow/build/lib/ffmpeg C compiler gcc C library mingw64 ARCH x86 (generic) big-endian no runtime cpu detection yes standalone assembly yes x86 assembler nasm MMX enabled yes MMXEXT enabled yes 3DNow! enabled yes 3DNow! extended enabled yes SSE enabled yes SSSE3 enabled yes AESNI enabled yes AVX enabled yes AVX2 enabled yes AVX-512 enabled yes AVX-512ICL enabled yes XOP enabled yes FMA3 enabled yes FMA4 enabled yes i686 features enabled yes CMOV is fast yes EBX available yes EBP available yes debug symbols yes strip symbols yes optimize for size no optimizations yes static no shared yes postprocessing support yes network support yes threading support w32threads safe bitstream reader yes texi2html enabled no perl enabled yes pod2man enabled yes makeinfo enabled no makeinfo supports HTML no xmllint enabled yes External libraries: bzlib libx264 mediafoundation sdl2 iconv lzma schannel zlib External libraries providing hardware acceleration: d3d11va dxva2 Libraries: avcodec avfilter avutil swresample avdevice avformat postproc swscale Programs: Enabled decoders: aac binkaudio_rdft hq_hqa pcm_f32be speex aac_fixed bintext hqx pcm_f32le srgc aac_latm bitpacked huffyuv pcm_f64be srt aasc bmp hymt pcm_f64le ssa ac3 bmv_audio iac pcm_lxf stl ac3_fixed bmv_video idcin pcm_mulaw subrip acelp_kelvin brender_pix idf pcm_s16be subviewer adpcm_4xm c93 iff_ilbm pcm_s16be_planar subviewer1 adpcm_adx cavs ilbc pcm_s16le sunrast adpcm_afc ccaption imc pcm_s16le_planar svq1 adpcm_agm cdgraphics imm4 pcm_s24be svq3 adpcm_aica cdtoons imm5 pcm_s24daud tak adpcm_argo cdxl indeo2 pcm_s24le targa adpcm_ct cfhd indeo3 pcm_s24le_planar targa_y216 adpcm_dtk cinepak indeo4 pcm_s32be tdsc adpcm_ea clearvideo indeo5 pcm_s32le text adpcm_ea_maxis_xa cljr interplay_acm pcm_s32le_planar theora adpcm_ea_r1 cllc interplay_dpcm pcm_s64be thp adpcm_ea_r2 comfortnoise interplay_video pcm_s64le tiertexseqvideo adpcm_ea_r3 cook ipu pcm_s8 tiff adpcm_ea_xas cpia jacosub pcm_s8_planar tmv adpcm_g722 cri jpeg2000 pcm_sga truehd adpcm_g726 cscd jpegls pcm_u16be truemotion1 adpcm_g726le cyuv jv pcm_u16le truemotion2 adpcm_ima_acorn dca kgv1 pcm_u24be truemotion2rt adpcm_ima_alp dds kmvc pcm_u24le truespeech adpcm_ima_amv derf_dpcm lagarith pcm_u32be tscc adpcm_ima_apc dfa loco pcm_u32le tscc2 adpcm_ima_apm dfpwm lscr pcm_u8 tta adpcm_ima_cunning dirac m101 pcm_vidc twinvq adpcm_ima_dat4 dnxhd mace3 pcx txd adpcm_ima_dk3 dolby_e mace6 pfm ulti adpcm_ima_dk4 dpx magicyuv pgm utvideo adpcm_ima_ea_eacs dsd_lsbf mdec pgmyuv v210 adpcm_ima_ea_sead dsd_lsbf_planar metasound pgssub v210x adpcm_ima_iss dsd_msbf microdvd pgx v308 adpcm_ima_moflex dsd_msbf_planar mimic phm v408 adpcm_ima_mtf dsicinaudio mjpeg photocd v410 adpcm_ima_oki dsicinvideo mjpegb pictor vb adpcm_ima_qt dss_sp mlp pixlet vble adpcm_ima_rad dst mmvideo pjs vbn adpcm_ima_smjpeg dvaudio mobiclip png vc1 adpcm_ima_ssi dvbsub motionpixels ppm vc1image adpcm_ima_wav dvdsub movtext prores vcr1 adpcm_ima_ws dvvideo mp1 prosumer vmdaudio adpcm_ms dxa mp1float psd vmdvideo adpcm_mtaf dxtory mp2 ptx vmnc adpcm_psx dxv mp2float qcelp vorbis adpcm_sbpro_2 eac3 mp3 qdm2 vp3 adpcm_sbpro_3 eacmv mp3adu qdmc vp4 adpcm_sbpro_4 eamad mp3adufloat qdraw vp5 adpcm_swf eatgq mp3float qoi vp6 adpcm_thp eatgv mp3on4 qpeg vp6a adpcm_thp_le eatqi mp3on4float qtrle vp6f adpcm_vima eightbps mpc7 r10k vp7 adpcm_xa eightsvx_exp mpc8 r210 vp8 adpcm_yamaha eightsvx_fib mpeg1video ra_144 vp9 adpcm_zork escape124 mpeg2video ra_288 vplayer agm escape130 mpeg4 ralf vqa aic evrc mpegvideo rasc wavpack alac exr mpl2 rawvideo wcmv alias_pix fastaudio msa1 realtext webp als ffv1 mscc rl2 webvtt amrnb ffvhuff msmpeg4v1 roq wmalossless amrwb ffwavesynth msmpeg4v2 roq_dpcm wmapro amv fic msmpeg4v3 rpza wmav1 anm fits msnsiren rscc wmav2 ansi flac msp2 rv10 wmavoice ape flashsv msrle rv20 wmv1 apng flashsv2 mss1 rv30 wmv2 aptx flic mss2 rv40 wmv3 aptx_hd flv msvideo1 s302m wmv3image arbc fmvc mszh sami wnv1 argo fourxm mts2 sanm wrapped_avframe ass fraps mv30 sbc ws_snd1 asv1 frwu mvc1 scpr xan_dpcm asv2 g2m mvc2 screenpresso xan_wc3 atrac1 g723_1 mvdv sdx2_dpcm xan_wc4 atrac3 g729 mvha sga xbin atrac3al gdv mwsc sgi xbm atrac3p gem mxpeg sgirle xface atrac3pal gif nellymoser sheervideo xl atrac9 gremlin_dpcm notchlc shorten xma1 aura gsm nuv simbiosis_imx xma2 aura2 gsm_ms on2avc sipr xpm av1 h261 opus siren xsub avrn h263 paf_audio smackaud xwd avrp h263i paf_video smacker y41p avs h263p pam smc ylc avui h264 pbm smvjpeg yop ayuv hap pcm_alaw snow yuv4 bethsoftvid hca pcm_bluray sol_dpcm zero12v bfi hcom pcm_dvd sonic zerocodec bink hevc pcm_f16le sp5x zlib binkaudio_dct hnm4_video pcm_f24le speedhq zmbv Enabled encoders: a64multi cfhd movtext pcm_s8_planar sonic_ls a64multi5 cinepak mp2 pcm_u16be speedhq aac cljr mp2fixed pcm_u16le srt aac_mf comfortnoise mp3_mf pcm_u24be ssa ac3 dca mpeg1video pcm_u24le subrip ac3_fixed dfpwm mpeg2video pcm_u32be sunrast ac3_mf dnxhd mpeg4 pcm_u32le svq1 adpcm_adx dpx msmpeg4v2 pcm_u8 targa adpcm_argo dvbsub msmpeg4v3 pcm_vidc text adpcm_g722 dvdsub msvideo1 pcx tiff adpcm_g726 dvvideo nellymoser pfm truehd adpcm_g726le eac3 opus pgm tta adpcm_ima_alp exr pam pgmyuv ttml adpcm_ima_amv ffv1 pbm phm utvideo adpcm_ima_apm ffvhuff pcm_alaw png v210 adpcm_ima_qt fits pcm_bluray ppm v308 adpcm_ima_ssi flac pcm_dvd prores v408 adpcm_ima_wav flashsv pcm_f32be prores_aw v410 adpcm_ima_ws flashsv2 pcm_f32le prores_ks vbn adpcm_ms flv pcm_f64be qoi vc2 adpcm_swf g723_1 pcm_f64le qtrle vorbis adpcm_yamaha gif pcm_mulaw r10k wavpack alac h261 pcm_s16be r210 webvtt alias_pix h263 pcm_s16be_planar ra_144 wmav1 amv h263p pcm_s16le rawvideo wmav2 apng h264_mf pcm_s16le_planar roq wmv1 aptx hevc_mf pcm_s24be roq_dpcm wmv2 aptx_hd huffyuv pcm_s24daud rpza wrapped_avframe ass jpeg2000 pcm_s24le rv10 xbm asv1 jpegls pcm_s24le_planar rv20 xface asv2 libx264 pcm_s32be s302m xsub avrp libx264rgb pcm_s32le sbc xwd avui ljpeg pcm_s32le_planar sgi y41p ayuv magicyuv pcm_s64be smc yuv4 bitpacked mjpeg pcm_s64le snow zlib bmp mlp pcm_s8 sonic zmbv Enabled hwaccels: av1_d3d11va h264_dxva2 mpeg2_d3d11va2 vp9_d3d11va wmv3_dxva2 av1_d3d11va2 hevc_d3d11va mpeg2_dxva2 vp9_d3d11va2 av1_dxva2 hevc_d3d11va2 vc1_d3d11va vp9_dxva2 h264_d3d11va hevc_dxva2 vc1_d3d11va2 wmv3_d3d11va h264_d3d11va2 mpeg2_d3d11va vc1_dxva2 wmv3_d3d11va2 Enabled parsers: aac cri g723_1 mlp sipr aac_latm dca g729 mpeg4video tak ac3 dirac gif mpegaudio vc1 adx dnxhd gsm mpegvideo vorbis amr dolby_e h261 opus vp3 av1 dpx h263 png vp8 avs2 dvaudio h264 pnm vp9 avs3 dvbsub hevc qoi webp bmp dvd_nav ipu rv30 xbm cavsvideo dvdsub jpeg2000 rv40 xma cook flac mjpeg sbc Enabled demuxers: aa dhav image_pcx_pipe msnwc_tcp sds aac dirac image_pfm_pipe msp sdx aax dnxhd image_pgm_pipe mtaf segafilm ac3 dsf image_pgmyuv_pipe mtv ser ace dsicin image_pgx_pipe musx sga acm dss image_phm_pipe mv shorten act dts image_photocd_pipe mvi siff adf dtshd image_pictor_pipe mxf simbiosis_imx adp dv image_png_pipe mxg sln ads dvbsub image_ppm_pipe nc smacker adx dvbtxt image_psd_pipe nistsphere smjpeg aea dxa image_qdraw_pipe nsp smush afc ea image_qoi_pipe nsv sol aiff ea_cdata image_sgi_pipe nut sox aix eac3 image_sunrast_pipe nuv spdif alp epaf image_svg_pipe obu srt amr ffmetadata image_tiff_pipe ogg stl amrnb filmstrip image_vbn_pipe oma str amrwb fits image_webp_pipe paf subviewer anm flac image_xbm_pipe pcm_alaw subviewer1 apc flic image_xpm_pipe pcm_f32be sup ape flv image_xwd_pipe pcm_f32le svag apm fourxm ingenient pcm_f64be svs apng frm ipmovie pcm_f64le swf aptx fsb ipu pcm_mulaw tak aptx_hd fwse ircam pcm_s16be tedcaptions aqtitle g722 iss pcm_s16le thp argo_asf g723_1 iv8 pcm_s24be threedostr argo_brp g726 ivf pcm_s24le tiertexseq argo_cvg g726le ivr pcm_s32be tmv asf g729 jacosub pcm_s32le truehd asf_o gdv jv pcm_s8 tta ass genh kux pcm_u16be tty ast gif kvag pcm_u16le txd au gsm live_flv pcm_u24be ty av1 gxf lmlm4 pcm_u24le v210 avi h261 loas pcm_u32be v210x avr h263 lrc pcm_u32le vag avs h264 luodat pcm_u8 vc1 avs2 hca lvf pcm_vidc vc1t avs3 hcom lxf pjs vividas bethsoftvid hevc m4v pmp vivo bfi hls matroska pp_bnk vmd bfstm hnm mca pva vobsub bink ico mcc pvf voc binka idcin mgsts qcp vpk bintext idf microdvd r3d vplayer bit iff mjpeg rawvideo vqf bitpacked ifv mjpeg_2000 realtext w64 bmv ilbc mlp redspark wav boa image2 mlv rl2 wc3 brstm image2_alias_pix mm rm webm_dash_manifest c93 image2_brender_pix mmf roq webvtt caf image2pipe mods rpl wsaud cavsvideo image_bmp_pipe moflex rsd wsd cdg image_cri_pipe mov rso wsvqa cdxl image_dds_pipe mp3 rtp wtv cine image_dpx_pipe mpc rtsp wv codec2 image_exr_pipe mpc8 s337m wve codec2raw image_gem_pipe mpegps sami xa concat image_gif_pipe mpegts sap xbin data image_j2k_pipe mpegtsraw sbc xmv daud image_jpeg_pipe mpegvideo sbg xvag dcstr image_jpegls_pipe mpjpeg scc xwma derf image_jpegxl_pipe mpl2 scd yop dfa image_pam_pipe mpsub sdp yuv4mpegpipe dfpwm image_pbm_pipe msf sdr2 Enabled muxers: a64 dnxhd ismv ogg scc ac3 dts ivf ogv segafilm adts dv jacosub oma segment adx eac3 kvag opus smjpeg aiff f4v latm pcm_alaw smoothstreaming alp ffmetadata lrc pcm_f32be sox amr fifo m4v pcm_f32le spdif amv fifo_test matroska pcm_f64be spx apm filmstrip matroska_audio pcm_f64le srt apng fits md5 pcm_mulaw stream_segment aptx flac microdvd pcm_s16be streamhash aptx_hd flv mjpeg pcm_s16le sup argo_asf framecrc mkvtimestamp_v2 pcm_s24be swf argo_cvg framehash mlp pcm_s24le tee asf framemd5 mmf pcm_s32be tg2 asf_stream g722 mov pcm_s32le tgp ass g723_1 mp2 pcm_s8 truehd ast g726 mp3 pcm_u16be tta au g726le mp4 pcm_u16le ttml avi gif mpeg1system pcm_u24be uncodedframecrc avif gsm mpeg1vcd pcm_u24le vc1 avm2 gxf mpeg1video pcm_u32be vc1t avs2 h261 mpeg2dvd pcm_u32le voc avs3 h263 mpeg2svcd pcm_u8 w64 bit h264 mpeg2video pcm_vidc wav caf hash mpeg2vob psp webm cavsvideo hds mpegts rawvideo webm_chunk codec2 hevc mpjpeg rm webm_dash_manifest codec2raw hls mxf roq webp crc ico mxf_d10 rso webvtt dash ilbc mxf_opatom rtp wsaud data image2 null rtp_mpegts wtv daud image2pipe nut rtsp wv dfpwm ipod obu sap yuv4mpegpipe dirac ircam oga sbc Enabled protocols: async file https pipe srtp cache ftp icecast prompeg subfile concat gopher ipfs rtmp tcp concatf gophers ipns rtmps tee crypto hls md5 rtmpt tls data http mmsh rtmpts udp ffrtmphttp httpproxy mmst rtp udplite Enabled filters: abench atadenoise dynaudnorm mandelbrot showspatial abitscope atempo earwax maskedclamp showspectrum acompressor atilt ebur128 maskedmax showspectrumpic acontrast atrim edgedetect maskedmerge showvolume acopy avectorscope elbg maskedmin showwaves acrossfade avgblur entropy maskedthreshold showwavespic acrossover avsynctest epx maskfun shuffleframes acrusher axcorrelate eq mcompand shufflepixels acue bandpass equalizer median shuffleplanes addroi bandreject erosion mergeplanes sidechaincompress adeclick bass estdif mestimate sidechaingate adeclip bbox exposure metadata sidedata adecorrelate bench extractplanes midequalizer sierpinski adelay bilateral extrastereo minterpolate signalstats adenorm biquad fade mix signature aderivative bitplanenoise feedback monochrome silencedetect adrawgraph blackdetect fftdnoiz morpho silenceremove adynamicequalizer blackframe fftfilt movie sinc adynamicsmooth blend field mpdecimate sine aecho blockdetect fieldhint mptestsrc siti aemphasis blurdetect fieldmatch msad smartblur aeval bm3d fieldorder multiply smptebars aevalsrc boxblur fifo negate smptehdbars aexciter bwdif fillborders nlmeans sobel afade cas find_rect nnedi spectrumsynth afftdn cellauto firequalizer noformat speechnorm afftfilt channelmap flanger noise split afifo channelsplit floodfill normalize spp afir chorus format null sr afirsrc chromahold fps nullsink ssim aformat chromakey framepack nullsrc stereo3d afreqshift chromanr framerate oscilloscope stereotools afwtdn chromashift framestep overlay stereowiden agate ciescope freezedetect owdenoise streamselect agraphmonitor codecview freezeframes pad super2xsai ahistogram color fspp pal100bars superequalizer aiir colorbalance gblur pal75bars surround aintegral colorchannelmixer geq palettegen swaprect ainterleave colorchart gradfun paletteuse swapuv alatency colorcontrast gradients pan tblend alimiter colorcorrect graphmonitor perms telecine allpass colorhold grayworld perspective testsrc allrgb colorize greyedge phase testsrc2 allyuv colorkey guided photosensitivity thistogram aloop colorlevels haas pixdesctest threshold alphaextract colormap haldclut pixelize thumbnail alphamerge colormatrix haldclutsrc pixscope tile amerge colorspace hdcd pp tiltshelf ametadata colorspectrum headphone pp7 tinterlace amix colortemperature hflip premultiply tlut2 amovie compand highpass prewitt tmedian amplify compensationdelay highshelf pseudocolor tmidequalizer amultiply concat hilbert psnr tmix anequalizer convolution histeq pullup tonemap anlmdn convolve histogram qp tpad anlmf copy hqdn3d random transpose anlms cover_rect hqx readeia608 treble anoisesrc crop hstack readvitc tremolo anull cropdetect hsvhold realtime trim anullsink crossfeed hsvkey remap unpremultiply anullsrc crystalizer hue removegrain unsharp apad cue huesaturation removelogo untile aperms curves hwdownload repeatfields v360 aphasemeter datascope hwmap replaygain vaguedenoiser aphaser dblur hwupload reverse varblur aphaseshift dcshift hysteresis rgbashift vectorscope apsyclip dctdnoiz identity rgbtestsrc vflip apulsator deband idet roberts vfrdet arealtime deblock il rotate vibrance aresample decimate inflate sab vibrato areverse deconvolve interlace scale vif arnndn dedot interleave scale2ref vignette asdr deesser join scdet virtualbass asegment deflate kerndeint scharr vmafmotion aselect deflicker kirsch scroll volume asendcmd dejudder lagfun segment volumedetect asetnsamples delogo latency select vstack asetpts derain lenscorrection selectivecolor w3fdif asetrate deshake life sendcmd waveform asettb despill limitdiff separatefields weave ashowinfo detelecine limiter setdar xbr asidedata dialoguenhance loop setfield xcorrelate asoftclip dilation loudnorm setparams xfade aspectralstats displace lowpass setpts xmedian asplit dnn_classify lowshelf setrange xstack astats dnn_detect lumakey setsar yadif astreamselect dnn_processing lut settb yaepblur asubboost doubleweave lut1d shear yuvtestsrc asubcut drawbox lut2 showcqt zoompan asupercut drawgraph lut3d showfreqs asuperpass drawgrid lutrgb showinfo asuperstop drmeter lutyuv showpalette Enabled bsfs: aac_adtstoasc eac3_core hevc_mp4toannexb noise text2movsub av1_frame_merge extract_extradata imx_dump_header null trace_headers av1_frame_split filter_units mjpeg2jpeg opus_metadata truehd_core av1_metadata h264_metadata mjpega_dump_header pcm_rechunk vp9_metadata chomp h264_mp4toannexb mov2textsub pgs_frame_merge vp9_raw_reorder dca_core h264_redundant_pps mp3_header_decompress prores_metadata vp9_superframe dump_extradata hapqa_extract mpeg2_metadata remove_extradata vp9_superframe_split dv_error_marker hevc_metadata mpeg4_unpack_bframes setts Enabled indevs: dshow gdigrab lavfi vfwcap Enabled outdevs: sdl2 License: GPL version 2 or later ```

Usage and failure when called via FFmpeg.AutoGen

Got a successfull compilation. I generated bindings with FFmpeg.AutoGen and the target program failed to accept the .dlls when accessing those dlls with their bindings. They instantly cause an exception, at the very first attempt to get a version number. (But just for reference, the programs etc. are fine, it's just the usage from FFmpeg.AutoGen, that is failing) The details about how it fails with what exception using the above configuration setup is of this post: https://github.com/Ruslan-B/FFmpeg.AutoGen/issues/250#issuecomment-1474868841

So what is the difference to your workflow? dlls attached: FFmpeg dlls.zip

GyanD commented 1 year ago

Try adding --disable-w32threads --disable-autodetect

FrostKiwi commented 1 year ago

--disable-w32threads --disable-autodetect

Configured now with ../configure --prefix=installed --enable-shared --disable-static --disable-programs --disable-vulkan --enable-libx264 --enable-gpl --disable-w32threads --disable-autodetect

Config log ``` install prefix installed source path /home/artsimow/build/lib/ffmpeg C compiler gcc C library mingw64 ARCH x86 (generic) big-endian no runtime cpu detection yes standalone assembly yes x86 assembler nasm MMX enabled yes MMXEXT enabled yes 3DNow! enabled yes 3DNow! extended enabled yes SSE enabled yes SSSE3 enabled yes AESNI enabled yes AVX enabled yes AVX2 enabled yes AVX-512 enabled yes AVX-512ICL enabled yes XOP enabled yes FMA3 enabled yes FMA4 enabled yes i686 features enabled yes CMOV is fast yes EBX available yes EBP available yes debug symbols yes strip symbols yes optimize for size no optimizations yes static no shared yes postprocessing support yes network support yes threading support pthreads safe bitstream reader yes texi2html enabled no perl enabled yes pod2man enabled yes makeinfo enabled no makeinfo supports HTML no xmllint enabled yes External libraries: libx264 External libraries providing hardware acceleration: Libraries: avcodec avfilter avutil swresample avdevice avformat postproc swscale Programs: Enabled decoders: aac bfi hevc pcm_f16le sp5x aac_fixed bink hnm4_video pcm_f24le speedhq aac_latm binkaudio_dct hq_hqa pcm_f32be speex aasc binkaudio_rdft hqx pcm_f32le srt ac3 bintext huffyuv pcm_f64be ssa ac3_fixed bitpacked hymt pcm_f64le stl acelp_kelvin bmp iac pcm_lxf subrip adpcm_4xm bmv_audio idcin pcm_mulaw subviewer adpcm_adx bmv_video idf pcm_s16be subviewer1 adpcm_afc brender_pix iff_ilbm pcm_s16be_planar sunrast adpcm_agm c93 ilbc pcm_s16le svq1 adpcm_aica cavs imc pcm_s16le_planar svq3 adpcm_argo ccaption imm4 pcm_s24be tak adpcm_ct cdgraphics imm5 pcm_s24daud targa adpcm_dtk cdtoons indeo2 pcm_s24le targa_y216 adpcm_ea cdxl indeo3 pcm_s24le_planar text adpcm_ea_maxis_xa cfhd indeo4 pcm_s32be theora adpcm_ea_r1 cinepak indeo5 pcm_s32le thp adpcm_ea_r2 clearvideo interplay_acm pcm_s32le_planar tiertexseqvideo adpcm_ea_r3 cljr interplay_dpcm pcm_s64be tiff adpcm_ea_xas cllc interplay_video pcm_s64le tmv adpcm_g722 comfortnoise ipu pcm_s8 truehd adpcm_g726 cook jacosub pcm_s8_planar truemotion1 adpcm_g726le cpia jpeg2000 pcm_sga truemotion2 adpcm_ima_acorn cri jpegls pcm_u16be truemotion2rt adpcm_ima_alp cscd jv pcm_u16le truespeech adpcm_ima_amv cyuv kgv1 pcm_u24be tscc2 adpcm_ima_apc dca kmvc pcm_u24le tta adpcm_ima_apm dds lagarith pcm_u32be twinvq adpcm_ima_cunning derf_dpcm loco pcm_u32le txd adpcm_ima_dat4 dfa m101 pcm_u8 ulti adpcm_ima_dk3 dfpwm mace3 pcm_vidc utvideo adpcm_ima_dk4 dirac mace6 pcx v210 adpcm_ima_ea_eacs dnxhd magicyuv pfm v210x adpcm_ima_ea_sead dolby_e mdec pgm v308 adpcm_ima_iss dpx metasound pgmyuv v408 adpcm_ima_moflex dsd_lsbf microdvd pgssub v410 adpcm_ima_mtf dsd_lsbf_planar mimic pgx vb adpcm_ima_oki dsd_msbf mjpeg phm vble adpcm_ima_qt dsd_msbf_planar mjpegb photocd vbn adpcm_ima_rad dsicinaudio mlp pictor vc1 adpcm_ima_smjpeg dsicinvideo mmvideo pixlet vc1image adpcm_ima_ssi dss_sp mobiclip pjs vcr1 adpcm_ima_wav dst motionpixels ppm vmdaudio adpcm_ima_ws dvaudio movtext prores vmdvideo adpcm_ms dvbsub mp1 prosumer vmnc adpcm_mtaf dvdsub mp1float psd vorbis adpcm_psx dvvideo mp2 ptx vp3 adpcm_sbpro_2 dxtory mp2float qcelp vp4 adpcm_sbpro_3 dxv mp3 qdm2 vp5 adpcm_sbpro_4 eac3 mp3adu qdmc vp6 adpcm_swf eacmv mp3adufloat qdraw vp6a adpcm_thp eamad mp3float qoi vp6f adpcm_thp_le eatgq mp3on4 qpeg vp7 adpcm_vima eatgv mp3on4float qtrle vp8 adpcm_xa eatqi mpc7 r10k vp9 adpcm_yamaha eightbps mpc8 r210 vplayer adpcm_zork eightsvx_exp mpeg1video ra_144 vqa agm eightsvx_fib mpeg2video ra_288 wavpack aic escape124 mpeg4 ralf webp alac escape130 mpegvideo rawvideo webvtt alias_pix evrc mpl2 realtext wmalossless als fastaudio msa1 rl2 wmapro amrnb ffv1 msmpeg4v1 roq wmav1 amrwb ffvhuff msmpeg4v2 roq_dpcm wmav2 amv ffwavesynth msmpeg4v3 rpza wmavoice anm fic msnsiren rv10 wmv1 ansi fits msp2 rv20 wmv2 ape flac msrle rv30 wmv3 aptx flic mss1 rv40 wmv3image aptx_hd flv mss2 s302m wnv1 arbc fmvc msvideo1 sami wrapped_avframe argo fourxm mszh sanm ws_snd1 ass fraps mts2 sbc xan_dpcm asv1 frwu mv30 scpr xan_wc3 asv2 g723_1 mvc1 sdx2_dpcm xan_wc4 atrac1 g729 mvc2 sga xbin atrac3 gdv mvdv sgi xbm atrac3al gem mxpeg sgirle xface atrac3p gif nellymoser sheervideo xl atrac3pal gremlin_dpcm notchlc shorten xma1 atrac9 gsm nuv simbiosis_imx xma2 aura gsm_ms on2avc sipr xpm aura2 h261 opus siren xsub av1 h263 paf_audio smackaud xwd avrn h263i paf_video smacker y41p avrp h263p pam smc ylc avs h264 pbm smvjpeg yop avui hap pcm_alaw snow yuv4 ayuv hca pcm_bluray sol_dpcm zero12v bethsoftvid hcom pcm_dvd sonic Enabled encoders: a64multi cinepak mpeg2video pcm_u24be srt a64multi5 cljr mpeg4 pcm_u24le ssa aac comfortnoise msmpeg4v2 pcm_u32be subrip ac3 dca msmpeg4v3 pcm_u32le sunrast ac3_fixed dfpwm msvideo1 pcm_u8 svq1 adpcm_adx dnxhd nellymoser pcm_vidc targa adpcm_argo dpx opus pcx text adpcm_g722 dvbsub pam pfm tiff adpcm_g726 dvdsub pbm pgm truehd adpcm_g726le dvvideo pcm_alaw pgmyuv tta adpcm_ima_alp eac3 pcm_bluray phm ttml adpcm_ima_amv ffv1 pcm_dvd ppm utvideo adpcm_ima_apm ffvhuff pcm_f32be prores v210 adpcm_ima_qt fits pcm_f32le prores_aw v308 adpcm_ima_ssi flac pcm_f64be prores_ks v408 adpcm_ima_wav flv pcm_f64le qoi v410 adpcm_ima_ws g723_1 pcm_mulaw qtrle vbn adpcm_ms gif pcm_s16be r10k vc2 adpcm_swf h261 pcm_s16be_planar r210 vorbis adpcm_yamaha h263 pcm_s16le ra_144 wavpack alac h263p pcm_s16le_planar rawvideo webvtt alias_pix huffyuv pcm_s24be roq wmav1 amv jpeg2000 pcm_s24daud roq_dpcm wmav2 aptx jpegls pcm_s24le rpza wmv1 aptx_hd libx264 pcm_s24le_planar rv10 wmv2 ass libx264rgb pcm_s32be rv20 wrapped_avframe asv1 ljpeg pcm_s32le s302m xbm asv2 magicyuv pcm_s32le_planar sbc xface avrp mjpeg pcm_s64be sgi xsub avui mlp pcm_s64le smc xwd ayuv movtext pcm_s8 snow y41p bitpacked mp2 pcm_s8_planar sonic yuv4 bmp mp2fixed pcm_u16be sonic_ls cfhd mpeg1video pcm_u16le speedhq Enabled hwaccels: Enabled parsers: aac cri g723_1 mlp sipr aac_latm dca g729 mpeg4video tak ac3 dirac gif mpegaudio vc1 adx dnxhd gsm mpegvideo vorbis amr dolby_e h261 opus vp3 av1 dpx h263 png vp8 avs2 dvaudio h264 pnm vp9 avs3 dvbsub hevc qoi webp bmp dvd_nav ipu rv30 xbm cavsvideo dvdsub jpeg2000 rv40 xma cook flac mjpeg sbc Enabled demuxers: aa dhav image_pcx_pipe msnwc_tcp sds aac dirac image_pfm_pipe msp sdx aax dnxhd image_pgm_pipe mtaf segafilm ac3 dsf image_pgmyuv_pipe mtv ser ace dsicin image_pgx_pipe musx sga acm dss image_phm_pipe mv shorten act dts image_photocd_pipe mvi siff adf dtshd image_pictor_pipe mxf simbiosis_imx adp dv image_png_pipe mxg sln ads dvbsub image_ppm_pipe nc smacker adx dvbtxt image_psd_pipe nistsphere smjpeg aea dxa image_qdraw_pipe nsp smush afc ea image_qoi_pipe nsv sol aiff ea_cdata image_sgi_pipe nut sox aix eac3 image_sunrast_pipe nuv spdif alp epaf image_svg_pipe obu srt amr ffmetadata image_tiff_pipe ogg stl amrnb filmstrip image_vbn_pipe oma str amrwb fits image_webp_pipe paf subviewer anm flac image_xbm_pipe pcm_alaw subviewer1 apc flic image_xpm_pipe pcm_f32be sup ape flv image_xwd_pipe pcm_f32le svag apm fourxm ingenient pcm_f64be svs apng frm ipmovie pcm_f64le swf aptx fsb ipu pcm_mulaw tak aptx_hd fwse ircam pcm_s16be tedcaptions aqtitle g722 iss pcm_s16le thp argo_asf g723_1 iv8 pcm_s24be threedostr argo_brp g726 ivf pcm_s24le tiertexseq argo_cvg g726le ivr pcm_s32be tmv asf g729 jacosub pcm_s32le truehd asf_o gdv jv pcm_s8 tta ass genh kux pcm_u16be tty ast gif kvag pcm_u16le txd au gsm live_flv pcm_u24be ty av1 gxf lmlm4 pcm_u24le v210 avi h261 loas pcm_u32be v210x avr h263 lrc pcm_u32le vag avs h264 luodat pcm_u8 vc1 avs2 hca lvf pcm_vidc vc1t avs3 hcom lxf pjs vividas bethsoftvid hevc m4v pmp vivo bfi hls matroska pp_bnk vmd bfstm hnm mca pva vobsub bink ico mcc pvf voc binka idcin mgsts qcp vpk bintext idf microdvd r3d vplayer bit iff mjpeg rawvideo vqf bitpacked ifv mjpeg_2000 realtext w64 bmv ilbc mlp redspark wav boa image2 mlv rl2 wc3 brstm image2_alias_pix mm rm webm_dash_manifest c93 image2_brender_pix mmf roq webvtt caf image2pipe mods rpl wsaud cavsvideo image_bmp_pipe moflex rsd wsd cdg image_cri_pipe mov rso wsvqa cdxl image_dds_pipe mp3 rtp wtv cine image_dpx_pipe mpc rtsp wv codec2 image_exr_pipe mpc8 s337m wve codec2raw image_gem_pipe mpegps sami xa concat image_gif_pipe mpegts sap xbin data image_j2k_pipe mpegtsraw sbc xmv daud image_jpeg_pipe mpegvideo sbg xvag dcstr image_jpegls_pipe mpjpeg scc xwma derf image_jpegxl_pipe mpl2 scd yop dfa image_pam_pipe mpsub sdp yuv4mpegpipe dfpwm image_pbm_pipe msf sdr2 Enabled muxers: a64 dnxhd ismv ogg scc ac3 dts ivf ogv segafilm adts dv jacosub oma segment adx eac3 kvag opus smjpeg aiff f4v latm pcm_alaw smoothstreaming alp ffmetadata lrc pcm_f32be sox amr fifo m4v pcm_f32le spdif amv fifo_test matroska pcm_f64be spx apm filmstrip matroska_audio pcm_f64le srt apng fits md5 pcm_mulaw stream_segment aptx flac microdvd pcm_s16be streamhash aptx_hd flv mjpeg pcm_s16le sup argo_asf framecrc mkvtimestamp_v2 pcm_s24be swf argo_cvg framehash mlp pcm_s24le tee asf framemd5 mmf pcm_s32be tg2 asf_stream g722 mov pcm_s32le tgp ass g723_1 mp2 pcm_s8 truehd ast g726 mp3 pcm_u16be tta au g726le mp4 pcm_u16le ttml avi gif mpeg1system pcm_u24be uncodedframecrc avif gsm mpeg1vcd pcm_u24le vc1 avm2 gxf mpeg1video pcm_u32be vc1t avs2 h261 mpeg2dvd pcm_u32le voc avs3 h263 mpeg2svcd pcm_u8 w64 bit h264 mpeg2video pcm_vidc wav caf hash mpeg2vob psp webm cavsvideo hds mpegts rawvideo webm_chunk codec2 hevc mpjpeg rm webm_dash_manifest codec2raw hls mxf roq webp crc ico mxf_d10 rso webvtt dash ilbc mxf_opatom rtp wsaud data image2 null rtp_mpegts wtv daud image2pipe nut rtsp wv dfpwm ipod obu sap yuv4mpegpipe dirac ircam oga sbc Enabled protocols: async ffrtmphttp httpproxy prompeg tcp cache file icecast rtmp tee concat ftp md5 rtmpt udp concatf gopher mmsh rtp udplite crypto hls mmst srtp data http pipe subfile Enabled filters: abench atadenoise dynaudnorm mandelbrot showspatial abitscope atempo earwax maskedclamp showspectrum acompressor atilt ebur128 maskedmax showspectrumpic acontrast atrim edgedetect maskedmerge showvolume acopy avectorscope elbg maskedmin showwaves acrossfade avgblur entropy maskedthreshold showwavespic acrossover avsynctest epx maskfun shuffleframes acrusher axcorrelate eq mcompand shufflepixels acue bandpass equalizer median shuffleplanes addroi bandreject erosion mergeplanes sidechaincompress adeclick bass estdif mestimate sidechaingate adeclip bbox exposure metadata sidedata adecorrelate bench extractplanes midequalizer sierpinski adelay bilateral extrastereo minterpolate signalstats adenorm biquad fade mix signature aderivative bitplanenoise feedback monochrome silencedetect adrawgraph blackdetect fftdnoiz morpho silenceremove adynamicequalizer blackframe fftfilt movie sinc adynamicsmooth blend field mpdecimate sine aecho blockdetect fieldhint mptestsrc siti aemphasis blurdetect fieldmatch msad smartblur aeval bm3d fieldorder multiply smptebars aevalsrc boxblur fifo negate smptehdbars aexciter bwdif fillborders nlmeans sobel afade cas find_rect nnedi spectrumsynth afftdn cellauto firequalizer noformat speechnorm afftfilt channelmap flanger noise split afifo channelsplit floodfill normalize spp afir chorus format null sr afirsrc chromahold fps nullsink ssim aformat chromakey framepack nullsrc stereo3d afreqshift chromanr framerate oscilloscope stereotools afwtdn chromashift framestep overlay stereowiden agate ciescope freezedetect owdenoise streamselect agraphmonitor codecview freezeframes pad super2xsai ahistogram color fspp pal100bars superequalizer aiir colorbalance gblur pal75bars surround aintegral colorchannelmixer geq palettegen swaprect ainterleave colorchart gradfun paletteuse swapuv alatency colorcontrast gradients pan tblend alimiter colorcorrect graphmonitor perms telecine allpass colorhold grayworld perspective testsrc allrgb colorize greyedge phase testsrc2 allyuv colorkey guided photosensitivity thistogram aloop colorlevels haas pixdesctest threshold alphaextract colormap haldclut pixelize thumbnail alphamerge colormatrix haldclutsrc pixscope tile amerge colorspace hdcd pp tiltshelf ametadata colorspectrum headphone pp7 tinterlace amix colortemperature hflip premultiply tlut2 amovie compand highpass prewitt tmedian amplify compensationdelay highshelf pseudocolor tmidequalizer amultiply concat hilbert psnr tmix anequalizer convolution histeq pullup tonemap anlmdn convolve histogram qp tpad anlmf copy hqdn3d random transpose anlms cover_rect hqx readeia608 treble anoisesrc crop hstack readvitc tremolo anull cropdetect hsvhold realtime trim anullsink crossfeed hsvkey remap unpremultiply anullsrc crystalizer hue removegrain unsharp apad cue huesaturation removelogo untile aperms curves hwdownload repeatfields v360 aphasemeter datascope hwmap replaygain vaguedenoiser aphaser dblur hwupload reverse varblur aphaseshift dcshift hysteresis rgbashift vectorscope apsyclip dctdnoiz identity rgbtestsrc vflip apulsator deband idet roberts vfrdet arealtime deblock il rotate vibrance aresample decimate inflate sab vibrato areverse deconvolve interlace scale vif arnndn dedot interleave scale2ref vignette asdr deesser join scdet virtualbass asegment deflate kerndeint scharr vmafmotion aselect deflicker kirsch scroll volume asendcmd dejudder lagfun segment volumedetect asetnsamples delogo latency select vstack asetpts derain lenscorrection selectivecolor w3fdif asetrate deshake life sendcmd waveform asettb despill limitdiff separatefields weave ashowinfo detelecine limiter setdar xbr asidedata dialoguenhance loop setfield xcorrelate asoftclip dilation loudnorm setparams xfade aspectralstats displace lowpass setpts xmedian asplit dnn_classify lowshelf setrange xstack astats dnn_detect lumakey setsar yadif astreamselect dnn_processing lut settb yaepblur asubboost doubleweave lut1d shear yuvtestsrc asubcut drawbox lut2 showcqt zoompan asupercut drawgraph lut3d showfreqs asuperpass drawgrid lutrgb showinfo asuperstop drmeter lutyuv showpalette Enabled bsfs: aac_adtstoasc eac3_core hevc_mp4toannexb noise text2movsub av1_frame_merge extract_extradata imx_dump_header null trace_headers av1_frame_split filter_units mjpeg2jpeg opus_metadata truehd_core av1_metadata h264_metadata mjpega_dump_header pcm_rechunk vp9_metadata chomp h264_mp4toannexb mov2textsub pgs_frame_merge vp9_raw_reorder dca_core h264_redundant_pps mp3_header_decompress prores_metadata vp9_superframe dump_extradata hapqa_extract mpeg2_metadata remove_extradata vp9_superframe_split dv_error_marker hevc_metadata mpeg4_unpack_bframes setts Enabled indevs: dshow gdigrab lavfi vfwcap Enabled outdevs: License: GPL version 2 or later ```

Compiled, regenrated Bindings with FFmpeg.AutoGEN. Unfortunately, instantly throws an exception at ffmpeg.av_version_info(). There is still something different .・゚゚・(/ω\)・゚゚・.

I can't wrap my head around it...

Could you maybe post your configure log? Spcific GCC Version? I really wanna nail down what is so different about it.

GyanD commented 1 year ago

What are your CLFAGS / LDFLAGS / pkg config flags?

FrostKiwi commented 1 year ago

What are your CLFAGS / LDFLAGS / pkg config flags?

I am not adding any myself. But here is everything that is in the environment:

PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
PKG_CONFIG_SYSTEM_INCLUDE_PATH=/mingw64/include
PKG_CONFIG_SYSTEM_LIBRARY_PATH=/mingw64/lib

Maybe I am creating a conflict by having MSYS2_PATH_TYPE=inherit and thus mixing Windows's and MSYS2's PATHs?

GyanD commented 1 year ago

Does this mean that none of those variables are set?

FrostKiwi commented 1 year ago

Does this mean that none of those variables are set?

I guess that is the case. Aren't those set by the by the configure script via pkg-config automatically? Why would I need to set them myself? I never needed to set those in the past, so I'm confused why this would even be required, unless I'm pulling in custom build libraries...

PS: Compiled withoutMSYS2_PATH_TYPE=inherit, no change

GyanD commented 1 year ago

CFLAGS and LDFLAGS instruct the compiler and linker on how to translate and join generated objects. That can conceivably affect compatibility. Share what CFLAGS and LDFLAGS are after configure has finished and before make.

FrostKiwi commented 1 year ago

y. Share what CFLAGS and LDFLAGS are after configure has finished and before make.

I assume you refer to the *FLAGS in the make configs generated by configure At no point are there *FLAGS in the environment. I grepped the whole build directory after configure, but before make.

Full result of `grep -R -i 'c*flag'` ``` config.asm:%define HAVE_STRUCT_MSGHDR_MSG_FLAGS 0 config.h:#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 0 doc/config.texi:@c @set have-struct-msghdr-msg-flags no ffbuild/config.log: extra_cflags ffbuild/config.log: extra_cxxflags ffbuild/config.log: extra_objcflags ffbuild/config.log: host_cppflags ffbuild/config.log: host_cflags ffbuild/config.log: host_ldflags ffbuild/config.log: optflags ffbuild/config.log: nvccflags ffbuild/config.log: pkg_config_flags ffbuild/config.log:DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>/dev/null | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(@F),$(@D)/ $(@F)," > $(@:.o=.d)' ffbuild/config.log:DEPFLAGS=-MM ffbuild/config.log: struct_msghdr_msg_flags ffbuild/config.log:SHFLAGS='-shared -Wl,-soname,$$(@F)' ffbuild/config.log: struct_msghdr_msg_flags ffbuild/config.log:asflags_filter=echo ffbuild/config.log:cflags_filter=echo ffbuild/config.log:host_cflags_filter=echo ffbuild/config.log:host_ldflags_filter=echo ffbuild/config.log:ldflags_filter=echo ffbuild/config.log:overlay_vaapi_filter_deps='vaapi VAProcPipelineCaps_blend_flags' ffbuild/config.log:sctp_protocol_deps='struct_sctp_event_subscribe struct_msghdr_msg_flags' ffbuild/config.log:transpose_vaapi_filter_deps='vaapi VAProcPipelineCaps_rotation_flags' ffbuild/config.log:check_cxxflags -std=c++11 ffbuild/config.log:test_cflags_cc -std=c11 ctype.h __STDC_VERSION__ >= 201112L ffbuild/config.log:check_cppflags -D_FILE_OFFSET_BITS=64 ffbuild/config.log:check_cppflags -D_LARGEFILE_SOURCE ffbuild/config.log:check_host_cflags -std=c99 ffbuild/config.log:check_host_cflags -Wall ffbuild/config.log:check_host_cflags -O3 ffbuild/config.log:check_ldflags -Wl,--nxcompat,--dynamicbase ffbuild/config.log:test_ldflags -Wl,--nxcompat,--dynamicbase ffbuild/config.log:check_ldflags -Wl,--high-entropy-va ffbuild/config.log:test_ldflags -Wl,--high-entropy-va ffbuild/config.log:check_cflags -fomit-frame-pointer ffbuild/config.log:test_cflags -fomit-frame-pointer ffbuild/config.log:/tmp/ffconf.vPcI75RL/test.asm:1: error: unknown CPU type or flag 'amdnop' ffbuild/config.log:check_ldflags -Wl,--as-needed ffbuild/config.log:test_ldflags -Wl,--as-needed ffbuild/config.log:check_ldflags -Wl,-z,noexecstack ffbuild/config.log:test_ldflags -Wl,-z,noexecstack ffbuild/config.log:check_struct sys/socket.h struct msghdr msg_flags ffbuild/config.log:test_code cc sys/socket.h const void *p = &((struct msghdr *)0)->msg_flags ffbuild/config.log: 2 int main(void) { const void *p = &((struct msghdr *)0)->msg_flags; return 0; } ffbuild/config.log:check_cflags -Wdeclaration-after-statement ffbuild/config.log:test_cflags -Wdeclaration-after-statement ffbuild/config.log:check_cflags -Wall ffbuild/config.log:test_cflags -Wall ffbuild/config.log:check_cflags -Wdisabled-optimization ffbuild/config.log:test_cflags -Wdisabled-optimization ffbuild/config.log:check_cflags -Wpointer-arith ffbuild/config.log:test_cflags -Wpointer-arith ffbuild/config.log:check_cflags -Wredundant-decls ffbuild/config.log:test_cflags -Wredundant-decls ffbuild/config.log:check_cflags -Wwrite-strings ffbuild/config.log:test_cflags -Wwrite-strings ffbuild/config.log:check_cflags -Wtype-limits ffbuild/config.log:test_cflags -Wtype-limits ffbuild/config.log:check_cflags -Wundef ffbuild/config.log:test_cflags -Wundef ffbuild/config.log:check_cflags -Wmissing-prototypes ffbuild/config.log:test_cflags -Wmissing-prototypes ffbuild/config.log:check_cflags -Wstrict-prototypes ffbuild/config.log:test_cflags -Wstrict-prototypes ffbuild/config.log:check_cflags -Wempty-body ffbuild/config.log:test_cflags -Wempty-body ffbuild/config.log:test_cflags -Werror=unused-command-line-argument ffbuild/config.log:test_cflags -Werror=unknown-warning-option ffbuild/config.log:test_cflags -Wparentheses ffbuild/config.log:test_cflags -Wswitch ffbuild/config.log:test_cflags -Wformat-zero-length ffbuild/config.log:test_cflags -Wpointer-sign ffbuild/config.log:test_cflags -Wunused-const-variable ffbuild/config.log:test_cflags -Wbool-operation ffbuild/config.log:test_cflags -Wchar-subscripts ffbuild/config.log:test_cflags -Wdeprecated-declarations ffbuild/config.log:test_cflags -Wunused-variable ffbuild/config.log:check_ldflags -Wl,--warn-common ffbuild/config.log:test_ldflags -Wl,--warn-common ffbuild/config.log:check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:lib avutil ffbuild/config.log:test_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:liba vutil ffbuild/config.log:test_ldflags -Wl,-Bsymbolic ffbuild/config.log:check_stripflags -x ffbuild/config.log:test_stripflags -x ffbuild/config.log:test_ldflags -Wl,--version-script,/tmp/ffconf.vPcI75RL/test.ver ffbuild/config.log:check_cflags -O3 ffbuild/config.log:test_cflags -O3 ffbuild/config.log:check_cflags -fno-math-errno ffbuild/config.log:test_cflags -fno-math-errno ffbuild/config.log:check_cflags -fno-signed-zeros ffbuild/config.log:test_cflags -fno-signed-zeros ffbuild/config.log:check_cflags -fno-tree-vectorize ffbuild/config.log:test_cflags -fno-tree-vectorize ffbuild/config.log:check_cflags -Werror=format-security ffbuild/config.log:test_cflags -Werror=format-security ffbuild/config.log:check_cflags -Werror=implicit-function-declaration ffbuild/config.log:test_cflags -Werror=implicit-function-declaration ffbuild/config.log:check_cflags -Werror=missing-prototypes ffbuild/config.log:test_cflags -Werror=missing-prototypes ffbuild/config.log:check_cflags -Werror=return-type ffbuild/config.log:test_cflags -Werror=return-type ffbuild/config.log:check_cflags -Werror=vla ffbuild/config.log:test_cflags -Werror=vla ffbuild/config.log:check_cflags -Wformat ffbuild/config.log:test_cflags -Wformat ffbuild/config.log:check_cflags -fdiagnostics-color=auto ffbuild/config.log:test_cflags -fdiagnostics-color=auto ffbuild/config.log:test_cflags -Wmaybe-uninitialized ffbuild/config.mak:DEPCCFLAGS= $(CPPFLAGS) ffbuild/config.mak:DEPASFLAGS= $(CPPFLAGS) ffbuild/config.mak:DEPX86ASMFLAGS=$(X86ASMFLAGS) ffbuild/config.mak:ARFLAGS=rcD ffbuild/config.mak:CPPFLAGS= -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D_ _printf__=__gnu_printf__ -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC ffbuild/config.mak:CFLAGS= -std=c11 -fomit-frame-pointer -pthread -DX264_API_IMPORTS -g -Wdeclaration-after-statement -Wall -Wdisabled- optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-bod y -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscri pts -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missi ng-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -Wno-maybe-uninitialized ffbuild/config.mak:CXXFLAGS= -D__STDC_CONSTANT_MACROS -std=c++11 ffbuild/config.mak:OBJCCFLAGS= ffbuild/config.mak:ASFLAGS= -g ffbuild/config.mak:NVCCFLAGS=--cuda-gpu-arch=sm_30 -O2 -std=c++11 -m64 -S -nocudalib -nocudainc --cuda-device-only -Wno-c++11-narrowing - include /home/artsimow/build/lib/ffmpeg/compat/cuda/cuda_runtime.h ffbuild/config.mak:LDFLAGS= -Wl,--nxcompat,--dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link=:libpos tproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil ffbuild/config.mak:LDEXEFLAGS= -Wl,--image-base,0x140000000 ffbuild/config.mak:LDSOFLAGS= ffbuild/config.mak:SHFLAGS=-shared -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--disable-auto-image-base $$(@:$(SLIBSU F)=.def) -Wl,--image-base,0x180000000 -Wl,-Bsymbolic -Wl,--version-script,$(SUBDIR)lib$(NAME).ver ffbuild/config.mak:ASMSTRIPFLAGS= -x ffbuild/config.mak:X86ASMFLAGS=-f win64 -DPIC ffbuild/config.mak:MSAFLAGS= ffbuild/config.mak:MMIFLAGS= ffbuild/config.mak:LSXFLAGS= ffbuild/config.mak:LASXFLAGS= ffbuild/config.mak:CCDEP_FLAGS= ffbuild/config.mak:ASDEP_FLAGS= ffbuild/config.mak:X86ASMDEP_FLAGS= ffbuild/config.mak:CC_DEPFLAGS=-MMD -MF $(@:.o=.d) -MT $@ ffbuild/config.mak:CXX_DEPFLAGS=-MMD -MF $(@:.o=.d) -MT $@ ffbuild/config.mak:OBJCC_DEPFLAGS=-MMD -MF $(@:.o=.d) -MT $@ ffbuild/config.mak:AS_DEPFLAGS=-MMD -MF $(@:.o=.d) -MT $@ ffbuild/config.mak:X86ASM_DEPFLAGS=-MD $(@:.o=.d) ffbuild/config.mak:HOSTCFLAGS= -std=c99 -Wall -O3 ffbuild/config.mak:HOSTCPPFLAGS= -D_ISOC99_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_POSIX_C_SOU RCE=200112 -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 ffbuild/config.mak:HOSTLDFLAGS= ffbuild/config.mak:DEPHOSTCCFLAGS= $(HOSTCCFLAGS) ffbuild/config.mak:HOSTCCDEP_FLAGS= ffbuild/config.mak:HOSTCC_DEPFLAGS=-MMD -MF $(@:.o=.d) -MT $@ ffbuild/config.mak:CFLAGS-ffplay= ffbuild/config.mak:CFLAGS_HEADERS= -Wno-deprecated-declarations -Wno-unused-variable ffbuild/config.mak:NOREDZONE_FLAGS=-mno-red-zone ffbuild/config.mak:!HAVE_STRUCT_MSGHDR_MSG_FLAGS=yes ```
Full result of `grep -R -i 'ldflag'` ``` ffbuild/config.log: host_ldflags ffbuild/config.log:host_ldflags_filter=echo ffbuild/config.log:ldflags_filter=echo ffbuild/config.log:check_ldflags -Wl,--nxcompat,--dynamicbase ffbuild/config.log:test_ldflags -Wl,--nxcompat,--dynamicbase ffbuild/config.log:check_ldflags -Wl,--high-entropy-va ffbuild/config.log:test_ldflags -Wl,--high-entropy-va ffbuild/config.log:check_ldflags -Wl,--as-needed ffbuild/config.log:test_ldflags -Wl,--as-needed ffbuild/config.log:check_ldflags -Wl,-z,noexecstack ffbuild/config.log:test_ldflags -Wl,-z,noexecstack ffbuild/config.log:check_ldflags -Wl,--warn-common ffbuild/config.log:test_ldflags -Wl,--warn-common ffbuild/config.log:check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:lib avutil ffbuild/config.log:test_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:liba vutil ffbuild/config.log:test_ldflags -Wl,-Bsymbolic ffbuild/config.log:test_ldflags -Wl,--version-script,/tmp/ffconf.vPcI75RL/test.ver ffbuild/config.mak:LDFLAGS= -Wl,--nxcompat,--dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link=:libpos tproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil ffbuild/config.mak:HOSTLDFLAGS= ```

The interesting results being CFLAGS:

ffbuild/config.mak:CFLAGS=   -std=c11 -fomit-frame-pointer -pthread -DX264_API_IMPORTS -g -Wdeclaration-after-statement -Wall -Wdisabled-
optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-bod
y -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscri
pts -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missi
ng-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -Wno-maybe-uninitialized

CPPFLAGS

ffbuild/config.mak:CPPFLAGS= -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D_
_printf__=__gnu_printf__ -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC

HOSTCPPFLAGS

ffbuild/config.mak:HOSTCPPFLAGS= -D_ISOC99_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_POSIX_C_SOU
RCE=200112 -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600

and LDFLAGS

ffbuild/config.mak:LDFLAGS=  -Wl,--nxcompat,--dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link=:libpos
tproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil
FrostKiwi commented 1 year ago

Figured it out! It was a simple noob mistake, a misunderstanding. I got lazy with debugging due to the cryptic Exceptions not telling the cause. @Ruslan-B figured it out by simply opening the dlls.

Here is where I went wrong: I have compiled C programs with a minimal subset FFmpeg before, but statically + LTO. Now doing it with shared .dlls, I assumed it pulled in all the dependencies into those .dlls. But that was just a wrong assumption. So you have to specifically tell it to pull in libwinpthread, it doesn't happen automatically. Or provide the whole dlls, which is a bit wasteful.

Finally, custom 32bit, minimal, only a couple MBs libavXXX compatible with C# and FFMpeg.AutoGEN <3 Will create a write up in https://github.com/Ruslan-B/FFmpeg.AutoGen/pull/244 for others whishing for custom builds compatible with FFmpeg.AutoGEN and to avoid such noob mistakes.