You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Earlier this example also had mem issues, but author made some fixes: CrazyOrr/FFmpegRecorder#15 (comment) (and I don't notice any quality suffering when recording hd size)
so it doesn't have problems with high java memory usage, I can record in hd or even in full hd quality without problems
though it does quite use many cpu (~25-50%) and doesn't matter which quality I set (crf, image resolution, framerate)
RecordActivity.java sample seems doesn't load cpu at all, but eats many java memory and won't be able to record with size like hd
The text was updated successfully, but these errors were encountered:
It's possible to optimize the sample to require less memory. As usual, contributions are welcome! Let me know if you'd like to try, but are encountering any issues. Thanks
I tried original CrazyOrr/FFmpegRecorder project again and it actually seems doesn't use much cpu as I thought (10-30). It's in my project cpu usage is much bigger (35-60), I have to recheck my project. For memory usage issues I guess we can use CrazyOrr/FFmpegRecorder solution, I think it works ok
I just had cameraParams.setRecordingHint(true); in my project, it's of course good for recording (more smooth, better fps), but would eat our devices cpu
https://github.com/bytedeco/javacv/blob/master/samples/RecordActivity.java
I'm not sure about this part of code (as practical solution):
Example sets small image size:
yeah, it would work ok.
when I set 640x480, java memory allocating is pretty big:
on my phone max java heap == ~200
when I set hd (1280x720) it would fail to record almost at start:
so it just allocates too much java memory (it won't be able to record in hd quality or full hd)
In my projects I use this example of javacv ffmpeg recording for Android https://github.com/CrazyOrr/FFmpegRecorder (java ffmpegrecorder class: https://github.com/CrazyOrr/FFmpegRecorder/blob/master/app/src/main/java/com/github/crazyorr/ffmpegrecorder/FFmpegRecordActivity.java)
Earlier this example also had mem issues, but author made some fixes: CrazyOrr/FFmpegRecorder#15 (comment) (and I don't notice any quality suffering when recording hd size)
so it doesn't have problems with high java memory usage, I can record in hd or even in full hd quality without problems
though it does quite use many cpu (~25-50%) and doesn't matter which quality I set (crf, image resolution, framerate)
RecordActivity.java sample seems doesn't load cpu at all, but eats many java memory and won't be able to record with size like hd
The text was updated successfully, but these errors were encountered: