GithubHelp home page GithubHelp logo

easydarwin / easypusher-android Goto Github PK

View Code? Open in Web Editor NEW
627.0 45.0 258.0 21.78 MB

免费组件:简单、高效、稳定、免费的一款标准RTSP/RTP协议直播推送库,支持将H.264/H.265/G.711/G.726/AAC等音视频数据推送到RTSP流媒体服务器(例如EasyDarwin)进行低延时直播或者视频通信,支持Windows、Linux、ARM、Android、iOS等平台,EasyPusher配套EasyDarwin流媒体服务器、EasyPlayer RTSP播放器适用于特殊行业的低延时应急指挥需求! Android迁移到了https://github.com/EasyDarwin/EasyPusher-Android , iOS迁移到了https://github.com/EasyDarwin/EasyPusher-iOS

Home Page: http://www.easydarwin.org

Java 100.00%
easypusher rtsp-annouce rtp-relay easydarwin android-screen-live

easypusher-android's Introduction

EasyDarwin开源流媒体服务器

主要功能特点

安装部署

  • 直接下载运行Release包

  • 直接运行(Windows)

    EasyDarwin.exe

    Ctrl + C 停止服务

  • 以服务启动(Windows)

    ServiceInstall-EasyDarwin.exe

    以 ServiceUninstall-EasyDarwin.exe 卸载 EasyDarwin 服务

  • 直接运行(Linux/macOS)

      cd EasyDarwin
      ./easydarwin
      # Ctrl + C
    
  • 以服务启动(Linux/macOS)

      cd EasyDarwin
      ./start.sh
      # ./stop.sh
    

二次开发

准备工具

    # go tools
    go get -u -v github.com/kardianos/govendor
    go get -u -v github.com/penggy/gobuild

    # npm tools
    npm i -g apidoc
    npm i -g rimraf

编译命令

  • 获取代码

      cd $GOPATH/src/github.com
      mkdir EasyDarwin && cd EasyDarwin
      git clone https://github.com/EasyDarwin/EasyDarwin.git --depth=1 EasyDarwin
      cd EasyDarwin
    
  • 以开发模式运行

      npm run dev
    
  • 以开发模式运行前端 Run as dev mode

      npm run dev:www       
    
  • 编译前端 Build www

      cd web_src && npm i
      cd ..
      npm run build:www
    
  • 编译 Windows 版本 Build windows version

      npm run build:win
    
  • 编译 Linux/macOS 版本 (在 bash 环境下执行) Build linux/macOS version

      npm run build:lin       
    
  • 清理编译文件 Clean

      npm run clean 
    

技术支持

  • 邮件:[email protected]

  • QQ交流群:965773206

  • EasyDarwin开源流媒体服务器是属于EasyDarwin开源团队的免费产品,大家免费使用,同时,EasyDarwin开源团队也能提供相应的收费技术咨询、技术服务和技术定制,谢谢大家支持!

获取更多信息

EasyDarwin开源项目:www.EasyDarwin.org

Copyright © EasyDarwin.org Team 2012-2024

easypusher-android's People

Contributors

babosa avatar jinlong0813 avatar leo-09 avatar milkywayriver avatar swordtwelve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easypusher-android's Issues

library分支问题

1、默认点击推送无反应,要退出在进入
2,长时间放置会中断稳定性要提高
3.多开放点接口方便集成

推流设置带黑色背景框的时间水印不起作用

public void overlay(byte[] data, String txt) {
// txt = "drawtext=fontfile="+context.getFileStreamPath("SIMYOU.ttf")+": text='EasyPusher
// 2017':x=(w-text_w)/2:y=H-60 :fontcolor=white :box=1:[email protected]";
// txt = "movie=/sdcard/qrcode.png [logo];[in][logo] "
// + "overlay=" + 0 + ":" + 0
// + " [out]";
// if (ctx == 0) throw new RuntimeException("init should be called at first!");
if (ctx == 0)
return;
String txt2 = String.format(
"drawtext=fontfile=%s: text='%s%s':x=(w-text_w)/2:y=H-60 :fontcolor=white :box=1:[email protected]",
context.getFileStreamPath("SIMYOU.ttf"), "EasyPusher",
new SimpleDateFormat("yyyy-MM-ddHHmmss").format(new Date()));
// txtOverlay(ctx, data, String.format(OVERLAY_FORMAT,
// context.getFileStreamPath("SIMYOU.ttf"), txt));
txtOverlay(ctx, data, txt2);
}
image

