Comments (2)
Duplicate of bytedeco/javacv#991
Until this is fixed somehow, you could use synchronized blocks.
from sample-projects.
First of all this demo code is not thread safe so you shouldn't invoke start/stop from multiple threads.
Instead you should use some synchronized wrapper. For example:
@Override
public void run() {
try {
chunker.start();
while (!isStoping()) {
if (!chunker.next()) {
throw new RuntimeException("Chunker returned NULL.");
}
}
} catch (Exception e) {
throw new RuntimeException("Stopped on error.", e);
} finally {
try {
chunker.stop();
} catch (Exception e) {
throw new RuntimeException("Can't stop chunker.", e);
}
}
}
I see only one way to produce a corrupted chunk when there are no enough frames but you will not be notified (fFmpegChunker.setChunkHandler) about this chunk because it's a temp unfinished file.
Are you sure that the corrupted file is not the last temp file? Does Chunker notified you about it's finished chunk?
Or it could be a bug that was written about.
from sample-projects.
Related Issues (20)
- file name too long HOT 2
- why the caffe .jar not support windows? HOT 1
- stitcher doesn't remove the black area HOT 3
- taking 20 sec to load javacv in OpenCvRecognizeActivity HOT 2
- FFmpegFrameRecorder not working with Wowza.GoCoder HOT 4
- Unable to interact with shared objects (.so files) HOT 5
- error: ‘MultiplyDemo’ has not been declared HOT 2
- Issue during building javacpp-mvn-simple-demo HOT 2
- build error on AndroidStudio 4.1 HOT 5
- java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList HOT 1
- Is it possible to generate binding for already compiled shared library for Android? HOT 3
- java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.imgcodecs.Imgcodecs.imread_1(java.lang.String) HOT 2
- The application could not be installed: INSTALL_FAILED_INVALID_APK HOT 2
- how to add quarkus to this project? HOT 3
- From where recorder is getting the images or Frames to be recorded i found no link with preview to the recorder. HOT 7
- Support GraalVM 22.0 HOT 16
- FFmpegFrameRecorder doesn't generate video file in android versions 10 or higher HOT 7
- How to generate java class with function adapters by maven? HOT 2
- Confusing example HOT 1
- javacpp-mvn-simple-demo compile error with javacpp 1.5.9 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sample-projects.