
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (70)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (8363)
-
Error for android-ndk-r21d and ffmpeg-snapshot
4 août 2020, par yejafotwhy im getting the below errors.
Am i done any misconfiguration in the build file ?


Can you change it according, im trying to configure for arm64_v8a (.so) file for android jni in my linux machine. Thanks !


Below is my build file.


#!/bin/bash
export NDK=/media/sf_sharing/android-ndk-r21d
export SYSROOT=$NDK/platforms/android-21/arch-arm64/
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
export TARGET=aarch64-linux-android
export API=21
export AR=$TOOLCHAIN/bin/$TARGET-ar
export CC=$TOOLCHAIN/bin/$TARGET$API-clang
export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
export LD=$TOOLCHAIN/bin/$TARGET-ld
export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
export STRIP=$TOOLCHAIN/bin/$TARGET-strip
export CROSS_PREFIX=$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64
rm -f $(pwd)/compat/strtod.o 
function build_one
 {
 ./configure\
 --prefix=$PREFIX\
 --enable-shared\
 --disable-static\
 --ar=$AR\
 --cc=$CC\
 --cxx=$CXX\
 --pkg-config=$(which pkg-config)\
 --ld=$LD\
 --ranlib=$RANLIB\
 --strip=$STRIP\
 --enable-protocol=file\
 --enable-pic\
 --enable-small\
 --disable-programs\
 --disable-doc\
 --disable-symver\
 --target-os=android\
 --sysinclude=$TOOLCHAIN/sysroot/usr/include\
 --enable-cross-compile\
 --cross-prefix=$TOOLCHAIN/bin/$TARGET-\
 --extra-cflags="-Os -fpic $ADDI_CFLAGS"\
 --extra-ldflags="$ADDI_LDFLAGS"\
 --sysroot=$TOOLCHAIN/sysroot $ADDITIONAL_CONFIG_FLAG
 make clean
 make -j2
 make install
 }
 CPU=arm64-v8a
 mkdir -p $(pwd)/android/$CPU
 PREFIX=$(pwd)/android/$CPU
 ADDI_CFLAGS="-march=armv8-a"
 #ADDI_LDFLAGS="-L$TOOLCHAIN/sysroot/usr/lib"
 ADDI_LDFLAGS="-L$SYSROOT/usr/lib"
 ADDITIONAL_CONFIG_FLAG="--arch=aarch64 --enable-yasm"
 build_one



Error :


