Skip to content
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

long recording and encoding delay #6

Closed
tingfengainiaini opened this issue Oct 20, 2016 · 2 comments
Closed

long recording and encoding delay #6

tingfengainiaini opened this issue Oct 20, 2016 · 2 comments

Comments

@tingfengainiaini
Copy link

tingfengainiaini commented Oct 20, 2016

I found that the recording is so long delayed by encoding into video.
The mRecordedFrameQueue is behind the preview so much. So, I should wait a long time after I press the stop button which invoke the stopRecording().
Is there any solution to solve this ?

@tingfengainiaini
Copy link
Author

Solved!

mFrameRecorder.setVideoOption("tune", "zerolatency");
mFrameRecorder.setVideoOption("preset", "superfast");
mFrameRecorder.setVideoOption("crf", Integer.toString(param.getVideoFrameRate()));

@CrazyOrr
Copy link
Owner

Well, it's a tradeoff between video quality and speed.
I have implemented a simple "drop-frame-if-could-not-keep-up" strategy in this, but it is far from good. Ideally, we need an algorithm to adjust dynamically towards the balance point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants