video - Android FFMPEG: Could not execute the ffmpeg from Java code -


i working on android app want create video list of static images. after doing search on internet, made me realized using "ffmpeg" way go in getting thing done. got hold of site: https://github.com/guardianproject/android-ffmpeg-java downloaded c library , java wrapper. able compile c library - of course not way instruction laid out - still able "ffmpeg" executable under /external/android-ffmpeg/ffmpeg directory. copied executable in current directory , copied directory under android app can access it. called provided java wrapper seeing errors in log file follows:

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 

and following code snippet (where targetdirectoryforffmpeg = directory images stored):

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+"");             }         }); 

has implemented before? if yes, can point me doing incorrect? provide more information if needed.

do have root on device?

mount '/data' , enter same 'ffmpeg' command in shell , see whether error same.

try using shell test out different command expressions.

try 'ffmpeg' alone , 1 input file. see whether commands produce expected output.

my wild guess there issue calling 'ffmpeg.main()' relates details of build.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -