GithubHelp home page GithubHelp logo

zofuthan / easyhls Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shenhzou654321/easyhls

0.0 2.0 0.0 2.01 MB

Utility Library:简单可靠的HLS打包库,调用非常简单,配套EasyDarwin的EasyHLSModule使用,提供HLS切片服务,也可以单独做为HLS的切片库!

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

Shell 1.60% Makefile 33.40% C 54.67% C++ 10.32%

easyhls's Introduction

EasyHLS

EasyHLS是EasyDarwin开源流媒体团队开发的一款HLS打包库,接口非常简单,只需要传入打包的文件名、切片存放的目录、单个切片时长以及切片数等参数,EasyHLS库就能轻松将H264+AAC的流媒体切片成m3u8+ts,提供给WEB服务器进行HLS流媒体发布;

调用示例

  • EasyHLS_RTSP:通过RTSPClient将RTSP URL的流媒体音视频数据获取、并进行ts打包,提供HLS直播;

  • EasyHLS_SDK: 通过调用私有SDK回调的音视频数据,进行ts打包,提供HLS直播,示例中的SDK是我们EasyDarwin开源摄像机的配套库,EasyDarwin开源摄像机硬件可以在:https://easydarwin.taobao.com/购买,EasyCamera SDK及配套源码可在 http://www.easydarwin.org 或者 https://github.com/EasyDarwin/EasyCamera 获取到,您也可以用自己项目中用到的SDK获取音视频数据进行打包;

    Windows编译方法,

      Visual Studio 2010 编译:./EasyHLS-master/win/EasyHLS_Demo.sln
    

    Linux编译方法,

      chmod +x ./Buildit
      ./Buildit
    
  • EasyDarwin:您也可以参考EasyDarwin中EasyHLSSession对EasyHLS库的调用方法,详细请看:https://github.com/EasyDarwin/EasyDarwin

  • 我们同时提供Windows、Linux、ARM版本的libEasyHLS库:arm版本请将交叉编译工具链发送至[email protected],我们会帮您具体编译

调用过程

特殊说明

/* 打包H264视频 */
EasyHLS_API int Easy_APICALL EasyHLS_VideoMux(Easy_HLS_Handle handle, unsigned int uiFrameType, unsigned char *data, int dataLength, unsigned long long pcr, unsigned long long pts, unsigned long long dts);
	

其中pcr、dts、pts等参数都是unsigned long long型,通常情况下为时间戳(ms毫秒)*90以后的结果,所以我们通常需要定义: unsigned long long pcr,dts,pts = timestamp*90; 千万不要定义unsigned int型接收数据输入!具体过程参考上面的几个示例;

获取更多信息

邮件:[email protected]

WEB:www.EasyDarwin.org

Copyright © EasyDarwin.org 2012-2015

EasyDarwin

easyhls's People

Contributors

babosa avatar wellsen avatar

Watchers

 avatar  avatar

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.