VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Does anybody know how to generate shared ffms2 libs on Windows for compile with x264? I can't find guides about it and seems that it's not very common. I don't understand what I should do after to enter INSTALL from ffms2.
    Quote Quote  
  2. you might want to look at the scripts MBAS (https://github.com/m-ab-s/media-autobuild_suite/) uses,...
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. Sorry, but the bad experiences I had with MABS trying to compile FFmpeg with fdk_aac make me avoid it. Even FWBH has not given me so many problems.
    Quote Quote  
  4. Just thought the build script they used might help with your problem.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. In any case, now I have one more problem with ffms2. If I try to add prefix using a custom directory, it shows this.

    Code:
    ./configure --prefix=tmpbuild --host=i686-pc-mingw32 --enable-shared
    configure: error: expected an absolute directory name for --prefix: tmpbuild
    I read the help but I get confused and it doesn't seem to say how to reinterpret this on Windows and msys64-mingw.
    Quote Quote  
  6. Assuming you are in some sort of build environment where you can navigate, changing into the tmpbuild folder and calling 'realpath .' should output the absolute path of the folder.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  7. Even if I put --prefix=/c/sandbox/ffms2/tmpbuild I don't see any file being generated inside that folder, it ignored anyway
    Quote Quote  
  8. 'configure' shouldn't create anything in that folder.
    'make' probably should, if the MakeFile doesn't use the prefix variable you probably don't need it.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  9. When I try to compile ffms2 and run make I get this error

    "No target specified and no makefile found"

    Also, there is only two files: makefaile.am y makefile.in.
    Last edited by naoto89; 15th Jul 2020 at 18:30.
    Quote Quote  
  10. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    OK, chancing my luck on an old thread ...

    I would like to cross-compile ffms2.dll (ubuntu mingw64, target win11x64) but the instructions aren't all that clear for an old codger.

    Suggestions would be welcome.

    fyi, here is the .json used by a version of deadsix27's cross-compile build system which successfully builds ffmsindex.exe ... but that isn't ffms2.dll
    (the cross-compile build system cross-compiles ffmpeg fine).
    Code:
    {
    	'repo_type' : 'git',
    	'url' : 'https://github.com/FFMS/ffms2', 
    	'depth_git' : 0,
    	'rename_folder' : 'ffms2_dll',
    	'env_exports' : {
    		'CXXFLAGS' :  ' {original_stack_protector_trim} -I{target_prefix}/include -L{target_prefix}/lib -lintl -liconv -lssp ',
    		'CPPFLAGS' :  ' {original_stack_protector_trim} -I{target_prefix}/include -L{target_prefix}/lib -lintl -liconv -lssp ',
    		'CFLAGS'   :  ' {original_stack_protector_trim} -I{target_prefix}/include -L{target_prefix}/lib -lintl -liconv -lssp ',
    		'LDFLAGS'  :  ' {original_stack_protector_trim} -I{target_prefix}/include -L{target_prefix}/lib -lintl -liconv -lssp ', "-Wl,-Bsymbolic"',
    	},
    	'configure_options': '--host={target_host} --prefix={output_prefix}/ffms2_dll.installed --enable-static -disable-shared --with-pic --with-zlib={target_prefix}/lib', # --with-pic per https://github.com/ffms/ffms2/issues/90
    	'run_pre_patch' : [
    		'cp -fv "Makefile.am" "Makefile.am.orig"',
    		'cp -fv "configure.ac" "configure.ac.orig"',
    	],
    	'patches' : [
    		( 'ffms2/0001-ffmsindex-fix-linking-issues.patch', '-Np1' ),
    	],
    	'run_post_patch' : [ 
    		# diff for the patch
    		'diff -U 10 "Makefile.am.orig" "Makefile.am"  && echo "NO difference" || echo "YES differences!"',
    		'diff -U 10 "configure.ac.orig" "configure.ac"  && echo "NO difference" || echo "YES differences!"',
    		# diff for the sed
    		'cp -fv "ffms2.pc.in" "ffms2.pc.in.orig"',
    		'sed -i "s/Libs.private.*/& -lstdc++/;s/Cflags.*/& -DFFMS_STATIC/" "ffms2.pc.in"',
    		'diff -U 10 "ffms2.pc.in.orig" "ffms2.pc.in"  && echo "NO difference" || echo "YES differences!"',
    		#
    		'if [ -f "./configure" ] ; then rm -fv ./configure ; fi',
    		'if [ ! -d "src/config" ] ; then mkdir -p "src/config" ; fi',
    		'autoreconf -fiv',
    		#'./configure --help=recursive',
    	],
    	'depends_on': [
    		'libzimg', 'bzip2','libffmpeg_extra',
    	],
    	'update_check' : { 'type' : 'git', },
    	'_info' : { 'version' : 'git master', 'fancy_name' : 'ffms2_dll' },
    }
    Quote Quote  
  11. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Ah. Googled advice on resolving a pthreads related issue, which did not work for me :-

    Code:
    {
    	'repo_type' : 'git',
    	'url' : 'https://github.com/FFMS/ffms2', 
    	'depth_git' : 0,
    	#'recursive_git' : True,
    	'rename_folder' : 'ffms2_dll',
    	'env_exports' : {
    		'CXXFLAGS' :  ' -pthread -Wl,-Bsymbolic {original_stack_protector_trim} {original_fortify_source} {original_cflag} -I{output_prefix}/ffms2_dll.installed/include -I{target_prefix}/include -L{output_prefix}/ffms2_dll.installed/lib -L{target_prefix}/lib -lssp -lpthread ',
    		'CPPFLAGS' :  ' -pthread -Wl,-Bsymbolic {original_stack_protector_trim} {original_fortify_source} {original_cflag} -I{output_prefix}/ffms2_dll.installed/include -I{target_prefix}/include -L{output_prefix}/ffms2_dll.installed/lib -L{target_prefix}/lib -lssp -lpthread ',
    		'CFLAGS'   :  ' -pthread -Wl,-Bsymbolic {original_stack_protector_trim} {original_fortify_source} {original_cflag} -I{output_prefix}/ffms2_dll.installed/include -I{target_prefix}/include -L{output_prefix}/ffms2_dll.installed/lib -L{target_prefix}/lib -lssp -lpthread ',
    		'LDFLAGS'  :  ' -pthread -fstack-protector -Wl,-Bsymbolic {original_stack_protector_trim} -I{output_prefix}/ffms2_dll.installed/include -I{target_prefix}/include -L{output_prefix}/ffms2_dll.installed/lib -L{target_prefix}/lib -lssp -lpthread ', # to mitigate lock per https://github.com/ffms/ffms2/issues/90
    		'PKG_CONFIG_PATH'   : '{output_prefix}/ffms2_dll.installed/lib/pkgconfig',
    		'PKG_CONFIG_LIBDIR' : '{output_prefix}/ffms2_dll.installed/lib',
    	},
    	'patches' : [
    		( 'ffms2/0001-ffmsindex-fix-linking-issues.patch', '-Np1' ),# from MABS
    	],
    	'run_post_patch' : [ 
    		# diff for the patch
    		'diff -U 10 "Makefile.am.orig" "Makefile.am"  && echo "NO difference" || echo "YES differences!"',
    		'diff -U 10 "configure.ac.orig" "configure.ac"  && echo "NO difference" || echo "YES differences!"',
    		# diff for the sed
    		'cp -fv "ffms2.pc.in" "ffms2.pc.in.orig"',
    		#'sed -i "s/Libs.private.*/& -lstdc++/;s/Cflags.*/& -DFFMS_STATIC/" "ffms2.pc.in"',
    		'diff -U 10 "ffms2.pc.in.orig" "ffms2.pc.in"  && echo "NO difference" || echo "YES differences!"',
    		#
    		'if [ -f "./configure" ] ; then rm -fv ./configure ; fi',
    		'if [ ! -d "src/config" ] ; then mkdir -p "src/config" ; fi',
    		'autoreconf -fiv',
    		'./configure --help=recursive',
    	],
    	#'configure_options': '--host={target_host} --prefix={output_prefix}/ffms2_dll.installed --enable-static -disable-shared --with-pic --with-zlib={target_prefix}/lib ', # --with-pic per https://github.com/ffms/ffms2/issues/90
    	'configure_options': '--host={target_host} --prefix={output_prefix}/ffms2_dll.installed --disable-static -enable-shared --with-pic --with-zlib={output_prefix}/ffms2_dll.installed/lib ', # --with-pic per https://github.com/ffms/ffms2/issues/90
    	'run_pre_patch' : [
    		'cp -fv "Makefile.am" "Makefile.am.orig"',
    		'cp -fv "configure.ac" "configure.ac.orig"',
    	],
    	'depends_on': [
    		'ffms2_libffmpeg',		# has its own dependencies
    	],
    	'update_check' : { 'type' : 'git', },
    	'_info' : { 'version' : 'git master', 'fancy_name' : 'ffms2_dll' },
    }
    yielded
    Code:
    /home/u/Desktop/_working/workdir/win64_output/ffms2_dll.installed/include/libavcodec/avcodec.h:1104:14: note: declared here
     1104 |     uint64_t channel_layout;
          |              ^~~~~~~~~~~~~~
    src/core/utils.cpp:79:57: warning: 'int64_t av_get_default_channel_layout(int)' is deprecated [-Wdeprecated-declarations]
       79 |         AP.ChannelLayout = av_get_default_channel_layout(AP.Channels);
          |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
    In file included from src/core/utils.cpp:22:
    /home/u/Desktop/_working/workdir/win64_output/ffms2_dll.installed/include/libavutil/channel_layout.h:482:9: note: declared here
      482 | int64_t av_get_default_channel_layout(int nb_channels);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      CXXLD    src/core/libffms2.la
    /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: src/core/.libs/ffms.o:ffms.cpp:(.text+0x5f): undefined reference to `__imp_pthread_mutex_destroy'
    /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: src/core/.libs/ffms.o:ffms.cpp:(.text+0x492): undefined reference to `__imp_pthread_once'
    /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: src/core/.libs/ffms.o:ffms.cpp:(.text+0x4b4): undefined reference to `__imp_pthread_mutex_lock'
    /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: src/core/.libs/ffms.o:ffms.cpp:(.text+0x4dc): undefined reference to `__imp_pthread_mutex_unlock'
    /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: src/core/.libs/ffms.o:ffms.cpp:(.text+0x533): undefined reference to `__imp_pthread_mutex_lock'
    /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: src/core/.libs/ffms.o:ffms.cpp:(.text+0x55a): undefined reference to `__imp_pthread_mutex_unlock'
    /home/u/Desktop/_working/workdir/toolchain/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld: src/core/.libs/ffms.o:ffms.cpp:(.text.startup+0x21): undefined reference to `__imp_pthread_mutex_init'
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:657: src/core/libffms2.la] Error 1
    [17:47:22][ERROR] Error [2] running process: 'make -j 6 ' in '/home/u/Desktop/_working/workdir/x86_64_products/ffms2_dll'
    [17:47:22][ERROR] You can try deleting the product/dependency folder: '/home/u/Desktop/_working/workdir/x86_64_products/ffms2_dll' and re-run the script
    Advice greatly appreciated.
    Quote Quote  
  12. Member
    Join Date
    Feb 2004
    Location
    United States
    Search Comp PM
    Originally Posted by hydra3333 View Post
    OK, chancing my luck on an old thread ...

    I would like to cross-compile ffms2.dll (ubuntu mingw64, target win11x64) but the instructions aren't all that clear for an old codger.

    Suggestions would be welcome.
    Since you are targeting Windows, be aware that some variations of the ffms2 library require building with VC++.

    https://github.com/FFMS/ffms2/blob/master/doc/ffms2-api.md#windows-specific-compilation-notes
    PB
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!