video - Android ffmpeg Output Error -
i using
https://github.com/writingminds/ffmpeg-android-java
to run ffmpeg commands on android. trying overlay image on video. reason, following error when execute command.
ffmpeg -i input.mp4 strict -2 -i overlay.jpg -filter_complex [0:v][1:v] overlay=25:25:enable='between(t,0,4)' output.mp4 output file #0 not contain stream
could me out? in advance!
i facing same issue , problem was: calling execute method wrong way. string array passing this:
final string[] cmd = new string[] { "-i input.mp4 strict -2 -i overlay.jpg -filter_complex [0:v][1:v] overlay=25:25:enable='between(t,0,4)' output.mp4" };
the correct way create array, though, split command in separate strings:
final string[] cmd = new string[]{ "-i", "input.mp4", "strict", "-2", "-i", "overlay.jpg", "-filter_complex", "[0:v][1:v]", "overlay=25:25:enable='between(t,0,4)'", "output.mp4"};
and call execute:
try { final ffmpeg ffmpeg = ffmpeg.getinstance(context); ffmpeg.execute(cmd, new ffmpegexecuteresponsehandler() { @override public void onsuccess(string message) { } @override public void onprogress(string message) { } @override public void onfailure(string message) { } @override public void onstart() { } @override public void onfinish() { } }); } catch (ffmpegcommandalreadyrunningexception e) { }
i found solution on lauffenp's comment on issue: https://github.com/writingminds/ffmpeg-android-java/issues/88
Comments
Post a Comment