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

h264 is too slow #54

Closed
IgeNiaI opened this issue Nov 18, 2014 · 4 comments
Closed

h264 is too slow #54

IgeNiaI opened this issue Nov 18, 2014 · 4 comments
Labels

Comments

@IgeNiaI
Copy link

IgeNiaI commented Nov 18, 2014

I am streaming video from camera to RTMP server, encoding with h264, but it is too slow. On my galaxy S2 there are only 10 frames per second with resolution 640x480.
I discovered that the slowest method is avcodec_encode_video2().
Also, I tryied to encode with FLV1. It is a lot faster, but quality is too bad.
I know that this is ffmpeg issue, but is there a way to make it faster or another encoding with proper quality?

@IgeNiaI
Copy link
Author

IgeNiaI commented Nov 19, 2014

Maybe there is a way to encode video using GPU instead of CPU?

@saudet
Copy link
Member

saudet commented Nov 19, 2014

I don't think FFmpeg supports hardware acceleration on Android, but you could try the "ultrafast" preset of x264 by calling recorder.setVideoOption("preset", "ultrafast") before calling recorder.start().

@saudet saudet closed this as completed Nov 19, 2014
@IgeNiaI
Copy link
Author

IgeNiaI commented Nov 19, 2014

It helped, thanks.

@dpyinjie
Copy link

thanks,It also works to me !!

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

No branches or pull requests

3 participants