[FFmpeg-user] cross compile FFPLAY

Moritz Barsnick barsnick at gmx.net
Fri Mar 31 22:05:43 EEST 2017


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


More information about the ffmpeg-user mailing list