INSTALL doc/examples/Makefile
CC libavdevice/alldevices.o
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:39:
In file included from /media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/stdlib.h:32:
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: error: expected identifier or '('
char* getenv(const char* __name);
 ^
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:18: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:39:
In file included from /media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/stdlib.h:32:
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: error: expected ')'
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:18: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: note: to match this '('
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:17: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:39:
In file included from /media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include/stdlib.h:32:
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: error: expected ')'
char* getenv(const char* __name);
 ^
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:24: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/stdlib.h:61:7: note: to match this '('
./config.h:17:19: note: expanded from macro 'getenv'
#define getenv(x) NULL
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/stddef.h:89:16: note: expanded from macro 'NULL'
# define NULL ((void*)0)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:54:32: error: static declaration of 'cbrt' follows non-static declaration
static av_always_inline double cbrt(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:191:8: note: previous declaration is here
double cbrt(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:61:31: error: static declaration of 'cbrtf' follows non-static declaration
static av_always_inline float cbrtf(float x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:192:7: note: previous declaration is here
float cbrtf(float __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:68:32: error: static declaration of 'copysign' follows non-static declaration
static av_always_inline double copysign(double x, double y)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:279:8: note: previous declaration is here
double copysign(double __value, double __sign) __attribute_const__;
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:121:22: error: static declaration of 'erf' follows non-static declaration
static inline double erf(double z)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:211:8: note: previous declaration is here
double erf(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:340:9: warning: 'isnan' macro redefined [-Wmacro-redefined]
#define isnan(x) \
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:69:9: note: previous definition is here
#define isnan(x) __builtin_isnan(x)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:359:9: warning: 'isfinite' macro redefined [-Wmacro-redefined]
#define isfinite(x) \
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:65:9: note: previous definition is here
#define isfinite(x) __builtin_isfinite(x)
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:366:31: error: static declaration of 'hypot' follows non-static declaration
static inline av_const double hypot(double x, double y)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:199:8: note: previous declaration is here
double hypot(double __x, double __y);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:423:22: error: static declaration of 'rint' follows non-static declaration
static inline double rint(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:239:8: note: previous declaration is here
double rint(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:430:43: error: static declaration of 'lrint' follows non-static declaration
static av_always_inline av_const long int lrint(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:243:6: note: previous declaration is here
long lrint(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:437:43: error: static declaration of 'lrintf' follows non-static declaration
static av_always_inline av_const long int lrintf(float x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:244:6: note: previous declaration is here
long lrintf(float __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:444:41: error: static declaration of 'round' follows non-static declaration
static av_always_inline av_const double round(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:251:8: note: previous declaration is here
double round(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:451:40: error: static declaration of 'roundf' follows non-static declaration
static av_always_inline av_const float roundf(float x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:252:7: note: previous declaration is here
float roundf(float __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:458:41: error: static declaration of 'trunc' follows non-static declaration
static av_always_inline av_const double trunc(double x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:263:8: note: previous declaration is here
double trunc(double __x);
 ^
In file included from libavdevice/alldevices.c:23:
In file included from ./libavformat/internal.h:27:
In file included from ./libavformat/avformat.h:312:
In file included from ./libavcodec/avcodec.h:31:
In file included from ./libavutil/samplefmt.h:24:
In file included from ./libavutil/avutil.h:296:
In file included from ./libavutil/common.h:533:
In file included from ./libavutil/internal.h:143:
./libavutil/libm.h:465:40: error: static declaration of 'truncf' follows non-static declaration
static av_always_inline av_const float truncf(float x)
 ^
/media/sf_sharing/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/math.h:264:7: note: previous declaration is here
float truncf(float __x);
 ^
2 warnings and 15 errors generated.
make: *** [libavdevice/alldevices.o] Error 1
santoku@santoku:/media/sf_sharing/ffmpeg$



i tried all old version of ffmpeg,ndk with different build files but that didnt work so now im trying this latest ffmpeg-snapshot and ndk21


-
cmake installation of x265 for ffmpeg on Cygwin - executable location different from other codecs
6 mai, par bballdave025TL ;DR (with expected vs. real)


For a Cygwin build of
ffmpeg
, I'm installingx265
, and it seems to me that the executable ends up in the wrong place. I'll show some basic directory structure, then I'll show thetree
outputs for expected and real, both before and after thecmake
installation. For directories where I think this is important, I'll show the outputs before and after thecmake
installation.

My question has two parts. I used the following
cmake
andmake
commands,

# pwd => $HOME/programs/ffmpeg/ffmpeg_sources/x265/build/linux
PATH="$HOME/programs/ffmpeg/bin:$PATH" \
 cmake -G "Unix Makefiles" \
 -DCMAKE_INSTALL_PREFIX="$HOME/programs/ffmpeg/ffmpeg_build" \
 -DENABLE_SHARED=OFF \
 -DCMAKE_EXE_LINKER_FLAGS="-static" 
 ../../source
PATH="$HOME/programs/ffmpeg/bin:$PATH" make -j $(nproc)
make install



The result is below, with my real vs. expected, and there is a more detailed, more explicit, and hopefully more clear file with the info.
at pastebin.com/86wHrtxR.

Edit : I've made a copy of the detailed/explicit/clear file on my GitHub as a gist. This should be more secure. (The Pastebin version still exists, in case that is your preference.)


Now, for my two-part question :


- 

-
How can I change my
cmake
command so that myx265.exe
file ends up in$HOME/programs/ffmpeg/bin
with the proper linking, rather than$HOME/programs/ffmpeg/ffmpeg_build/bin
?

-
Would the build/linker/whatever figure things out for the
ffmpeg
build ?







I want to know the answer to question number 1 regardless of the answer to question number 2. I haven't used
cmake
with the-DVAR=var
flags before, and I'd like to take this opportunity to learn.

For the result :


Things surrounded by double curly brackets are
{{ expected }}
.

Things surrounded by double angle brackets are
<< real >>
, i.e. they exist after the installation is done.

If real matches expected, and the file/directory is new, I've surrounded it by double parentheses, i.e. double round brackets.
(( match ))


If something is not new (and thus has the same before and after) I haven't marked it.


me@MACHINE ~/programs/ffmpeg
 $ tree --charset=ascii bin
 bin
 |-- lame.exe
 |-- mp3rtp.exe
 |-- mp3x.exe
 `-- x264.exe
{{ `-- x265.exe }} ## Expected, not Exists

 me@MACHINE ~/programs/ffmpeg
 $ tree --charset=ascii \
 ffmpeg_build
 ffmpeg_build
<< |-- bin >> ## Not expected, Exists
<< | `-- x265.exe >> ## Not expected, Exists
 |-- include
 | |-- fdk-aac
 | | |-- aacdecoder_lib.h
 | | |-- aacenc_lib.h
 | | `-- ... <more files="files">
 | |-- lame
 | | `-- lame.h
 | |-- x264.h
 | `-- x264_config.h
(( | |-- x265.h )) ## Expected and Exists
(( | `-- x265_config.h )) ## Expected and Exists
 |-- lib
 | |-- libfdk-aac.a
 | |-- libfdk-aac.la
 | |-- libmp3lame.a
 | |-- libmp3lame.la
(( | |-- libx265.a )) ## Expected and Exists
 | `-- pkgconfig
 | |-- fdk-aac.pc
 | `-- x264.pc
(( | `-- x265.pc )) ## Expected and Exists
 `-- share
 |-- doc
 | ... <only lame="lame">
 `-- man
 ... <only lame="lame">
</only></only></more>


Other, possibly useful information about the build directory structure.


me@MACHINE ~/programs/ffmpeg
$ tree --charset=ascii -L 1 .
.
|-- bin
|-- ffmpeg_build
`-- ffmpeg_sources

3 directories, 0 files



For this next,
ffmpeg_sources
dir, I'm showing the after (which is both expected and real/exists) surrounded by double parentheses, i.e. double round brackets,(( <after> ))</after>
.

me@MACHINE ~/programs/ffmpeg
 $ tree --charset=ascii -L 1 ffmpeg_sources
 ffmpeg_sources
 |-- fdk-aac.zip
 |-- lame-svn
 |-- mstorsjo-fdk-aac-e7d8591
 |-- x264-snapshot-20191217-2245
 |-- x264-snapshot-20191217-2245.tar.bz2
 `-- x264-snapshot-20191218-README.txt
(( `-- x265 ))

 3 directories, 3 files
(( 4 directories, 3 files ))




NOW, FOR SOME MORE DETAIL



What I'm Doing


I am working on a Cygwin build (vs. a Windows/mingw build) of
ffmpeg
. I am following an older guide by koohiimaster (archived). That guide says,



[W]e are not cross-compiling for windows ; we are compiling for Cygwin.




This 2014 guide doesn't have all of the codecs I want - I want as complete a build as possible - so I've also been referring to this ffmpeg-for-Ubuntu guide (archived), which I hope is kept up-to-date. It's referred to by koohiimaster.


Also, as a way of checking that I'm getting all the codecs I want, I've been looking at this FFmpeg for Windows guide from SuperUser


I'll give the basics of my steps below.
More details, as well as all the output is at pastebin.com/suL1nU6Z.

Edit : I've put the log of terminal input/output for all my steps into a gist at my GitHub as this seems safer than Pastebin.


A look at directory structure for the build


me@MACHINE ~/programs/ffmpeg
$ cd $HOME/programs/ffmpeg

me@MACHINE ~/programs/ffmpeg
$ tree --charset=ascii -d -L 1
.
|-- bin
|-- ffmpeg_build
`-- ffmpeg_sources

3 directories



Getting the source. Note that I had to
apt-cyg install mercurial
, though (with my Cygwin setup GUI/EXE in my Cygwin root directory, i.e.C:\cygwin64\setup-x86_64.exe
), I could also have done/setup-x86_64.exe install -q -P mercurial
.

cd ffmpeg_sources
hg clone https://bitbucket.org/multicoreware/x265



Running the
cmake
andmake
commands

cd x265/build/linux
PATH="$HOME/programs/ffmpeg/bin:$PATH" \
 cmake -G "Unix Makefiles" \
 -DCMAKE_INSTALL_PREFIX="$HOME/programs/ffmpeg/ffmpeg_build" \
 -DENABLE_SHARED=OFF \
 -DCMAKE_EXE_LINKER_FLAGS="-static" \
 ../../source
PATH="$HOME/programs/ffmpeg/bin:$PATH" make -j $(nproc)
make install



It was the last part (actually the very last line) of the
make install
output that worried me. Here is the whole output - it's not very long.

make[1]: Entering directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
make[2]: Entering directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
make[2]: Leaving directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
[ 20%] Built target encoder
make[2]: Entering directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
make[2]: Leaving directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
[ 83%] Built target common
make[2]: Entering directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
make[2]: Leaving directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
[ 84%] Built target x265-static
make[2]: Entering directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
make[2]: Leaving directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
[100%] Built target cli
make[1]: Leaving directory '/home/me/programs/ffmpeg/ffmpeg_sources/x265/build/linux'
Install the project...
-- Install configuration: "Release"
-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/lib/libx265.a
-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/include/x265.h
-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/include/x265_config.h
-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/lib/pkgconfig/x265.pc
-- Installing: /home/me/programs/ffmpeg/ffmpeg_build/bin/x265.exe



As discussed in the TL ;DR section, I expected to see
x265.exe
at

home/me/programs/ffmpeg/bin/x265.exe


rather than the path given on the last line of output,


/home/me/programs/ffmpeg/ffmpeg_build/bin/x265.exe


This worries me especially because the first part of the
ffmpeg
install command that my instructions inform me to run is

PATH="$HOME/programs/ffmpeg/bin:$PATH" \
PKG_CONFIG_PATH="$HOME/programs/ffmpeg/ffmpeg_build/lib/pkgconfig" \
 ./configure \
 --prefix="$HOME/programs/ffmpeg/ffmpeg_build" \
 --extra-cflags="-I$HOME/programs/ffmpeg/ffmpeg_build/include" \
 --extra-ldflags="-L$HOME/programs/ffmpeg/ffmpeg_build/lib" \
 --bindir="$HOME/programs/ffmpeg/bin" \



... and on it goes ...


It would seem to me that the
.configure
script forffmpeg
won't find thex265
executable, since it's not in thebindir
.

I'll repeat my two-part question from before :


- 

- How can I change my
cmake
command so that myx265.exe
file ends up in$HOME/programs/ffmpeg/bin
with the proper linking, rather than$HOME/programs/ffmpeg/ffmpeg_build/bin
?




What I'm looking for here is something akin to the
--bindir
flag frommake
's./confiure
.

- 

- Would the build/linker/whatever figure things out for the
ffmpeg
build ?




I want to know the answer to question number 1 regardless of the answer to question number 2. I haven't used
cmake
with the-DVAR=var
flags before, and I'd like to take this opportunity to learn.


Where I've Looked & What I've Tried


I first started with the
man
page and the--help
forcmake
. That was scary. I was hoping that I'd find something useful around theCMAKE_INSTALL_PREFIX
stuff, but I wasn't sure what to make of it.

I tried
grep
ing throughcmake --help-full
(with 50 lines before and after whatever I was searching for), but got tripped up by the complexity. I've only used basiccmake
stuff, before, and I got more than a little lost.

Even with the
--help
, I don't know if I need to look at thehelp-manual
, thehelp-command
, thehelp-module
, thehelp-policy
, thehelp-variable
, or something else.

It seemed to me, in reading, that a "binary directory" is the top of the "build", whereas I thought it would be the dir named
bin
... I couldn't tell what things were meant to be used by the person creating the package rather than by me, who am trying to make/build the package from the command line.

I looked through what seemed to be a
cmake
wiki's Useful Variables page (archived), as well as at this thread at cmake.org (archived), which, along with this SO source and this and this and this and this SO sources, seemed to suggest using theCMAKE_RUNTIME_OUTPUT_DIRECTORY
variable (since theEXECUTABLE_OUTPUT-DIRECTORY
variable has been superseded by it). By the way, I couldn't tell which things should be used by the creator of the package vs. the consumer of the package - the consumer being me. I tried with

PATH="$HOME/programs/ffmpeg/bin:$PATH" \
 cmake -G "Unix Makefiles" \
 -DCMAKE_INSTALL_PREFIX="$HOME/programs/ffmpeg/ffmpeg_build" \
 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="$HOME/programs/ffmpeg/bin" \
 -DENABLE_SHARED=OFF \
 -DCMAKE_EXE_LINKER_FLAGS="-static" 
 ../../source
PATH="$HOME/



and have thought about fifty-or-so other -DVAR variables, but with any I have tried, I still get the same result. I still get the executable in what seems to be the wrong place.



System Details


$ date && date +'%s'
Tue, May 5, 2020 11:14:40 AM
1588698880
$ uname -a
CYGWIN_NT-10.0 MACHINE 3.1.4(0.340/5/3) 2020-02-19 08:49 x86_64 Cygwin
$ cmake --version
cmake version 3.14.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ bash --version | head -n 1
GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)
$ gcc --version | head -n 1
gcc (GCC) 9.3.0
$ g++ --version | head -n 1
g++ (GCC) 9.3.0
$ make --version | head -n 2
GNU Make 4.3
Built for x86_64-pc-cygwin



-
-
fftools/resources : Fix double-build by disabling .d file generation
23 juin, par softworkz