cross compile FFPLAY
Hello! I can successfully build ffmpeg using a cross compile toolchain (linaro). What I need on my target system is mostly ffplay, however, FFPLAY is missing. Some google searches showed that SDL is required to build FFPLAY, so i installed libsdl2-dev. I am running ./configure using ./configure --enable-cross-compile --cross-prefix=<toolchain_path>/arm-linux-gnueabihf- --arch=arm --cpu=armv7-a --target-os=linux what generates a warning: WARNING: <toolchain_path>/arm-linux-gnueabihf-pkg-config not found, library detection may fail. what is correct, there is no -pkg-config in the toolchain. config.mak had a line !CONFIG_FFPLAY=yes that i removed the ! from. On 'make', everything is build just fine except for ffplay: CC ffplay.o ffplay.c:56:17: fatal error: SDL.h: No such file or directory compilation terminated. I don know if the error is related to the warning I got on running the configure script. Do I need SDL to be built for the target platform (= cross compile and then link the result (how would i link this?)?) or should it be working right away? If -pgk-config does not exist, is that a problem? If what I want is not possible for some reason, what might be an alternative to ffplay?
On Thu, Mar 30, 2017 at 12:02:52 +0200, Lars Heinrichs wrote:
FFPLAY, so i installed libsdl2-dev.
Is that a cross-compile package of SDL2? Likely not.
On 'make', everything is build just fine except for ffplay: CC ffplay.o ffplay.c:56:17: fatal error: SDL.h: No such file or directory compilation terminated.
I don know if the error is related to the warning I got on running the configure script.
Well, this error misses exactly what it's saying: SDL.h. It doesn't know where to look for it. At a later stage - if it passed this one - it will look for a libSDL2.so which is built for the target platform, and again fail. (The libsdl2-dev named above probably does not provide the libraries for your ARM target.)
Do I need SDL to be built for the target platform (= cross compile and then link the result (how would i link this?)?)
Yes.
or should it be working right away?
No
I -pgk-config does not exist, is that a problem?
In the case of sdl2 support, ffmpeg's configure script first checks availability of SDL2's own "sdl-config" script, then pkg-config. It does *not* provide the possibility to find the SDL2 headers and libs with the use of "--extra-{c,ld}flags", as far as I can tell. Your trick above may help though. (You still need the target libs!)
If what I want is not possible for some reason, what might be an alternative to ffplay?
To me, ffplay is not really a "player of choice". OTOH, building alternatives like mplayer or mpv for your target may be even more tricky. Can you not find pre-built packages for your target? (And then just build ffmpeg for yourself.) Moritz
participants (2)
-
Lars Heinrichs -
Moritz Barsnick