Question

I am trying to make a simple node-webkit app that lets you play .avi videos (which should work both on windows and mac). Is there a way to do this with node-webkit?

Was it helpful?

Solution

It is unlikely you will be able to just do this with Node-Webkit. Especially since the official webkit does not support AVI. Your best bet is to use an external application like libav (avplay) or use node to serve a webpage that has a player capable of playing the content and just let the users browser do the work. (Flash is likely still the best way to go, video.js is a good choice)

The alternative is to convert the video to one of the supported formats. I would recommend mp4. (Once again libav (avconv) comes in handy here.) This still assumes that Node-Webkit has implemented full HTML5 support. (I am not sure what they have completed but I am guessing it supports the video element)

OTHER TIPS

Is AVI supported in Chrome (not Chromium) ?

If it is you have to change the libffmpegsumo.so in nw for the one in Chrome (try to use the same version).

libffmpegsumo.so is called ffmpegsumo.dll in Windows

The file file is in the same folder of the nw executable

to get the file download google chrome and go to %USER%/Google Chrome/ (or something like that) and you'll find the file in the same folder of the google-chrome executable

You can wcjs-player to play any format video which supported by VLC. It plays any video without any lags as in-built player. To support my above claim, I have following points:

  1. Building NW (by compiling source code) with various FFMPEG codec flags given at nw github site, doesn't help, in getting ffmpegsumo.dll which can play avi file format.

  2. wcjs-player uses VLC libraries, which support all video played by VLC does.

  3. Its better than using any nw plugin, as internally wcjs-player using VLC does similar job as HTML native video support .
  4. Even if you suceed playing avi files, sometimes supported videos file format may not get played like most ironically mp4 file itself.

Apart from this, Teewe Theatre, Popcorn Time , Butter are among NW based media player using wcjs-player. It hardly increased 30 MB size of overall app size.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top