-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With Limiting the memory,unknown error made the jvm crash. #2308
Labels
Comments
How are you running that? |
I forgot to add running code.add main function. public static void main(String[] args) {
// mock generate video
String path = "xxxxxx";
String saveDir = path.concat("/data");
long duration = 3 * 60 * 60 * 1000; // run long time
long startTime = System.currentTimeMillis();
while (System.currentTimeMillis() - startTime < duration) { // handle large number of files, and covert them to video
try {
File file = new File(saveDir + System.currentTimeMillis());
if (!file.exists()) {
System.out.println(file.getCanonicalPath());
if (!file.mkdir()) {
System.out.println("Create failed:" + file.getName());
continue;
}
}
RecordingBean bean = new RecordingBean();
bean.setBinaryFile(new File(path.concat("/a.h264")));
FrameDataWriter writer = new FrameDataWriter(file.getCanonicalPath(), bean);
THREAD_POOL.execute(writer);
TimeUnit.MILLISECONDS.sleep(10 * 1000);
} catch (Exception e) {
System.out.println(e);
}
}
} |
Does it do the same thing if you use other codecs? |
other codecs?Can you give a example? |
Also since you're using H.264, please make sure you're using libx264, not OpenH264. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment Info
Jvm Conf
Crash Info
Running Code
The text was updated successfully, but these errors were encountered: