简体   繁体   English

Android libstreaming错误

[英]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.

相关问题 带有MedicaCodec APi缓冲区大小的android libstreaming不够大错误 - android libstreaming with MedicaCodec APi buffer size not big enough error Android,将Mediacodec与libstreaming一起使用 - Android, use Mediacodec with libstreaming 如何在Android Studio中导入libstreaming? - How to import libstreaming in Android Studio? 使用wowza + libstreaming的Android实时流 - Android live streaming using wowza + libstreaming 使用libstreaming在rtsp中发送多播音频,以便从android设备上传 - send a multicast audio in rtsp using libstreaming for upstreaming from an android device mediarecoder启动失败-19使用带有Sony Z系列的libstreaming android - mediarecoder start failed -19 using libstreaming android with sony z series 使用libstreaming将视频从Android设备流式传输到PC - Streaming video from Android device to PC using libstreaming Android(libstreaming)RTSP服务器可以播放视频但没有声音 - Android (libstreaming) RTSP server can play video but no sound 在带有libstreaming的Nexus 5上进行USB调试时得到ERROR_CAMERA_ALREADY_IN_USE - get ERROR_CAMERA_ALREADY_IN_USE when usb debugging on my Nexus 5 with libstreaming 使用mediaprojection作为libstreaming的视频源 - Use mediaprojection as a videosource for libstreaming
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM