All Projects → wlanjie → Androidffmpeg

wlanjie / Androidffmpeg

android 读取摄像头和麦克风,使用rtmp推流

Projects that are alternatives of or similar to Androidffmpeg

Trinity
android video record editor muxer sdk
Stars: ✭ 609 (+104.36%)
Mutual labels:  camera, audio, ffmpeg, aac, h264
Haishinkit.swift
Camera and Microphone streaming library via RTMP, HLS for iOS, macOS, tvOS.
Stars: ✭ 2,237 (+650.67%)
Mutual labels:  camera, aac, h264, rtmp
Analysisavp
音视频学习,相关文件格式/协议分析。h264 nalu aac adts flv
Stars: ✭ 38 (-87.25%)
Mutual labels:  ffmpeg, aac, h264, rtmp
Rtsp Simple Server
ready-to-use RTSP / RTMP server and proxy that allows to read, publish and proxy video and audio streams
Stars: ✭ 882 (+195.97%)
Mutual labels:  audio, aac, h264, rtmp
Digital video introduction
A hands-on introduction to video technology: image, video, codec (av1, vp9, h265) and more (ffmpeg encoding).
Stars: ✭ 12,184 (+3988.59%)
Mutual labels:  audio, ffmpeg, h264
Faac
Freeware Advanced Audio Coder faac mirror
Stars: ✭ 102 (-65.77%)
Mutual labels:  audio, encoder, aac
Swiftffmpeg
A Swift wrapper for the FFmpeg API
Stars: ✭ 243 (-18.46%)
Mutual labels:  audio, ffmpeg, h264
Flacon
Audio File Encoder. Extracts audio tracks from an audio CD image to separate tracks.
Stars: ✭ 252 (-15.44%)
Mutual labels:  audio, encoder, aac
Evilslive
This project is a SDK about video stream live
Stars: ✭ 420 (+40.94%)
Mutual labels:  camera, ffmpeg, rtmp
Rtmppublisher
Rtmp client on Android. Live Video Streaming.
Stars: ✭ 515 (+72.82%)
Mutual labels:  camera, audio, rtmp
Aquila
IPCamera, aim to support V4L2/UVC/RaspberryPi/Hisi/XXX SDK production
Stars: ✭ 173 (-41.95%)
Mutual labels:  camera, audio, rtmp
Media Stream Library Js
JavaScript library to handle media streams on the command line (Node.js) and in the browser.
Stars: ✭ 192 (-35.57%)
Mutual labels:  camera, aac, h264
smart rtmpd
RTMP server, smart, compact, high performance(c, c++), high concurrency, easy to maintain, easy to deploy, (supports multiple operating systems Windows and Linux, ARM, FreeBSD)
Stars: ✭ 159 (-46.64%)
Mutual labels:  h264, ffmpeg, rtmp
Fanplayer
A portable video player based on ffmpeg for windows and android platform.
Stars: ✭ 229 (-23.15%)
Mutual labels:  audio, ffmpeg, rtmp
Ffmediaelement
FFME: The Advanced WPF MediaElement (based on FFmpeg)
Stars: ✭ 733 (+145.97%)
Mutual labels:  audio, ffmpeg, h264
Ffmpeg
Mirror of https://git.ffmpeg.org/ffmpeg.git
Stars: ✭ 27,382 (+9088.59%)
Mutual labels:  audio, ffmpeg, rtmp
Wslivedemo
音视频,直播SDK,rtmp推流,录制视频,滤镜。百万用户,线上迭代半年,已经稳定。
Stars: ✭ 1,782 (+497.99%)
Mutual labels:  opengl-es, camera, rtmp
Mpc Hc
MPC-HC's main repository. For support use our Trac: https://trac.mpc-hc.org/
Stars: ✭ 3,567 (+1096.98%)
Mutual labels:  audio, ffmpeg, h264
Axiom
An FFmpeg GUI for Windows
Stars: ✭ 560 (+87.92%)
Mutual labels:  audio, ffmpeg, encoder
Homebridge Camera Ffmpeg
Homebridge Plugin Providing FFmpeg-based Camera Support
Stars: ✭ 726 (+143.62%)
Mutual labels:  camera, audio, ffmpeg

推流 所在项目 Streaming

推流

左边是推流端,右边是播放端, 由于gif图片过大,如果加载不出来,请查看art/streaming.gif

开发工具

Android Studio 3.0

Android NDK r12

使用的开源库

支持如下功能:

  • [x] H.264/AAC 硬编 Api 18支持.
  • [x] H.264/AAC 软编 Api 16.
  • [x] 更多可选项配置(正在开发中).
  • [x] 水印(正在开发中).

视频编码配置

  • 硬编 使用MediaCodec编码.
  • 软编 使用FBO读取纹理数据,由于使用FBO读取的数据是上下颠倒的,故而使用libyuv将图像旋转了180度,openh264编码.

音频编码配置

  • 硬编 使用MediaCodec编码.
  • 软编 使用fdk-aac编码为aac数据.

使用方式:

onCreate中设置初始化

CameraSetting cameraSetting = new CameraSetting();
AudioSetting audioSetting = new AudioSetting();
StreamingSetting streamingSetting = new StreamingSetting();
streamingSetting.setRtmpUrl("rtmp://www.ossrs.net:1935/live/demo")
    .setEncoderType(EncoderType.SOFT);

GLSurfaceView glSurfaceView = (GLSurfaceView) findViewById(R.id.gl_surface_view);
mMediaStreamingManager = new MediaStreamingManager(glSurfaceView);
mMediaStreamingManager.prepare(cameraSetting, streamingSetting, audioSetting);

打开摄像头在onResume中调用

mMediaStreamingManager.resume();

释放摄像头onPause中调用

mMediaStreamingManager.pause();

开始推流

mMediaStreamingManager.startStreaming();

停止推流

mMediaStreamingManager.stopStreaming();

自定义滤镜

实现setSurfaceTextureCallback接口

mMediaStreamingManager.setSurfaceTextureCallback(this);
public int onDrawFrame(int textureId, int textureWidth, int textureHeight, float[] transformMatrix)

在onDrawFrame函数中实现滤镜处理,这里的textureId参数为GLES11Ext.GL_TEXTURE_EXTERNAL_OES类型,textureWidth为纹理的宽度,textureHeight为纹理的高度,transformMatrix为纹理的textureTransform数组,返回值如果<=0或者是textureId代表不处理滤镜,否则需要返回一个GLES20.GL_TEXTURE_2D类型的纹理id,示例中使用了MagicCamera作为滤镜处理库.

关于我

wlanjie, 联系方式:qq:153920981 微信:w153920981

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