bravobit / FFmpeg-Android

FFMpeg/FFprobe compiled for Android
https://bravobit.nl/
MIT License
734 stars 172 forks source link

Gif to mp4 conversion #88

Closed emreozum closed 5 years ago

emreozum commented 5 years ago

I'm trying to convert GIF image to mp4 video. Here is the code I use. Any help is much appreciated!

String command = "-f gif -i /sdcard/example.gif /sdcard/outfile.
String[] commands = command.
execFFmpegBinary(commands);
private void execFFmpegBinary(final String[] command) {
        ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
            @Override
            public void onFailure(String s) {
//                    addTextViewToLayout("FAILED with output : "+s);
            }

            @Override
            public void onSuccess(String s) {
                Toast.makeText(MainActivity.this, "Afferin len", Toast.LENGTH_LONG).show();
            }

            @Override
            public void onProgress(String s) {
                Log.d("Converting: ", "Started command : ffmpeg "+command);
            }

            @Override
            public void onStart() {
//                    outputLayout.removeAllViews();
//
//                    Log.d(TAG, "Started command : ffmpeg " + command);
//                    progressDialog.setMessage("Processing...");
//                    progressDialog.show();
            }

            @Override
            public void onFinish() {
                Log.d("Finish", "Finished command : ffmpeg "+command);
//                    progressDialog.dismiss();
            }
        });

    }
Brianvdb commented 5 years ago

What is the problem?