pili-engineering / PLDroidMediaStreaming

PLDroidMediaStreaming 是七牛推出的一款适用于 Android 平台的推流 SDK,支持 RTMP 推流,h.264 和 AAC 编码,硬编、软编支持。具有丰富的数据和状态回调,方便用户根据自己的业务定制化开发。具有直播场景下的重要功能,如:美颜、背景音乐、水印等功能。PLDroidMediaStreaming 是现在目前重点维护的版本,自带采集模块也支持用户自己做采集端。
https://github.com/pili-engineering/PLDroidMediaStreaming/wiki
Apache License 2.0
1.45k stars 460 forks source link

Not able to Stream Video on 1.7.0 #150

Open gouravd opened 8 years ago

gouravd commented 8 years ago

Just upgraded to 1.7.0 and not able to stream video. Audio streaming is working fine. I am wondering if this is the problem. (Note: I have so files for arm64-v8a, armeabi-v7a, x86)

E/PLSONameHelper: Load error:dlopen failed: /data/app/in.funah.android.staging-4/lib/arm/libpldroid_streaming_h264_encoder.so: has text relocations E/PLSONameHelper: SW H264 Codec is not available

Here is the log: I/CameraStreamingManager: SDK version:1.7.0, Android SDK_INT:23, SoC Hardware:qcom I/AudioEncoderConfig: sample:44100, bitrate:49152 I/EncodingConfig: setStreamingProfile profile:com.pili.pldroid.streaming.StreamingProfile@55efb8a,stream:com.pili.pldroid.streaming.StreamingProfile$Stream@d155fb,mEncodingSizeRatio:RATIO_4_3 I/EncodingConfig: isEncodingLandscape:false I/EncodingConfig: setStreamingProfile mFormat=RTMP I/ProcessingManager: mIsNeedPreviewFrame:true I/StreamingBaseActivity: tid:1 I/CameraStreamingManager: resume I/StreamingEnv: resume I/CameraManager: launchCameraStartUpThread mCameraStartUpThread:null I/CameraManager: launchCameraStartUpThread - I/CameraManager: openCameraInternal id:0,tid:16317 I/StreamingBaseActivity: view!!!!:android.widget.RelativeLayout{6fb0bbc V.E...... ......ID 0,0-720,1136 #7f0f0078 app:id/content} I/StreamingBaseActivity: view!!!!:android.widget.RelativeLayout{6fb0bbc V.E...... ......ID 0,0-720,1136 #7f0f0078 app:id/content} I/CameraDeviceManager: camera opened:android.hardware.Camera@5df7745,(0) I/CameraDeviceManager: msg.what:6 I/CompatibleManager: Build.MODEL:XT1068 I/CameraDeviceManager: msg.what:15 I/CameraUtils: entry: 15000 - 15000 I/CameraUtils: entry: 15000 - 30000 I/CameraUtils: entry: 30000 - 30000 D/CameraUtils: entry: 15000 - 15000 D/CameraUtils: entry: 15000 - 30000 D/CameraUtils: entry: 30000 - 30000 I/CameraUtils: choose entry: 30000 - 30000 I/CameraManager: hint:false D/CameraManager: TOTAL SUPPORTED FORMATS: 2 D/CameraManager: SUPPORTED FORMAT: 17 I/CameraManager: level:LARGE,ratio:RATIO_4_3 I/CameraUtils: size.width:1280,size.height:960 I/CameraUtils: size.width:1280,size.height:720 I/CameraUtils: size.width:960,size.height:720 I/CameraUtils: size.width:864,size.height:480 I/CameraUtils: size.width:768,size.height:432 I/CameraUtils: size.width:720,size.height:480 I/CameraUtils: size.width:640,size.height:480 I/CameraUtils: size.width:320,size.height:240 I/CameraUtils: size.width:176,size.height:144 I/CameraUtils: size.width:1280,size.height:960 I/CameraUtils: size.width:1280,size.height:720 I/CameraUtils: size.width:960,size.height:720 I/CameraUtils: size.width:864,size.height:480 I/CameraUtils: size.width:768,size.height:432 I/CameraUtils: size.width:720,size.height:480 I/CameraUtils: size.width:640,size.height:480 I/CameraUtils: size.width:320,size.height:240 I/CameraUtils: size.width:176,size.height:144 I/CameraUtils: after filter size.w:320, size.h:240 I/CameraUtils: after filter size.w:640, size.h:480 I/CameraUtils: after filter size.w:960, size.h:720 I/CameraUtils: after filter size.w:1280, size.h:960 I/CameraUtils: preview size width:1280,height:960 I/EncodingConfig: isEncodingLandscape:false I/CameraManager: setCameraPreviewSize size.width:1280,size.height:960 I/CameraSurfaceRenderer: setCameraPreviewSize width:1280,height:960 I/CameraDeviceManager: msg.what:5 I/CameraDeviceManager: msg.what:6 I/CameraManager: openCameraInternal onResume I/CameraSurfaceRenderer: onSurfaceCreated E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb86e0820 D/OpenGLRenderer: endAllActiveAnimators on 0xb871f1c0 (RippleDrawable) with handle 0xb85be4c0 D/GlUtil: Created program 3 (TEXTURE_EXT) D/CameraManager: CameraHandler [Handler (com.pili.pldroid.streaming.cam.c$b) {d2d1cf0}]: what=0 I/StreamingBaseActivity: onSurfaceCreated I/CameraManager: handleSetSurfaceTexture I/CameraDeviceManager: msg.what:6 I/FilterHWProcessor: Release FB texture buffer. I/FilterHWProcessor: Release WM texture buffer. I/CameraDeviceManager: msg.what:2 I/CameraDeviceManager: msg.what:3 I/CameraDeviceManager: startPreview I/CameraSurfaceRenderer: onSurfaceChanged 720x1136 E/libEGL: called unimplemented OpenGL ES API I/StreamingBaseActivity: onSurfaceChanged width:720,height:1136 I/FilterHWProcessor: updateSurfaceSize w:720,h:1136,sw:0,sh:0 D/CameraManager: CameraHandler [Handler (com.pili.pldroid.streaming.cam.c$b) {d2d1cf0}]: what=1 D/CameraManager: handle setting camera orientation, mCameraInfo.facing:0,degrees:0,orientation:90 I/CameraSurfaceRenderer: setCameraPreviewSize equal!!1280 960 I/StreamingBaseActivity: view!!!!:android.widget.RelativeLayout{6fb0bbc V.E...... ......ID 0,0-720,1136 #7f0f0078 app:id/content} I/FocusIndicatorLayout: clear I/CameraSurfaceRenderer: onSurfaceChanged 720x960 I/StreamingBaseActivity: onSurfaceChanged width:720,height:960 I/FilterHWProcessor: updateSurfaceSize w:720,h:960,sw:720,sh:1136 I/StreamingBaseActivity: view!!!!:android.widget.RelativeLayout{6fb0bbc V.E...... ......ID 0,0-720,1136 #7f0f0078 app:id/content} I/CameraDeviceManager: msg.what:10 I/CameraDeviceManager: arg1:90 D/CameraManager: CameraHandler [Handler (com.pili.pldroid.streaming.cam.c$b) {d2d1cf0}]: what=1 D/CameraManager: handle setting camera orientation, mCameraInfo.facing:0,degrees:0,orientation:90 I/CameraDeviceManager: msg.what:10 I/CameraDeviceManager: arg1:90 D/CameraManager: CameraHandler [Handler (com.pili.pldroid.streaming.cam.c$b) {d2d1cf0}]: what=2 I/CameraManager: handleCameraPreviewReady I/CameraDeviceManager: msg.what:6 I/CameraManager: isSupportedTorch getParameters I/CameraDeviceManager: msg.what:6 I/StreamingBaseActivity: isSupportedTorch=true I/StreamingBaseActivity: view!!!!:android.widget.RelativeLayout{6fb0bbc V.E...... ......ID 0,0-720,1136 #7f0f0078 app:id/content} I/StreamingBaseActivity: view!!!!:android.widget.RelativeLayout{6fb0bbc V.E...... ......ID 0,0-720,1136 #7f0f0078 app:id/content} I/FocusIndicatorLayout: showStart W/art: Suspending all threads took: 41.848ms I/StreamingBaseActivity: view!!!!:android.widget.RelativeLayout{6fb0bbc V.E...... ......ID 0,0-720,1136 #7f0f0078 app:id/content} I/FilterHWProcessor: prepare watermark Texture:2 I/FocusIndicatorLayout: showStart I/FilterHWProcessor: Initialize watermark texture:2 E/PLSONameHelper: Load error:dlopen failed: /data/app/in.funah.android.staging-4/lib/arm/libpldroid_streaming_h264_encoder.so: has text relocations E/PLSONameHelper: SW H264 Codec is not available I/StreamingBaseActivity: res:false I/FocusIndicatorLayout: showSuccess I/FocusIndicatorLayout: showStart I/FocusIndicatorLayout: showSuccess I/StreamingBaseActivity: view!!!!:android.widget.RelativeLayout{6fb0bbc V.E...... ......ID 0,0-720,1136 #7f0f0078 app:id/content} E/PLSONameHelper: SW H264 Codec is not available I/StreamingBaseActivity: res:false

jpxiong commented 8 years ago

Which handset ?

gouravd commented 8 years ago

Motorola MotoG 2nd Gen (XT 1068)

jpxiong commented 8 years ago

The workaround is change the targetSdkVersion to 22 in your build.gradle.

gouravd commented 8 years ago

I hope a fix comes out soon. I would rather wait for the fix as downgrading to 22 might not be a good idea for our app

gouravd commented 8 years ago

Is it resolved in 1.7.1?

jpxiong commented 8 years ago

v1.7.1 doesn't include the PATCH. The PATCH is been testing... The next version will include the PATCH.

jpxiong commented 8 years ago

fixed on v2.0.0