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

Works quite bad for 1080p #47

Closed
anonym24 opened this issue Jul 15, 2018 · 2 comments
Closed

Works quite bad for 1080p #47

anonym24 opened this issue Jul 15, 2018 · 2 comments

Comments

@anonym24
Copy link

anonym24 commented Jul 15, 2018

Though default MediaRecorder works fine with 1080p video resolution

Can this project optimized for higher resolutions as well?

Now I clearly can see lugs

@CrazyOrr
Copy link
Owner

The resolution can go as high as the device's camera can provide for preview. As the resolution goes up the bitrate must keep up to maintain a reasonable video quality. So the time it needs to record a frame goes up too.
Since this project use H.264 TO encode video:

// Use H.264
mFrameRecorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);

You can adjust some options to suit your need:

mFrameRecorder.setVideoOption("crf", "23");
mFrameRecorder.setVideoOption("preset", "superfast");
mFrameRecorder.setVideoOption("tune", "zerolatency");

For explainations of these options and instructions of H.264, refer to this.

@anonym24
Copy link
Author

we just need hardware acceleration support (for android it's MediaCodec)
this issue was recently discussed here bytedeco/javacv#945 (comment)
FFmpeg supports media codec for decoding but unfortunately it doesn't support encoding

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