ffmpeg-android-maker icon indicating copy to clipboard operation
ffmpeg-android-maker copied to clipboard

How can I get FFPLAY to build?

Open petermg opened this issue 1 year ago • 6 comments

Thank you very much for this amazing script. I need a bit of help. I have looked at the build.sh script in the ffmpeg folder and it does NOT contain --disabled-ffplay, yet ffplay is not being built. What do I need to do to get it to build? FFMPEG and FFPROBE are building just fine. Thanks!

petermg avatar Apr 11 '24 05:04 petermg

Also wanted to mention that adding "--enable-ffplay" as mentioned here does not cause ffplay to be built for me. However, when I go into the "sources" directory and do make clean, ./configure, make. It creates ffmpeg, ffprobe, and ffplay, but they aren't for android, they are for linux. I can't figure out how to get them to build for android that way.

petermg avatar Apr 11 '24 06:04 petermg

Hello @petermg

According to FFmpeg's configure script:

ffplay_deps="avcodec avformat avfilter swscale swresample sdl2"

I believe it expects sdl2 library to be provided (prebuilt for Android).

Javernaut avatar Apr 11 '24 06:04 Javernaut

Does this mean I have to enable sdl2 in the build script or ?

petermg avatar Apr 11 '24 06:04 petermg

When you simply do clean, ./configure, make, then you compile FFmpeg for your host machine, not for Android. This project tries to make the cross-compilation easier (building for Android specifically).

I personally successfully used ffmpeg binary in Android's terminal. But as for ffplay, it supposed to open a platform-dependant UI (a window). On Android this isn't the way software runs - you have to properly package an Android app and manually provide a ANativeWindow to FFmpeg. I don't have much details on the process, I'm afraid.

Javernaut avatar Apr 11 '24 06:04 Javernaut

When you simply do clean, ./configure, make, then you compile FFmpeg for your host machine, not for Android. This project tries to make the cross-compilation easier (building for Android specifically).

I personally successfully used ffmpeg binary in Android's terminal. But as for ffplay, it supposed to open a platform-dependant UI (a window). On Android this isn't the way software runs - you have to properly package an Android app and manually provide a ANativeWindow to FFmpeg. I don't have much details on the process, I'm afraid.

That makes sense. Thank you!! And thanks so much again for this phenomenally useful script!!!

petermg avatar Apr 11 '24 06:04 petermg

Does this mean I have to enable sdl2 in the build script or ?

I think so, yes. The SDL2 has to be accessible (and assessible) by FFmpeg's configure script during its execution. You can either manually build it from sources like the rest of libraries here, or somehow provide the prebuilt version of it to the build.

By the way, currently ffmpeg-android-maker builds everything from sources. Providing something in a prebuilt form is a good thing to think about. Thanks.

Javernaut avatar Apr 11 '24 06:04 Javernaut