madhavanmalolan / ffmpegandroidlibrary

One line integration for FFMPEG Library in Android
MIT License
90 stars 15 forks source link

Activity automatically destroy when trying to merge audio and video #18

Open pateljc opened 6 years ago

pateljc commented 6 years ago

public void mergeAudioVideo(String audioFile, String videoFile, String mergedFile) { Controller.getInstance().run(new String[]{ "-i", videoFile, "-i", audioFile, "-c", "copy", "-map", "0:0", "-map", "1:0", mergedFile }); } here is the code i m using for audio video merger

madhavanmalolan commented 6 years ago

Are you sure this is the right command? https://superuser.com/questions/590201/add-audio-to-video-using-ffmpeg#590210

If yes, can you please provide the logs that come up before the crash? Can you mention the file paths used? Do you have permission to write to external storage?

mohamedmorsi95 commented 6 years ago

i have the smae problem bur with audio bitrate my Controller.getInstance().run(new String[]{ "-i", songPath, "-b:a 8k", getOutputPath(songPath)}); i have checked what you have said @madhavanmalolan but it still occurs and there is no error just the activity destroy the only suspect lines in the log 07-06 02:33:19.136 19897-19897/com.mohamedmorsi.audiocompressor I/Videokit: start run in main. 07-06 02:33:19.136 19897-19897/com.mohamedmorsi.audiocompressor I/Videokit: register_exit 07-06 02:33:19.137 19897-19897/com.mohamedmorsi.audiocompressor I/Videokit: term_init & parse options. if any one could help