android - FFmpeg exit value = 4 -
i try run ffmpeg command on android devices. on of them code below works excellent , video created. on some(e.g. motorola xoom) exit value 4. , while debugging on samsung galaxy s 2.3.3 frozes on process.waitfor(); me please? can't understand wrong.
public void execffmpeg(){ try { file resultfile = new file(mcontext.getfilesdir() + "/ffmpeg"); string[] command = null; command = new string[] { resultfile.getabsolutepath(), "-shortest", "-i", audiopath, "-loop", "1", "-i", imagepath, "-acodec", "ac3", "-ab", "128k", "-vcodec", "mpeg4", videofilename }; if(command != null){ process process = runtime.getruntime().exec(command); process.waitfor(); dumpstream(process.getinputstream()); dumpstream(process.geterrorstream()); mlogger.error("" + process.exitvalue()); if(process.exitvalue() == 0){ } } } } catch (ioexception e) { e.printstacktrace(); } catch (interruptedexception e) { e.printstacktrace(); } }
Comments
Post a Comment