Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid FFMPEG: Could not execute the ffmpeg from Java code
    primarykey
    data
    text
    <p>I am working on an Android app where I want to create a video from a list of static images. After doing some search on internet, it made me realized that using "FFMPEG" is the way to go in getting this thing done. So I got hold of this site: <a href="https://github.com/guardianproject/android-ffmpeg-java" rel="nofollow">https://github.com/guardianproject/android-ffmpeg-java</a> from where I downloaded the C library and the Java wrapper. I was able to compile the C library - of course not the way the instruction was laid out - but still I was able to get "ffmpeg" executable under /external/android-ffmpeg/ffmpeg directory. I copied that executable in my current directory and then copied it to a directory under Android where my app can access it. Then I called the provided Java wrapper but I am seeing some errors in the log file like follows:</p> <pre><code>08-13 11:55:37.848: D/FFMPEG(29598): /data/data/com.sample/app_bin/ffmpeg -y -loop 1 -i /storage/emulated/0/usersnapshot/ffmpeg/image%03d.jpg -r 25 -t 2 -qscale 5 /storage/emulated/0/video/snapshot-video.mp4 08-13 11:55:37.898: I/ShellCallback : shellOut()(29598): /data/data/com.sample/app_bin/ffmpeg[1]: syntax error: '(' unexpected 08-13 11:55:37.938: I/ShellCallback : processComplete()(29598): 1 </code></pre> <p>And following is the code snippet (where targetDirectoryForFFMPEG = directory where the images are stored):</p> <pre><code>FfmpegController ffmpegController = new FfmpegController(this, targetDirectoryForFFMPEG); String out = videoOutPutFile.getPath(); MediaDesc mediaIn = new MediaDesc(); mediaIn.path = targetDirectoryForFFMPEG+"/image%03d.jpg"; mediaIn.videoFps = "25"; ffmpegController.convertImageToMP4(mediaIn, 2, out,new ShellCallback() { @Override public void shellOut(String shellLine) { Log.i("ShellCallback : shellOut()", shellLine); } @Override public void processComplete(int exitValue) { Log.i("ShellCallback : processComplete()", exitValue+""); } }); </code></pre> <p>Has anybody implemented this before? If yes, can you point me to what am I doing incorrect? I will provide more information if needed.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload