Giter Site home page Giter Site logo

Project generation fails with things like "--disable-encoders --disable-decoders --enable-decoder=h264" about ffvs-project-generator HOT 13 CLOSED

shiftmediaproject avatar shiftmediaproject commented on June 7, 2024
Project generation fails with things like "--disable-encoders --disable-decoders --enable-decoder=h264"

from ffvs-project-generator.

Comments (13)

Sibras avatar Sibras commented on June 7, 2024 1

OK, thanks.

It turns out it was a dependency configuration handling issue. I think ive ironed it out now with the latest version.

from ffvs-project-generator.

Sibras avatar Sibras commented on June 7, 2024

I tested the supplied command line:
--disable-encoders --disable-decoders --enable-decoder=h264

A libavcodec.vcxproj project file was created and seemed to be correct. I am not able to reproduce your error. Make sure you are using the latest FFVS and if you have an actual command line the does produce an error then post it that.

from ffvs-project-generator.

oviano avatar oviano commented on June 7, 2024

Thank you for looking at this.

Here is the snippet from the bash script that does the building. I'm struggling to make it display as code below, there are of course backslashes at the end of each line of the configure command, but they aren't showing.

#!/bin/bash -x

rm -rf FFmpeg-Windows
mv SMP/project_generate.exe .
rm -rf SMP
mkdir SMP
mv project_generate.exe SMP/
cd SMP
./project_generate.exe --disable-programs
--disable-avdevice
--disable-avformat
--disable-avfilter
--disable-postproc
--disable-swresample
--disable-swscale
--disable-muxers
--disable-demuxers
--disable-encoders
--disable-decoders
--enable-decoder=h264
--enable-decoder=hevc
--enable-decoder=aac
--disable-parsers
--enable-parser=h264
--enable-parser=hevc
--enable-parser=aac
--disable-bsfs
--enable-bsf=h264_mp4toannexb
--enable-bsf=hevc_mp4toannexb
--enable-bsf=aac_adtstoasc
--disable-doc
--disable-network
--disable-bzlib
--disable-iconv
--disable-zlib
--disable-lzma
--disable-sdl2
--prefix=..\FFmpeg-Windows
--toolchain=msvc
|| exit 1

from ffvs-project-generator.

Sibras avatar Sibras commented on June 7, 2024

OK I have tested and found the issue. The avcodec lib requires that the null_bsf is enabled. You have disabled that when you disabled all bsf's. To allow avcodec to be created you must enable the null_bsf on the command line.

from ffvs-project-generator.

Sibras avatar Sibras commented on June 7, 2024

For reference the most recent version of FFVS when passed the "--loud" command line option will detail which options where auto disabled due to unmet dependencies (and which dependencies those were).

from ffvs-project-generator.

oviano avatar oviano commented on June 7, 2024

Interesting! Thanks for looking at it - oddly this is not the case for the other platforms I build for; on macOS, iOS, tvOS and Android avcodec builds with equivalent command line to the above (disable-bsf and just the listed select few enabled.)

Thanks for the tip re: --loud.

from ffvs-project-generator.

oviano avatar oviano commented on June 7, 2024

Hmm, so it gives a different error when I add the --enable-bsf=null:

  • ./project_generate.exe --disable-programs --disable-avdevice --disable-avformat --disable-avfilter --disable-postproc --disable-swresample --disable-swscale --disable-muxers --disable-demuxers --disable-encoders --disable-decoders --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=aac --disable-parsers --enable-parser=h264 --enable-parser=hevc --enable-parser=aac --disable-bsfs --enable-bsf=h264_mp4toannexb --enable-bsf=hevc_mp4toannexb --enable-bsf=aac_adtstoasc --enable-bsf=null --disable-doc --disable-network --disable-bzlib --disable-iconv --disable-zlib --disable-lzma --disable-sdl2 '--prefix=..\FFmpeg-Windows' --toolchain=msvc
    Project generator (this may take several minutes, please wait)...
    Passing configure file...
    Outputting config.h...
    Outputting avconfig.h...
    Outputting ffversion.h...
    Outputting enabled components file libavfilter/filter_list.c...
    Outputting enabled components file libavcodec/codec_list.c...
    Outputting enabled components file libavcodec/parser_list.c...
    Outputting enabled components file libavcodec/bsf_list.c...
    Outputting enabled components file libavformat/demuxer_list.c...
    Outputting enabled components file libavformat/muxer_list.c...
    Outputting enabled components file libavdevice/indev_list.c...
    Outputting enabled components file libavdevice/outdev_list.c...
    Outputting enabled components file libavformat/protocol_list.c...
    Generating from Makefile (../libavcodec/MakeFile)...
    Generating from Makefile (../libavcodec/x86/MakeFile)...
    Generating missing DCE symbols (libavcodec)...
    Generating project exports file (libavcodec)...
    Invalid switch - "".
    Error: Errors detected during compilation :-
    error C2374: 'ff_h263_chroma_qscale_table': redefinition; multiple initialization
    Unknown error detected. See ffvs_log.txt for further details.

