tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.85k stars 787 forks source link

How to join mp3 with array of images(paths from text file) along with seconds frame wise? #650

Closed Ravipatel401 closed 3 years ago

Ravipatel401 commented 3 years ago

Description I have used older FFmpeg which is currently not working in Android 10 and later, I started learning this library and I need help for a command that combines mp3 with images and also seconds define by duration by images wise

Older I used

String[] inputCode = application.getMusicData() != null ? new String[]{
                FileUtils.getFFmpeg(this), "-r",
                String.valueOf(BitmapDescriptorFactory.HUE_ORANGE / application.getSecond()),
                "-f", "concat", "-safe", "0", "-i", r0.getAbsolutePath(), "-i",
                audioFile.getAbsolutePath(), "-strict", "experimental", "-r", "30",
                "-t", String.valueOf(toatalSecond), "-c:v", "libx264", "-preset",
                "ultrafast", "-pix_fmt", "yuv420p", "-ac", "2", videoPath}

        : new String[]{FileUtils.getFFmpeg(this),
                "-r", String.valueOf(BitmapDescriptorFactory.HUE_ORANGE / application.getSecond()),
                "-f", "concat", "-i", r0.getAbsolutePath(), "-r", "30", "-c:v", "libx264", 
                "-preset", "ultrafast", "-pix_fmt", "yuv420p", videoPath};

Here Details of params I used application.getMusicData() - " it returns string value of Audio" r0.getAbsolutePath() - " text file contains List of images " totalSecond - "set for video duration" videoPath - "Output video mp4 file name along with path"

Screenshots If applicable, add screenshots to help explain your problem.

Please explain how this going to use in command for "mobile-ffmpeg"

Ravipatel401 commented 3 years ago

@tanersener Did you checked?

tanersener commented 3 years ago

No, I haven't. ffmpeg has tons of features and I'm not expert in all of them. Also, I don't have time to respond to ffmpeg questions.

For ffmpeg questions, I suggest asking them ffmpeg user list. I create #130 for this.

Ravipatel401 commented 3 years ago

Thank you @tanersener