I have an idea to implement video player module in NW based on ffmpeg, canvas and Web Audio API.
Originally I was in need to play IPTV streams (mutlicast UDP). First I tryed to use MediaSource API, with conversion from multicast UDP MPEG 2 TS to MPEG 4 DASH standard sections. This approach works but it is too much components (ffmpeg + MP4box) and unnecessary transcoding, temporary files etc,
Now I have working much simpler prototype - direct decoding by ffmpeg to raw frames and pcm, raw frames are rendered then with canvas, and pcm stream played using web audio api. This works good for SD video and I'll release simple module for this soon. But for HD video poor performance of Node Buffers to DOM ArrayBuffer makes technology unusable. What is strange video plays smooth, but audio glitches, when I switch off video frames copying, audio plays good.
For me copying node Buffer to DOM array buffer takes (for 1920x800x32bit frame) about 30 ms. The fastest method I found is
var domBuffer = new window.Uint8Array(nodeBuffer);
while copying same buffer between dom buffers takes about 1 ms.
So the question is Is there any other faster method to transfer data from Node Buffer to DOM ArrayBuffer ?
The method is very promising as solves any media playing problems w/o need of replacing ffmpegsumo. It is possible to play any formats supproted by ffmpeg, and to play various streams (udp, rtp, mutlicast) directly in NW.