@Wellsen @babosa

txtOverlay水印问题

这个库开源了吗,还需要设置字体吗,水印字体颜色大小位置等如何处理呢

Change overlay text color

The overlay file has a commented excerpt, but I don't understand what it does. Is there a way to change the font color displayed in the overlay?

English version

Greetings, I have an USB thermal camera for android and would like to implement this library with it. I can't get around the software to implement it because of the language barrier, is there any english version to help me? I need some guidance on implementing this project, please and thanks.

有办法跳过RTSP协商直接调用RTP协议发送流数据么?

你好,
我目前有一个工程,用的sip协议控制rtp推流,我如果想要使用这个pusher的库的话是不是没法使用?我看到
mEasyPusher.start(ip, port, String.format("%s.sdp", id), Pusher.TransType.EASY_RTP_OVER_TCP);
这里应该是直接集成了rtsp的控制逻辑,外加rtp发送数据的逻辑。
想请问一下有没有其他API可以直接启动rtp往指定的IP和PORT上发送rtp数据包?

谢谢

h265

sample看起来不知此后h265, 有计划补充么?

请问授权码key怎么获取,现在运行推送一直连接中

@OverRide
public synchronized void initPush(Context context, final InitCallback callback) {
Log.i(TAG, "PusherStart");
mPusherObj = init("", context, new OnInitPusherCallback() {
int code = Integer.MAX_VALUE;
@OverRide
public void onCallback(int code) {
if (code != this.code) {
this.code = code;
if (callback != null) callback.onCallback(code);
}
}
});
}

推流返回6-断开连接

返回码分别是0, 1, 2, 6

