npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nw-f2cwa-play

v0.0.9

Published

Ffmpeg to Canvas and Web Audio media playback for Node WebKit.

Downloads

3

Readme

nw-f2cwa-play

Ffmpeg to Canvas and Web Audio media playback for Node WebKit.

You will need ffmpeg to run this.

Install with npm install nw-f2cwa-play

Module includes precompiled versions of binary memcpy module. Binary memcpy gives great performance boost alowing to play 1080p@60Hz movies. Have not tried 4K.

nw-f2cwa-play will try to load precompiled binary for your combination of version/platform/architecture. following combinations are supported: NW 0.7.5,0.8.4,0.8.6,0.9.2,0.10.0-rc1,0.10.2 for Linux 32/64, Windows 32

I have no OSX machine to prebuild OSX versions and include them in npm module. Contributors are welcome. Here is simple instructions to build for OSX.

nw-f2cwa-play will use pure JS less performant fallback if binary memcpy not available you may build memcpy module for your Node-Webkit version with nw-gyp see Node Webkit WiKi article.

Under Windows place ffmpeg.exe into vendor directory or on any platform pass ffmpeg path to player as option.

var
  Player = require('nw-f2cwa-play').Player,
  player;

player = new Player({
  selector:'#cnv', // selector for canvas to render video
  ffmpegPath: 'ffmpeg' // in case ffmpeg is available on standard path
});

player.openSrc('udp://@239.0.1.2:1234'); // pass stream url (rtp, udp, http ... anything supported by ffmpeg) or file path

// auto start playback
player.on('canplay',function(){
          player.play();
})

player.on('time',function(time){
  // time is current stream time in seconds
});

Seeking for streams allowing seeking (mostly files) is also supported:

  1. Use player.openSrc(url,startPos); to start playback from needed pos. startPos expressed in seconds.
  2. Use player.seek(seekPos); seekPos is also expressed in seconds.

See sample App.

This is experiment as for now. May produce unexpected results. Only files/streams with audio are supported, audio is also downsampled to mono for simpler processing.