cphillips / node-raw-264

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why

I wanted to decode the video coming from the tello drone

Thoughts

  • I liked the projects that used emscripten, it's a cool approach. However, I wasn't able to make one work.

  • For browser side, h264-converter is really well done, and works well, I like that it use the native video player and Media Source API

  • I decide to make the API synchronous, because I was uncertain about how libav needs data feed to it, for example if data is out of order, can libav handle it? Is libav thread safe is it re-entrant? It wasn't documented well enough for me to easily know, so I used workers-threads and transfer lists is the consuming application. I thought about just using an internal queue to deal with those issues, but code complexity and testing requirements would be larger

Reference projects

Example from DJI

Uses Browser Media Source API

Web Asm and Android Source Code

Web Asm and libav ( the one from FFMPEG )

Pure javascript decoders

Native Node Libraries

Spawn FFMPEG CLI ( typically with jsmpeg as viewer )

Other ( non JS )

About


Languages

Language:C++ 83.2%Language:Python 7.1%Language:TypeScript 6.6%Language:JavaScript 3.1%