Android libstreaming错误

Android libstreaming错误,android,android-mediarecorder,android-mediacodec,Android,Android Mediarecorder,Android Mediacodec,我正在使用libstreaming并收到此错误“在手机上找不到分辨率为320x240的可用编码器” 我使用的是安卓4.2.1 xolo设备 mSession = SessionBuilder.getInstance() .setContext(ctx) .setAudioEncoder(SessionBuilder.AUDIO_AMRNB) .setAudioQuality(new AudioQual

我正在使用libstreaming并收到此错误
“在手机上找不到分辨率为320x240的可用编码器”

我使用的是安卓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);
我在示例3中使用相同的值

请帮帮我

谢谢

下面是我的日志:

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

看起来,使用您提供的设置,在您的设备上无法进行流式处理。您应该尝试分辨率、帧速率、比特率等的不同组合。

尝试从同一源运行示例2。查看logcat并查看所有supportet分辨率

VideoQuality VideoQuality=新的VideoQuality(352288,15500000)


请试试这个。我认为分辨率应该是352x288,并且要注意视频质量方法的参数。Goodluck

你能发布完整的堆栈跟踪吗?@Nickolai Astashonok我拥有logI-see,示例3使用的值与你的不同。可以不做任何修改就尝试示例3吗?mSession=SessionBuilder.getInstance().setContext(getApplicationContext()).setAudioEncoder(SessionBuilder.AUDIO_AAC).setAudioQuality(新的AudioQuality(800016000)).setVideoEncoder(SessionBuilder.VIDEO_H264).setSurfaceView(mSurfaceView).setPreviewOrientation(0).setCallback(this).build();这是一个例子。您的代码不匹配我尝试了示例3,首先得到了相同的错误,然后我尝试了不同的组合,但没有luckcan您可以调试libstreaming吗?在EncoderDebugger.java中将VERBOSE设置为true,或者使用调试器进入debug()内部?@user2988855这个问题解决了吗?我也犯了同样的错误
    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();