lakeinchina / Librestreaming
Licence: lgpl-2.1
Android real-time effect filter rtmp streaming library.using Mediacodec HWencoding&librtmp stream.
Stars: ✭ 856
Programming Languages
c
50402 projects - #5 most used programming language
Projects that are alternatives of or similar to Librestreaming
Wslivedemo
音视频,直播SDK,rtmp推流,录制视频,滤镜。百万用户,线上迭代半年,已经稳定。
Stars: ✭ 1,782 (+108.18%)
Mutual labels: opengl-es, gpuimage, rtmp
Ios tips
iOS的一些示例,持续更新中:1、AVFoundation 高仿微信相机拍摄和编辑 2、AVFoundation 人脸检测、实时滤镜、音视频编解码、GPUImage框架的使用等音视频相关内容 3、OpenGLES 4、LeetCode算法练习 5、iOS Crash防护和APM监控 6、WKWebView相关的内容 等........
Stars: ✭ 896 (+4.67%)
Mutual labels: opengl-es, gpuimage, filter
Gpuvideo Android
This library apply video filter on generate an Mp4 and on ExoPlayer video and Video Recording with Camera2.
Stars: ✭ 403 (-52.92%)
Mutual labels: opengl-es, gpuimage, filter
Ios Nbuimagepicker
Modular image picker with Simulator-compatible AVFondation camera, assets library, filters and more.
Stars: ✭ 196 (-77.1%)
Mutual labels: gpuimage, filter
React Native Gpuimage
GPUImage Component in React Native
Stars: ✭ 45 (-94.74%)
Mutual labels: gpuimage, filter
Gpuimage X
A Cross-platform (for both Android & iOS) Framework for GPU-based Filters, Video and Image Processing.
Stars: ✭ 154 (-82.01%)
Mutual labels: gpuimage, filter
Ios Gpuimage Plus
GPU accelerated image filters for iOS, based on OpenGL.
Stars: ✭ 217 (-74.65%)
Mutual labels: gpuimage, filter
Xl player
A high performance Android media player, base on ffmpeg and MediaCodec, support VR video.
Stars: ✭ 126 (-85.28%)
Mutual labels: opengl-es, rtmp
Magiccamera3
30+Camera different effects with C++ and opengles 3.0
Stars: ✭ 235 (-72.55%)
Mutual labels: opengl-es, filter
Camera2GLPreview
Android camera preview application using Camera2 API and OpenGL ES/Vulkan
Stars: ✭ 140 (-83.64%)
Mutual labels: filter, opengl-es
Gpuhaishinkit.swift
Camera and Microphone streaming library via RTMP, HLS for iOS. Powered by GPUImage + HaishinKit.
Stars: ✭ 35 (-95.91%)
Mutual labels: gpuimage, rtmp
Ksylive ios
金山云直播SDK [ iOS推流+播放 ]融合版 支持美颜滤镜(Beauty Filter)、美声(Beauty Voice)、软硬编(Software/Hardware Encoder) 、网络自适应(Network Auto Adapt)、混音(Audio Mixer)、混响(Reverb)、画中画(PIP)
Stars: ✭ 861 (+0.58%)
Mutual labels: gpuimage, rtmp
Android Ultimategpuimage
provide video record method with filter and other cool staff. Yes, It's a full functional video recorder
Stars: ✭ 188 (-78.04%)
Mutual labels: gpuimage, filter
Ffmpegandroid
android端基于FFmpeg实现音频剪切、拼接、转码、编解码;视频剪切、水印、截图、转码、编解码、转Gif动图;音视频合成与分离,配音;音视频解码、同步与播放;FFmpeg本地推流、H264与RTMP实时推流直播;FFmpeg滤镜:素描、色彩平衡、hue、lut、模糊、九宫格等;歌词解析与显示
Stars: ✭ 2,858 (+233.88%)
Mutual labels: rtmp, filter
Ezfilter
A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.(一个轻量级(<180KB)、易扩展的Android滤镜和动态贴纸框架,支持摄像头、视频、图片和视图添加滤镜和贴纸。)
Stars: ✭ 155 (-81.89%)
Mutual labels: opengl-es, filter
Android Instagram Filter
a android image filter like instagram
Stars: ✭ 360 (-57.94%)
Mutual labels: gpuimage, filter
Bbmetalimage
A high performance Swift library for GPU-accelerated image/video processing based on Metal.
Stars: ✭ 677 (-20.91%)
Mutual labels: gpuimage, filter
Ltvideorecorder
A demo project demonstrating how to add filter, drawing, and text to a video
Stars: ✭ 16 (-98.13%)
Mutual labels: filter
安卓实时滤镜RTMP推流库
Android real-time effect filter rtmp streaming library This project uses Android lastest MediaCodec API for video/audio encoding and popular C ibrary librtmp (source code included) for rtmp streaming, in addionion, provides ability to implement real-time effect filters after camera capturing phase and before encoding phase. Some features are:
- Support Android 4.3 and higher (Android 6.0/7.0-preview tested)
- Filters support soft mode (CPU processing) and hard mode (GPU/OpenGLES rendering)
- Soft mode filter can be implemented by processing NV21 image array captured from camera
- Hard mode filter can be implemented by rendering image texture captured from camera
- Compatible with GPUImage,use GPUImageFilter without change one line
- Support pixel rotation and flip
- Support encoding paramaters like resolution, bitrate,fps etc
- Fast front/rear camera swaping without interrupt rtmp streaming
- Support draw android View into video
Soft Filter Mode
- Color format is NV21
- Create your own filter by extending BaseSoftVideoFilter
- Filter effect can be manipulated via java, ndk or renderscript
- Adjust your filter properties between acquireSoftVideoFilter and releaseSoftVideoFilter, call releaseSoftVideoFilter as soon as operation finished (after acquireSoftVideoFilter), interval better be less than 3ms
Hard Filter Mode
- Create your own filter by extending either BaseHardVideoFilter or OriginalHardVideoFilter
- OriginalHardVideoFilter is more simple to use, just need to proivde custmom shader to get various effects
- BaseHardVideoFilter is more powerful and flexible and need write openGLES code by yourself. You can theoretically achieve any effects you want via BaseHardVideoFilter.
- Adjust your filter properties between acquireHardVideoFilter and releaseHardVideoFilter, call releaseHardVideoFilter as soon as operation finished (after acquireHardVideoFilter), interval better be less than 3ms
Start/stop preview and stream:
@Override
public void onCreate(final Bundle savedInstanceState) {
... ...
RESConfig resConfig = RESConfig.obtain();
resConfig.setRtmpAddr("rtmp://***");
resConfig.setFilterMode(RESConfig.FilterMode.HARD);
resConfig.setTargetVideoSize(new Size(720, 480));
resConfig.setBitRate(1000 * 1024);
resConfig.setVideoFPS(30);
resConfig.setVideoGOP(1);
resConfig.setRenderingMode(RESConfig.RenderingMode.OpenGLES);//setrender mode in softmode
resConfig.setDefaultCamera(Camera.CameraInfo.CAMERA_FACING_FRONT);
if (!resClient.prepare(resConfig)) {
Log.e("Main", "prepare,failed!!");
finish();
}
}
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
resClient.startPreview(surface, width, height);
}
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
resClient.updatePreview(width, height);
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
resClient.stopPreview();
return false;
}
@Override
protected void onStart() {
super.onResume();
resClient.startStreaming();
}
@Override
protected void onStop() {
super.onPause();
resClient.stopStreaming();
}
@Override
protected void onDestroy() {
super.onDestroy();
resClient.destroy();
}
Set recording direction:
int frontDirection, backDirection;
Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
Camera.getCameraInfo(Camera.CameraInfo.CAMERA_FACING_FRONT, cameraInfo);
frontDirection = cameraInfo.orientation;
Camera.getCameraInfo(Camera.CameraInfo.CAMERA_FACING_BACK, cameraInfo);
backDirection = cameraInfo.orientation;
if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
resConfig.setFrontCameraDirectionMode((frontDirection == 90 ? RESConfig.DirectionMode.FLAG_DIRECTION_ROATATION_270 : RESConfig.DirectionMode.FLAG_DIRECTION_ROATATION_90) | RESConfig.DirectionMode.FLAG_DIRECTION_FLIP_HORIZONTAL);
resConfig.setBackCameraDirectionMode((backDirection == 90 ? RESConfig.DirectionMode.FLAG_DIRECTION_ROATATION_90 : RESConfig.DirectionMode.FLAG_DIRECTION_ROATATION_270));
} else {
resConfig.setBackCameraDirectionMode((backDirection == 90 ? RESConfig.DirectionMode.FLAG_DIRECTION_ROATATION_0 : RESConfig.DirectionMode.FLAG_DIRECTION_ROATATION_180));
resConfig.setFrontCameraDirectionMode((frontDirection == 90 ? RESConfig.DirectionMode.FLAG_DIRECTION_ROATATION_180 : RESConfig.DirectionMode.FLAG_DIRECTION_ROATATION_0) | RESConfig.DirectionMode.FLAG_DIRECTION_FLIP_HORIZONTAL);
}
Add filter:
BlackWhiteSoftFilter bwsFilter = new BlackWhiteSoftFilter();
resClient.setSoftVideoFilter(bwsFilter);
BaseSoftVideoFilter filter = resClient.acquireSoftVideoFilter();
if (filter != null) {
if (filter instanceof BlackWhiteFilterSoft) {
BlackWhiteFilterSoft bwsFilter = (BlackWhiteFilterSoft) filter;
blackWhiteFilter.setGap((byte) 128); // 0 ~ 255
}
... ...
resClient.releaseSoftVideoFilter();
me.lake.librestreaming.sample.softfilter and me.lake.librestreaming.sample.hardfilter.
For more information, please checkout sample code in简介:
- 支持cpu滤镜和gpu滤镜。
- 硬编码基于Mediacodec。
- 推流基于librtmp。
特性:
- 支持cpu滤镜,并可以通过处理图像数组来自定义滤镜。
- 支持gpu滤镜,并可以通过opengles绘制图像纹理来自定义滤镜。
- gpu滤镜模式下兼容GPUImage,一行代码不用修改就可以直接使用GPUImage的滤镜。
- 前后摄像头快速切换,不会打断推流。
- 可以自定义帧率,最大不会超过设备支持帧率
- 可以选择图像大小,码流比特率,具体取决于设备支持。
关于滤镜:
支持两种滤镜模式:使用cpu的软模式和使用gpu(opengles)的硬模式,硬模式效率通常高于软模式。
软模式下:
- 你可以通过继承BaseSoftVideoFilter创建自定义滤镜。
- sample.softfilter中有一些使用Java,NDK和RenderScript来处理图像的滤镜示例。
- 在acquireSoftVideoFilter和releaseSoftVideoFilter之间可以安全的修改滤镜的属性,不要持有滤镜超过3毫秒。
- 滤镜中的颜色格式为NV21。
硬模式下:
- 你可以通过继承BaseHardVideoFilter或者OriginalHardVideoFilter来创建自定义滤镜。
- sample.hardfilter中有一些示例。
- 继承OriginalHardVideoFilter只需要通过提供Shader就可以容易的实现大部分效果。
- 继承BaseHardVideoFilter需要自己处理opengl细节,但是可以实现任何效果。
- 在acquireHardVideoFilter和releaseHardVideoFilter之间可以安全的修改滤镜的属性。不要持有滤镜超过3毫秒。
关于磨皮算法:
- 使用优化过的带阈值的高斯模糊算法(Selective Gaussian Blur),sigma = 0.1,稀疏的取周围24个点,正态分布取权重计算均值。
关于兼容GPUImageFilter:
- 使GPUImageCompatibleFilter来兼容GPUImage的滤镜,注意不能直接使用GPUImageGroupFilter,需要把单独的滤镜用GPUImageCompatibleFilter包裹,再用HardVideoGroupFilter组合起来,具体可以参考sample中的gpuimage:SketchGroup滤镜。
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].