I am developing an app to stream live video from an android device via RTSP using the libstreaming library.
I am trying to change the video quality by using the following code:
private void initRtspClient() {
mSession = SessionBuilder.getInstance()
.setContext(getApplicationContext())
.setAudioEncoder(SessionBuilder.AUDIO_NONE)
.setVideoEncoder(SessionBuilder.VIDEO_H264)
.setVideoQuality(new VideoQuality(480, 360, 30, 500))
.setSurfaceView(mSurfaceView).setPreviewOrientation(0)
.setCallback(this).build();
but when the app is running on the device I am getting the following error in the logs:
12-16 12:03:32.601 4596-4609/com.example.GlassApp E/EncoderDebugger﹕ No usable encoder were found on the phone for resolution 480x360
12-16 12:03:32.601 4596-4609/com.example.GlassApp E/H264Stream﹕ Resolution not supported with the MediaCodec API, we fallback on the old streamign method.
But this is the resolution stated in the Suppored Media Format
doc (enoding in h.264) http://developer.android.com/guide/appendix/media-formats.html
What is the problem?
EDIT: Should probably add the android platform is Google Glass (XE22)
I only seemed to be able to change the resolution to the following two values:
or
The code did not seem to work if the framerate was raised over
20
fps either.