Search code examples
javascriptnode.jshtmlnode-webkit

Read the MP4 file with Node Webkit


I use node webkit and I can not read the MP4 file! I still have this error for each mp4 file:

[10093:10093:0124/113029.146622:ERROR:render_media_log.cc(25)] 
MediaEvent: PIPELINE_ERROR demuxer: could not open

Not work mp4 with nwjs

This is my code used

<video controls preload="none" width="500" height="500" >
   <source src="http://www.supportduweb.com/page/media/videoTag/BigBuckBunny.mp4" type="video/mp4"> 
</video>

But work perfectly with webm and ogg

work ogg webm

How can i do to debug this?


Solution

  • Node Webkit does not support MP4 out of the box:

    Using MP3 and H.264 codecs requires you to pay attention to the patent royalties and the license of the source code. Consult a lawyer if you do not understand the licensing constraints and using patented media formats in your application.

    The above link points at the official documentation for adding support which boil down to :

    1. Download the binaries you need to decode mp4s
    2. Download the dependencies
    3. Modify the build instruction file for Node Webkit
    4. Compile FFMPEG
    5. Overwrite the default version of FFMPEG with the one you just compiled