fyhertz / libstreaming

A solution for streaming H.264, H.263, AMR, AAC using RTP on Android
Apache License 2.0
3.48k stars 1.07k forks source link

"No buffer available" message appears in Logcat whenever streaming starts #197

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi,

I am currently sending a video stream to my wowza media server using the libstreaming library. I have setup my session as follows in the onCreate method of my Activity

            // Configures the SessionBuilder
      mSession = SessionBuilder
            .getInstance()
            .setContext(getApplicationContext())
            .setAudioEncoder(SessionBuilder.AUDIO_AAC)
            .setAudioQuality(new AudioQuality(8000, 16000))
            .setVideoEncoder(SessionBuilder.VIDEO_H264)
            .setVideoQuality(new VideoQuality(intResolX, intResolY, fps, bitRate)
            .setCamera(CameraInfo.CAMERA_FACING_BACK)
            .setSurfaceView(mSurfaceView).setPreviewOrientation(0)
            .setCallback(this).build();

    // Configures the RTSP client
    mClient = new RtspClient();
    mClient.setSession(mSession);
    mClient.setCallback(this);
    mClient.setTransportMode(RtspClient.TRANSPORT_TCP);
    mSurfaceView.setAspectRatioMode(SurfaceView.ASPECT_RATIO_PREVIEW);

I have used a resolution of 640x480 with fps of 20 and bitrate of 2000000

However when the video streaming starts and the camera is seen then I start getting "No buffer available" logs in the buffer continously.

These logs are also seen when I switch from 3G/4G to WiFi and viceversa. Due to this my video stream gets hanged after say 2-3 mins of streaming. I have verified the same using the Test Player on Wowza.

Can someone help me resolve this issue?

msaelices commented 8 years ago

I have the same issue.

shelarsuhas commented 8 years ago

Has anyone been able to solve this ?

artsector commented 8 years ago

same problem

kazimad commented 8 years ago

+1