GithubHelp home page GithubHelp logo

hazi7 / flv-muxer Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 186 KB

mux Flv streaming for livestream and record with Webcodecs API

HTML 1.07% TypeScript 98.35% JavaScript 0.58%
flv livestream muxer recording webcodecs

flv-muxer's Introduction

FLV-MUXER(developing)

我用这个项目结合 Webcodecs API 和 Websocket 实现WEB推流,目前实现了基本的 h264 和 aac 的flv流验证。我对js二进制处理和音视频不太熟悉,所以代码目前比较乱,实现的功能比较简单,后续会优化代码和功能。

I'm using this project to implement Web push streaming combined with Webcodecs API and Websocket. Currently, I've validated the basic h264 and aac FLV streams. As I'm not very familiar with JS binary handling and audio/video, the code is currently a bit messy, and the implemented functionality is quite simple. I will optimize the code and functionality later.

Installation

Using NPM, simply install this package using

npm install flv-muxer

API Documentation

FlvStreamer Class

This class is used to create a streamer that can be used to generate FLV streams.

Constructor

const streamer = new FlvStreamer();

Methods

  • streamer.addVideoTrack(chunk, metadata)

    • chunk: The data to be written to the stream.
    • metadata: This method writes the given data to the stream.
  • streamer.addAudioTrack(chunk, metadata)

    • chunk: The data to be written to the stream.
    • metadata: This method writes the given data to the stream.
  • streamer.onMediaData(data)

    • data: This method is called when there is media data to be written to the stream.
  • streamer.onMetadata(data)

    • data: This method is called when there is metadata to be written to the stream.

TODO

  • Implement basic FLV stream generation.
  • Refactoring and optimizing code.
  • Implement FLV file generation.
  • Introduce a buffer area.

flv-muxer's People

Contributors

hazi7 avatar

Stargazers

 avatar

Watchers

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