[英]Android libstreaming error
I am using libstreaming and getting this error "No usable encoder were found on the phone for resolution 320x240"
我正在使用libstreaming并收到此错误"No usable encoder were found on the phone for resolution 320x240"
I am using android 4.2.1 xolo device 我正在使用android 4.2.1 xolo设备
mSession = SessionBuilder.getInstance()
.setContext(ctx)
.setAudioEncoder(SessionBuilder.AUDIO_AMRNB)
.setAudioQuality(new AudioQuality(8000,16000))
.setVideoEncoder(SessionBuilder.VIDEO_H264)
.setVideoQuality(new VideoQuality(320, 240, 15, 500*1024))
.setCamera(camID)
.setSurfaceView(mSurfaceView)
.setPreviewOrientation(0)
.setCallback(this)
.build();
// Configures the RTSP client
mClient = new RtspClient();
mClient.setSession(mSession);
mClient.setCallback(this);
mSurfaceView.getHolder().addCallback(this);
I am using the same values in example3. 我在example3中使用相同的值。
Please help me?? 请帮我??
Thanks 谢谢
Below is my log : 以下是我的日志:
06-23 23:37:29.737: E/EncoderDebugger(1469): No usable encoder were found on the phone for resolution 176x144
06-23 23:37:29.737: E/H264Stream(1469): Resolution not supported with the MediaCodec API, we fallback on the old streamign method.
06-23 23:37:29.738: I/System.out(1469): [CDS]connect[/192.168.1.26:70] tm:90
06-23 23:37:29.740: D/Posix(1469): [Posix_connect Debug]Process com.example.upstream :70
06-23 23:37:29.764: D/MP4Config(1469): SPS: Z2QAH6wbGsLE5A==
06-23 23:37:29.764: D/MP4Config(1469): PPS: aOpDyw==
06-23 23:37:29.765: I/RtspClient(1469): ANNOUNCE rtsp://192.168.1.26:70/co/30/User/10 RTSP/1.0
06-23 23:37:29.765: I/RtspClient(1469): CSeq: 1
06-23 23:37:29.765: I/RtspClient(1469): Content-Length: 208
06-23 23:37:29.765: I/RtspClient(1469): Content-Type: application/sdp
06-23 23:37:29.765: I/RtspClient(1469): Video-payload: a=rtpmap:97 H264/90000|a=fmtp:97 packetization-mode=1;profile-level-id=42001e;sprop-parameter-sets=Z2QAH6wbGsLE5A==,aOpDyw==;
06-23 23:37:29.765: I/RtspClient(1469): Audio-payload: a=rtpmap:99 AMR/8000/1|a=fmtp:99 octet-align=1;
06-23 23:37:29.765: I/RtspClient(1469):
06-23 23:37:29.804: D/RtspClient(1469): Response from server: 200
06-23 23:37:29.804: V/RtspClient(1469): Sss: 45618
06-23 23:37:29.804: V/RtspClient(1469): RTSP server name unknown
06-23 23:37:29.808: D/ACodec(1469): Now uninitialized
06-23 23:37:29.813: I/OMXClient(1469): Using client-side OMX mux.
06-23 23:37:29.816: D/ACodec(1469): [OMX.MTK.VIDEO.ENCODER.AVC] Now Loaded
06-23 23:37:29.819: W/ACodec(1469): Use baseline profile instead of 8 for AVC recording
VideoQuality videoQuality = new VideoQuality(352,288,15,500000); VideoQuality videoQuality =新的VideoQuality(352,288,15,500000);
mSession = SessionBuilder.getInstance()
.setContext(getApplicationContext())
.setAudioEncoder(SessionBuilder.AUDIO_AAC)
.setAudioQuality(new AudioQuality(8000,16000))
.setVideoEncoder(SessionBuilder.VIDEO_H264)
.setVideoQuality(videoQuality)
.setSurfaceView(mSurfaceView)
.setPreviewOrientation(0)
.setCallback(this)
.build();
Please try this one. 请试试这个。 I think that resolution should be 352x288 and be careful about parameters of VideoQuality method. 我认为分辨率应为352x288,并注意VideoQuality方法的参数。 Goodluck 祝好运
It looks like, that streaming is not possible on your device with the settings you have provided. 您提供的设置似乎无法在您的设备上进行流式传输。 You should try different combination of resolution, frame rate, bitrate, etc.. 您应该尝试不同的分辨率,帧速率,比特率等组合。
Try and run example 2 from the same source. 尝试从同一来源运行示例2。 Look through logcat and see all supportet resolutions 浏览logcat并查看所有supportet解决方案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.