Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 625 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 625 Bytes

media-decoder

A media decoder based on FFmpeg and a Node.js addon for rendering, recording, and capturing media formats such as RTSP.

install

npm i media-decoder

usage

const { MediaDecoder } = require("media-decoder")

let canvas = document.querySelector("#canvas")
let mediaDecoder = new MediaDecoder();

mediaDecoder.setInputUrl("rtsp://localhost:8554/mystream")
// mediaDecoder.setInputFormat("rtsp")
// mediaDecoder.setInputOption()
mediaDecoder.openInput()
mediaDecoder.initDecoder()
mediaDecoder.setupCanvas(canvas)
mediaDecoder.decode()

performance

Alt text