10-11 15:45:19.323 W/CameraServer( 3499): 推流onCallback: 0
10-11 15:45:19.323 W/CameraServer( 3499): 推流激活成功
10-11 15:45:19.323 D/libEasyPusher( 3499): EasyStreamPusher_StartStream serverAddr[video.qd.com] port[10554] videoCodec[28] audioCodec[86018] samplerate[8000]  serverURL[rtsp://video.qd.com:10554/107700000088_11.sdp]
10-11 15:45:19.324 W/MediaAudioEncoder( 3499): AudioThread:start audio recording
10-11 15:45:19.325 D/libEasyPusher( 3499): init sock: 0
10-11 15:45:19.325 E/easypusher_jni( 3499): ____isActivated__....... userPtr=-432548752
10-11 15:45:19.326 W/CameraServer( 3499): 推流onCallback: 1
10-11 15:45:19.326 W/CameraServer( 3499): 推流连接中
10-11 15:45:19.337 W/MediaEncoder( 3499): INFO_OUTPUT_FORMAT_CHANGED
10-11 15:45:19.344 W/MediaMuxerWrapper( 3499): addTrack:trackNum=2,trackIx=0,format={csd-1=java.nio.HeapByteBuffer[pos=0 lim=8 cap=8], mime=video/avc, frame-rate=15, width=320, height=240, color-standard=4, color-range=2, bitrate=576000, csd-0=java.nio.HeapByteBuffer[pos=0 lim=20 cap=20], color-transfer=3, max-bitrate=576000}
10-11 15:45:19.344 W/MediaMuxerWrapper( 3499): start:
10-11 15:45:19.376 D/libEasyPusher( 3499): IP address: 139.224.226.23
10-11 15:45:19.376 D/libEasyPusher( 3499): Connecting [139.224.226.23:10554]
10-11 15:45:19.414 E/easypusher_jni( 3499): ____isActivated__....... userPtr=-432548752
10-11 15:45:19.414 W/CameraServer( 3499): 推流onCallback: 2
10-11 15:45:19.414 W/CameraServer( 3499): 推流连接成功
10-11 15:45:19.414 D/libEasyPusher( 3499): Connect success
10-11 15:45:19.416 D/libEasyPusher( 3499): SEND[726]
10-11 15:45:19.416 D/libEasyPusher( 3499): ANNOUNCE rtsp://video.qd.com:10554/107700000088_11.sdp RTSP/1.0
10-11 15:45:19.416 D/libEasyPusher( 3499): CSeq: 1
10-11 15:45:19.416 D/libEasyPusher( 3499): User-Agent: EasyPusher v1.2.16.1105
10-11 15:45:19.416 D/libEasyPusher( 3499): Content-Type: application/sdp
10-11 15:45:19.416 D/libEasyPusher( 3499): Content-Length: 557
10-11 15:45:19.416 D/libEasyPusher( 3499): 
10-11 15:45:19.416 D/libEasyPusher( 3499): v=0
10-11 15:45:19.416 D/libEasyPusher( 3499): o=- 2205756022 2205756022 IN IP4 127.0.0.1
10-11 15:45:19.416 D/libEasyPusher( 3499): s=EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): i=EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): c=IN IP4 127.0.0.1
10-11 15:45:19.416 D/libEasyPusher( 3499): t=0 0
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-nam:EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-inf:EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-cmt:source application::EasyDarwin
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-aut:
10-11 15:45:19.416 D/libEasyPusher( 3499): a=x-qt-text-cpy:
10-11 15:45:19.416 D/libEasyPusher( 3499): m=video 0 RTP/AVP 96
10-11 15:45:19.416 D/libEasyPusher( 3499): a=rtpmap:96 H264/90000
10-11 15:45:19.416 D/libEasyPusher( 3499): a=fmtp:96 packetization-mode=1;sprop-parameter-sets=
10-11 15:45:19.416 D/libEasyPusher( 3499): a=control:trackID=1
10-11 15:45:19.416 D/libEasyPusher( 3499): m=audio 0 RTP/AVP 97
10-11 15:45:19.416 D/libEasyPusher( 3499): a=rtpmap:97 MPEG4-GENERIC/8000/1
10-11 15:45:19.416 D/libEasyPusher( 3499): a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1588
10-11 15:45:19.416 D/libEasyPusher( 3499): a=control:trackID=2
10-11 15:45:19.416 D/libEasyPusher( 3499): 
10-11 15:45:19.499 W/MediaEncoder( 3499): INFO_OUTPUT_FORMAT_CHANGED
10-11 15:45:19.501 W/MediaMuxerWrapper( 3499): addTrack:trackNum=2,trackIx=1,format={bitrate=64000, mime=audio/mp4a-latm, csd-0=java.nio.HeapByteBuffer[pos=0 lim=2 cap=2], channel-count=1, sample-rate=44100, max-bitrate=64000}
10-11 15:45:19.501 W/MediaMuxerWrapper( 3499): start:
10-11 15:45:19.502 I/MPEG4Writer( 3499): limits: 4294967295/0 bytes/us, bit rate: -1 bps and the estimated moov size 3195 bytes
10-11 15:45:19.505 W/MediaMuxerWrapper( 3499): MediaMuxer started:
10-11 15:45:19.506 W/MediaEncoder( 3499): drain:BUFFER_FLAG_CODEC_CONFIG
10-11 15:45:19.507 W/MediaEncoder( 3499): drain:BUFFER_FLAG_CODEC_CONFIG
10-11 15:45:19.525 D/libEasyPusher( 3499): close socket..
10-11 15:45:19.525 D/libEasyPusher( 3499): Push Thread exit...
10-11 15:45:19.525 E/easypusher_jni( 3499): ____isActivated__....... userPtr=-432548752
10-11 15:45:19.525 W/CameraServer( 3499): 推流onCallback: 6
10-11 15:45:19.525 W/CameraServer( 3499): 推流断开连接

