Pergunta

I use the audio class to read MP3 file thanks to a little trick : replacing the ffmpegsumo.so of Node-Webkit with the chromium one. This enable the reading of MP3 on Windows but doesn't works on Mac OS. Does anyone know why ?

Here's the code :

player = new Audio()
player.src = '/path/to/the/audio.mp3';
player.play();
Foi útil?

Solução

This seems to be dependant upon the dll/so being a 32 bit version. I am guessing that is why copying the file from Chrome doesn't work correctly for most people ( my 3 year old phone is the only 32-bit device I have left ).

I keep seeing this link -- https://github.com/rogerwang/node-webkit/wiki/Support-mp3-and-h264-in-video-and-audio-tag .. but it is a blank page. I am guessing it was deleted since the info was likely not current or correct.

This issue thread has links to some rebuilt ffmpegsumo libraries for both Mac and Windows -- https://github.com/rogerwang/node-webkit/issues/1423

The alternative appears to be rebuilding ffmpegsumo, this thread has some config for doing that -- https://github.com/rogerwang/node-webkit/issues/1208

I am still confused about the licensing on it after you build the library, so that is probably worth some research. Everything about mpeg4-part10 is copyrighted and heavily patent encumbered. I think we all need to get smart enough to stop using mp4/h.264. Before I got this working correctly on node-webkit, it was easier to use ffmpeg to transcode the video to an ogv container using Theora and Vorbis codecs. At this point it seems like iOS is keeping h.264 alive, when it should probably die the horrible death it has earned.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top