我正在使用libstreaming并得到这个错误的"No usable encoder were found on the phone for resolution 320x240"
我使用的是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);我在example3中使用相同的值。
请帮帮我??
谢谢
下面是我的日志:
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发布于 2014-09-30 19:54:31
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();请试一下这个。我认为分辨率应该是352x288,并且要注意VideoQuality方法的参数。祝你好运
发布于 2014-06-26 18:27:38
看起来,使用您提供的设置无法在您的设备上执行流式处理。你应该尝试不同的分辨率,帧率,比特率等组合。
发布于 2014-08-19 21:49:00
尝试从相同的来源运行示例2。查看logcat并查看所有受支持的解决方案
https://stackoverflow.com/questions/24428011
复制相似问题