<<<<

from ffvs-project-generator.

Sibras avatar Sibras commented on June 7, 2024

Interesting! Thanks for looking at it - oddly this is not the case for the other platforms I build for; on macOS, iOS, tvOS and Android avcodec builds with equivalent command line to the above (disable-bsf and just the listed select few enabled.)

The dependency checking is a little bit different on FFVS and that can sometimes result in differences.

Hmm, so it gives a different error when I add the --enable-bsf=null:

That should now be fixed in the latest 1.9.1 version.

from ffvs-project-generator.

oviano avatar oviano commented on June 7, 2024

Thanks! It's getting closer, it creates the project now but gives some link errors at the end. Do you get these, or is this something about my build? I'm using FFmpeg 4.3 branch.

"C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj" (default target) (1) ->
1940(Link target) ->
1941 msmpeg4data.obj : error LNK2001: unresolved external symbol ff_inter_vlc [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1942 msmpeg4data.obj : error LNK2001: unresolved external symbol ff_inter_level [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1943 msmpeg4data.obj : error LNK2001: unresolved external symbol ff_inter_run [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1944 msmpeg4data.obj : error LNK2001: unresolved external symbol ff_mpeg4_intra_vlc [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1945 msmpeg4data.obj : error LNK2001: unresolved external symbol ff_mpeg4_intra_level [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1946 msmpeg4data.obj : error LNK2001: unresolved external symbol ff_mpeg4_intra_run [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1947 mpegvideo_motion.obj : error LNK2019: unresolved external symbol ff_h261_loop_filter referenced in function mpeg_motion_internal [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1948 mpegvideo_motion.obj : error LNK2019: unresolved external symbol ff_mspel_motion referenced in function mpv_motion_internal [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1949 mpegvideo_enc.obj : error LNK2001: unresolved external symbol ff_h263_format [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1950 mpegvideo_enc.obj : error LNK2001: unresolved external symbol ff_mpeg4_default_intra_matrix [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1951 mpegvideo_enc.obj : error LNK2001: unresolved external symbol ff_mpeg4_default_non_intra_matrix [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1952 C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP..\FFmpeg-Windows\bin\x64\avcodecd.dll : fatal error LNK1120: 11 unresolved externals [C:\AppVeyor-Workspaces\FFmpeg\windows\source\thirdparty\FFmpeg\SMP\libavcodec.vcxproj]
1953
1954 12 Warning(s)
1955 12 Error(s)
1956
1957

<<<<<

from ffvs-project-generator.

oviano avatar oviano commented on June 7, 2024

Actually I've seen something like this before.

In one of the examples above (ff_h261_loop_filter) there is this code in mpegvideo_motion.c:

if (!is_mpeg12 && (CONFIG_H261_ENCODER || CONFIG_H261_DECODER) &&
    s->out_format == FMT_H261) {
    ff_h261_loop_filter(s);
}

I vaguely recall that VS still gives a link error for this even though neither CONFIG_H261_ENCODER or CONFIG_H261_DECODER are enabled. I think previously I've added a modification to the FFmpeg code, but maybe there is some kind of setting that could be used in the project?

Not all the link errors above are of this nature though.

from ffvs-project-generator.

Sibras avatar Sibras commented on June 7, 2024

I vaguely recall that VS still gives a link error for this even though neither CONFIG_H261_ENCODER or CONFIG_H261_DECODER are enabled. I think previously I've added a modification to the FFmpeg code, but maybe there is some kind of setting that could be used in the project?

This is an issue that exists with msvc and there is nothing much that can be done. Thats why FFVS dynamically scans the source files and detects missing DCE (the cause of the error) information and will fill in the blanks. Obviously based on the above error then the DCE scan is missing some usages. So ill have to fix that.

The first issues are odd though. Ive checked the ffmpeg makefile and it definitely doesnt include the correct source files to stop those link errors (ff_inter_vlc etc. require h263data.c to be included along with msmpeg4data.c). So im not sure if this is an error with ffmpeg make files (that like dce only shows up with msvc) or for some reason the configuration is not including the correct dependencies. If you have a config.h file generated with the exact same command line but with ffmpeg natively (i.e. not FFVS - another platform will do) then that might help me track down whats going on.

from ffvs-project-generator.

oviano avatar oviano commented on June 7, 2024

Ok, here is a config.h from a macOS build with similar configuration:

https://ovcollyer-colebrooke.synology.me:5001/d/f/577028650887591424

And here is the corresponding config.log:

https://ovcollyer-colebrooke.synology.me:5001/d/f/577028828384245426

I also have these for iOS, tvOS and Android if it helps.

from ffvs-project-generator.

oviano avatar oviano commented on June 7, 2024

Yes that has now built successfully. I haven’t actually tested it yet but I anticipate the at it will be ok.

Thank you.

Oliver.

from ffvs-project-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.