laifeng-android / sopcastcomponent Goto Github PK
View Code? Open in Web Editor NEW该项目不再维护,仅供学习参考
License: Other
该项目不再维护,仅供学习参考
License: Other
我看网上很多博客都是通过setPreviewCallbackWithBuffer来采集视频数据,然后用MediaCodec来编码,我看你这边不是这样做的,是采用什么方法呢(新手看不懂,见谅)
I would apply to react-native component by the encapsulation,Four control controls are wrapped in live controls,but click the one of fours controls would show the SopCastComponent by the addview method...
However,Four control controls is dismiss, needing relighting the screen or leaving some distance at the bottom will appear in the JS live control.
After,I try set the setZOrderMediaOverlay(true) Method by the google and no effect.
What other solutions are there? If i use the textureview to render in this project ,i need what's do things?
Thank for you reply.
能不能在直播的时候横竖屏直接转换呢。有没有什么办法,需要修改哪里呢?
不能录屏推流,设置了url不行,提示这个fail to publish the stream,希望能公开一个rtmp地址格式!
因为自带的截屏功能会截取整个屏幕,我们只想截取屏幕当中部分控件,所以我们不断地去截图这个控件,之后再和音频混编,推流,怎么做,望大神指导~
我的nexus 6p前置摄像头是倒的--旋转了180度;有时候还特别暗;
另外请问下美颜这块能否接入GPUImage呢?
录屏生成的h264流更小
问一下楼主,目前推流格式是什么?h.264吗?还是.flv
I found directly onDrawFrame Method for screenshots with 2 seconds delay,then try start a thread for screenshots is blank ,i don't know what's caused it ?
public void onDrawFrame(GL10 gl) {
synchronized (this) {
if (updateSurface) {
mSurfaceTexture.updateTexImage();
mSurfaceTexture.getTransformMatrix(mTexMtx);
updateSurface = false;
if (isTakePicture) {
bmp = createBitmapFromGLSurface(0, 0, mSurfaceWidth,
mSurfaceHeight, gl);
mScreenShotHandler.handleScreenShot(bmp);
// synchronized (this) {
// if (mScreenShotHandler != null) {
// if (mCaptureShotThread == null) {
// mCaptureShotThread = new CaptureShotThread(mScreenShotHandler, mView, gl);
// mCaptureShotThread.start();
// }
// }
// }
isTakePicture = false;
}
}
}
mEffect.draw(mTexMtx);
if (mRenderScreen != null) {
mRenderScreen.draw();
}
if (mRenderSrfTex != null) {
mRenderSrfTex.draw();
}
}
private Bitmap createBitmapFromGLSurface(int x, int y, int w, int h, GL10 gl) {
int bitmapBuffer[] = new int[w * h];
int bitmapSource[] = new int[w * h];
IntBuffer intBuffer = IntBuffer.wrap(bitmapBuffer);
intBuffer.position(0);
try {
gl.glReadPixels(x, y, w, h, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE,
intBuffer);
int offset1, offset2;
for (int i = 0; i < h; i++) {
offset1 = i * w;
offset2 = (h - i - 1) * w;
for (int j = 0; j < w; j++) {
int texturePixel = bitmapBuffer[offset1 + j];
int blue = (texturePixel >> 16) & 0xff;
int red = (texturePixel << 16) & 0x00ff0000;
int pixel = (texturePixel & 0xff00ff00) | red | blue;
bitmapSource[offset2 + j] = pixel;
}
}
} catch (GLException e) {
return null;
}
return Bitmap.createBitmap(bitmapSource, w, h, Bitmap.Config.ARGB_8888);
}
调用录屏功能时,退出到后台,保持屏幕当前状态不操作,一会儿后得不到屏幕捕捉到的数据,观看端会呈现花屏的情况,请问这个如何处理? @SuperJim123
如标题. 上传目标可否增加一个阿里云的oss吗?
oss有追加上传功能. 也很适合做些实时功能. 这样可以不用架设RTMP服务.
也适合用于监控备份.
我搞了半天, 没搞定. 实在惭愧. 刚接触Java没几天.
/ACodec: [OMX.qcom.video.encoder.avc] storeMetaDataInBuffers (output) failed w/ err -1010
没有看到,http-flv sender相关的介绍,这个Sender 怎么封装呢
把gradle文件中的 targetSdkVersion 22改成23后,编译运行打开demo的预览界面,提示摄像头开启失败,建议可以增加动态申请权限的代码
請問有方法可以讓前鏡頭不做鏡像嗎,ios的sdk有可以設置Mirror參數使前鏡頭不做鏡像,想問android版的sdk有辦法嗎
楼主直播有时比较流畅,但有时会卡,720x1280会更严重,是不是码率和帧率设置不当造成的。一般设置成什么值会好点。VLC播放卡的很严重,但是potplay就会比较流畅?不知道是什么原因,还请赐教。
楼主能否添加多个水印,如左右角同时添加。
您好, 我透過您提供的sample code在YouTube上進行直播時, 視頻的回聲很明顯
設置setAec(true), 或透過AcousticEchoCanceler, AutomaticGainControl等方法都沒有效果
不曉得您有沒有其他想法或是建議? 感謝您的幫助!
surfaceview 销毁重建 这个时候应该如何处理 不断流 重新推的情况下
How to maintain broadcasting when orientation changed in device and always diffuse in landscape mode ?
小米3直播时 非常卡顿
屏幕没有变化 的时候,没有数据传送时,就会有延迟,如果在刚开始传屏的时候就会传不上去数据,然后非得等屏幕变化之后才会传数据,那这之间的等待时间感觉就变成延迟了!
Hi,
I want to test your library. But I do not see the link RTMP. Hơ to connect two devices
设置一个摄像头监听器,这样的话会受到摄像头的回调。
受 应该是 收 吧?
使用前置摄像头的时侯能打开后置摄像头的闪光灯吗
替换视频特效glsl文件时,GlUtil.checkGlError("draw_E"),这段代码报异常
如何增加对usb摄像头的支持?
这边网络抖动 直播会立马停止 请问能否实现简单的自动重连?
为什么android.permission.CAMERA(相机权限)要声明两次?
目前好像仅支持flv和rtmp打包发送,能否新增mp4打包器,谢谢!
直接报错 具体日志
08-01 15:43:23.530 2832-2947/zb.mediacodectest E/AndroidRuntime: FATAL EXCEPTION: LFEncode
Process: zb.mediacodectest, PID: 2832
java.lang.IllegalStateException: buffer is inaccessible
at java.nio.DirectByteBuffer.checkIsAccessible(DirectByteBuffer.java:551)
at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:170)
at com.laifeng.sopcastsdk.stream.packer.AnnexbHelper.avcStartWithAnnexb(AnnexbHelper.java:191)
at com.laifeng.sopcastsdk.stream.packer.AnnexbHelper.annexbDemux(AnnexbHelper.java:147)
at com.laifeng.sopcastsdk.stream.packer.AnnexbHelper.analyseVideoData(AnnexbHelper.java:83)
at com.laifeng.sopcastsdk.stream.packer.rtmp.RtmpPacker.onVideoData(RtmpPacker.java:58)
at com.laifeng.sopcastsdk.controller.StreamController.onVideoEncode(StreamController.java:134)
at com.laifeng.sopcastsdk.screen.ScreenRecordEncoder.drainEncoder(ScreenRecordEncoder.java:119)
at com.laifeng.sopcastsdk.screen.ScreenRecordEncoder.access$000(ScreenRecordEncoder.java:32)
at com.laifeng.sopcastsdk.screen.ScreenRecordEncoder$1.run(ScreenRecordEncoder.java:77)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
测试机型ASUS K010E 平板 系统5.0
有播放的控件么
我在fbo的时候就打上水印以免之后的屏幕显示和编码打包两次都要打水印,现在我出现的问题是:水印是黑色的,不知道你们有没有遇到过这样的问题
你好,demo里面的开始直播的Upload Address怎么填的,可以举个例子吗
如题,请问怎么调试 @SuperJim123
手动点赞贴。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.