Closed mmmatjaz closed 2 years ago
It seems I found the problem. I was trying to compress the file immediately after calling VideoCapture.stopRecording(), but the latter one is obviously non-blocking and needs some time to let go of the file. Therefore metadata reading failed. I'm now launching compression with a delay and it seems to work fine.
When I try to compress another video onFailure gets called with error message: Failed to extract video meta-data, please try again
my usecase: ` VideoCompressor.start( null, // => This is required if srcUri is provided. If not, pass null. null, // => Source can be provided as content uri, it requires context. videoFile.getPath(), videoFileCompressed.getPath(), new CompressionListener() { @Override public void onStart() { // Compression start }
`