I need to record a screen in the libgdx application and share the youtube video in one application. I compiled the ffmpeg project to get the FFMPEG binary. I took a list of screenshots in the application, and I need to convert them to video. Is FFMPEG the easiest way to convert images + sound to film? I added the FFMPEG file to the assert file. Now I tried to execute it with:
Runtime rt = Runtime.getRuntime(); rt.exec("chmod 700 ffmpeg"); rt.exec("ffmpeg");
This cannot be done because of the path, it seems wrong (the standard assertmanager cannot be used inside libgdx at the moment) I tried to copy the file from the assert folder to another location:
FileHandle handle = Gdx.files.internal("ffmpeg"); FileHandle destHandle = Gdx.files.external("/data/data/com.me.putingame.VideoProcessor/ffmpeg"); handle.copyTo(destHandle);
but since it is an external file, I do not know the path to execute ffmpeg for encoding. Which way can i use?
How can I execute ffmped inside non-root devices using libgdx? Some lines of code will be useful
Is this the best way to record video in android?
Regards, Marius
source share