ffmpeg-android-java
ffmpeg-android-java copied to clipboard
ffmpeg starts, but no progress
Hi, Until now i've used your library in a foreground service and anything worked well; now i've add a button on my activity to call ffmpeg, but THE SAME COMMANDS don't work!
The output is void, simply all is blocked after "D/FFmpeg: Running publishing updates method".
command is:
-y -v debug -i /data/data/com.myapp/app_Voice/PTT-20160225-WA0018.m4a /data/data/myapp/app_Voice/PTT-20160225-WA0018.wav
input file exists. the same command with the same file works if called from the service. What i'm missing?
I'm experiencing the same issue occasionally.
i've discovered that when this appears, the output file is correctly created, but for some reasons the java interface is not updated...so in my final wait() i periodically check for the file, and if it is ready I simply stop to wait for him to finish and continue my job normally. Hope this could help someone.
@gabrielecastellano could you show the code snippet ?
I am having the same issue. My code is
// Progress update thread
new Thread() {
ProgressCalculator pc = new ProgressCalculator(vkLogPath);
public void run() {
Log.i(LOG_TAG, "Progress update started");
int progress = -1;
try {
while (true) {
sleep(300);
progress = pc.calcProgress();
Log.i(LOG_TAG, "progress = " + progress);
if (progress != 0 && progress < 100) {
} else if (progress == 100) {
Log.i(LOG_TAG, "==== progress is 100, exiting Progress update thread");
break;
}
}
} catch(Exception e) {
Log.e(LOG_TAG,e.getMessage());
}
}
}.start();
Every single time the progress is printed out, I'm getting a 0 value unless the command completes, then I get 100. Seems like the ProgressCalculator isn't working properly.
Maybe you need it: https://github.com/WritingMinds/ffmpeg-android-java/issues/100#issuecomment-307688886