支持内网吗?

请问支持推到内网吗?比如二台手机一个推一个看?

Screen share question

I am trying to test screen share sending to rtsp, when press start the screen blinks too much without stop, I cant do nothing. Is that issue unsolve or I am doing something wrong?

Thanks on advance

Android 4.0.3如何支持呢?

07-16 12:07:30.405 30202-8662/org.easydarwin.easypusher W/dalvikvm: threadid=11: thread exiting with uncaught exception (group=0x40a6e1f8)
07-16 12:07:30.410 30202-8662/org.easydarwin.easypusher E/AndroidRuntime: FATAL EXCEPTION: CAMERA
java.lang.NoClassDefFoundError: android.media.MediaCodecList
at org.easydarwin.hw.CodecManager.findEncodersForMimeType(CodecManager.java:68)
at org.easydarwin.hw.EncoderDebugger.debug(EncoderDebugger.java:230)
at org.easydarwin.hw.EncoderDebugger.debug(EncoderDebugger.java:133)
at org.easydarwin.hw.EncoderDebugger.debug(EncoderDebugger.java:128)
at org.easydarwin.push.HWConsumer.startMediaCodec(HWConsumer.java:224)
at org.easydarwin.push.HWConsumer.onVideoStart(HWConsumer.java:53)
at org.easydarwin.push.MediaStream.startPreview(MediaStream.java:349)
at org.easydarwin.push.MediaStream$5.run(MediaStream.java:287)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
at org.easydarwin.push.MediaStream$1.run(MediaStream.java:86)
07-16 12:07:30.535 30202-30202/org.easydarwin.easypusher D/OpenGLRenderer: Flushing caches (mode 0)

运行后报错

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

javax/xml/bind/JAXBException

Android pusher stream is available to all user accounts

Hi,

1. Locally I installed EasyDarwin server
2. Apart from admin user, I created other users
3. Installed Easypusher android app and pushed stream to server
4. I login as admin and I could see the connection at Pusher page, http://192.168.0.34:10008/#/pushers/1
5. I logged in as kiran user and I could see the connection as well

I tried as below in the screenshot by providing username/password to the URL but it is not working.

How to restrict stream to only single user of the EasyDarwin server ?

46403962-88563780-c721-11e8-96d2-090d12ff7898

Thanks.

无法对焦

无法对焦,在安卓5.0和8.0真机上都是这样

发现BUG

JNI DETECTED ERROR IN APPLICATION: use of invalid jobject 0x12d7b130
from long org.easydarwin.push.EasyPusher.init(java.lang.String, android.content.Context, org.easydarwin.push.EasyPusher$OnInitPusherCallback)
"main" prio=5 tid=1 Runnable
| group="main" sCount=0 dsCount=0 obj=0x7635f000 self=0xe7c04f00
| sysTid=12825 nice=-10 cgrp=default sched=0/0 handle=0xea9c4534
| state=R schedstat=( 691827072 36367707 1187 ) utm=60 stm=9 core=0 HZ=100
| stack=0xff71b000-0xff71d000 stackSize=8MB
| held mutexes= "mutator lock"(shared held)
at org.easydarwin.push.EasyPusher.init(Native method)
at org.easydarwin.push.EasyPusher.initPush(EasyPusher.java:102)

  • locked <0x0d4ce3e6> (a org.easydarwin.push.EasyPusher)
    at com.ackj.njqc.push.MediaStream.startStream(MediaStream.java:157)
    at com.ackj.njqc.StreamActivity.onClick(StreamActivity.java:444)

安卓集成后so怎么处理的

现在直接copy libeasypusher.so到项目, 也用到了EasyPusher类, 里面的几个native 方法, 导致找不到,

除了修改包名还需要怎么处理呢?自己编译?

推送端是否推送视频帧信息

推送端进行推送端的时候,服务端是否可以通过rtspclient获取视频的帧率和码率等信息,类似于音频帧可以得到采样率,声道数这些音频信息

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.