Code Monkey home page Code Monkey logo

node-mp3info's People

Contributors

bendi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

node-mp3info's Issues

failed to build on node.js 0.12.6

Cannot install on node.js 0.12.6 with the following message:

node-pre-gyp ERR! Source compile required: 404 status code downloading tarball 
child_process: customFds option is deprecated, use stdio instead.
make: Entering directory '/home/mycoboco/temp/node_modules/mp3info/build'
  CC(target) Release/obj.target/mp3info/deps/mp3info/src/mp3tech.o
../deps/mp3info/src/mp3tech.c: In function ‘get_id3’:
../deps/mp3info/src/mp3tech.c:306:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
     fread(fbuf,1,3,mp3->file); fbuf[3] = '\0';
          ^
../deps/mp3info/src/mp3tech.c:316:20: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
               fread(mp3->id3.title,1,30,mp3->file); mp3->id3.title[30] = '\0';
                    ^
../deps/mp3info/src/mp3tech.c:317:20: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
               fread(mp3->id3.artist,1,30,mp3->file); mp3->id3.artist[30] = '\0';
                    ^
../deps/mp3info/src/mp3tech.c:318:20: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
               fread(mp3->id3.album,1,30,mp3->file); mp3->id3.album[30] = '\0';
                    ^
../deps/mp3info/src/mp3tech.c:319:20: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
               fread(mp3->id3.year,1,4,mp3->file); mp3->id3.year[4] = '\0';
                    ^
../deps/mp3info/src/mp3tech.c:320:20: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
               fread(mp3->id3.comment,1,30,mp3->file); mp3->id3.comment[30] = '\0';
                    ^
../deps/mp3info/src/mp3tech.c:324:20: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
               fread(mp3->id3.genre,1,1,mp3->file);
                    ^
  AR(target) Release/obj.target/deps/mp3info/libmp3info.a
  COPY Release/libmp3info.a
  CXX(target) Release/obj.target/bindings/src/bindings.o
In file included from ../src/bindings.cc:17:0:
/home/mycoboco/.node-gyp/0.12.6/deps/v8/include/v8.h: In function ‘void ns_mp3info::Initialize(v8::Handle<v8::Object>)’:
/home/mycoboco/.node-gyp/0.12.6/deps/v8/include/v8.h:816:13: error: ‘v8::HandleScope::HandleScope()’ is protected
   V8_INLINE HandleScope() {}
             ^
../src/bindings.cc:28:15: error: within this context
   HandleScope scope;
               ^
bindings.target.mk:91: recipe for target 'Release/obj.target/bindings/src/bindings.o' failed
make: *** [Release/obj.target/bindings/src/bindings.o] Error 1
make: Leaving directory '/home/mycoboco/temp/node_modules/mp3info/build'

Simple updating the version of node-pre-gyp to the latest one (0.6.9 as of this writing) seems to fix the problem.

Migrate to newer V8 (e.g. iojs/v0.11.x)

Currently mpg123n supports only node v0.10.x and there are some incompatible API changes in newer V8 versions, so bindings should be updated in order to compile.

No metadata returned for MP3

I'm working on a Node-backed performance DJ server and I'm trying to query files for metadata, as the mp3 decoding library that I'm using doesn't do this for me. I found tim-smart's pure-js id3 library, which kinda works for my tracks except it returns a bunch of cruft as well, and doesn't handle embedded images (can't tell if your library does yet).

Anyway, here's the issue that I'm having:

$ file pizzarolls.mp3
pizzarolls.mp3: Audio file with ID3 version 2.2.0, contains: 

> require('mp3info')('pizzarolls.mp3', function(e,d){console.log(d,e)})
{ length: 254,
  id3: { title: '', artist: '', album: '', year: '', comment: '' },
  header: 
   { sync: 4094,
     version: 1,
     layer: 1,
     crc: 1,
     bitrate: 14,
     freq: 0,
     padding: 1,
     extension: 0,
     mode: 1,
     mode_extension: 0,
     copyright: 0,
     original: 0,
     emphasis: 0 } } undefined

Some files work:

$ file "/home/daniel/Downloads/Titanium.mp3"
/home/daniel/Downloads/Titanium.mp3: Audio file with ID3 version 2.3.0, contains: MPEG ADTS, layer III, v1, 320 kbps, 44.1 kHz, JntStereo

> require('mp3info')('/home/daniel/Downloads/Titanium.mp3', function(e,d){console.log(d,e)})
{ length: 245,
  id3: 
   { title: 'Titanium',
     artist: 'David Guetta feat. Sia',
     album: '',
     year: '2011',
     comment: '' },
  header: (same as pizzarolls, except mode and original are flipped) } undefined

And files with no metadata at all can't be distinguished:

$ file "/home/daniel/Downloads/adele22 10.mp3"
/home/daniel/Downloads/adele22 10.mp3: MPEG ADTS, layer III, v1, 320 kbps, 44.1 kHz, Stereo

> require('mp3info')('/home/daniel/Downloads/adele22 10.mp3', function(e,d){console.log(d,e)})
{ length: 253,
  id3: { title: '', artist: '', album: '', year: '', comment: '' },
  header: (same as pizzarolls, except mode and original are flipped) } undefined

I'm still shopping around for id3/metadata modules, but I figured I'd let you know that yours doesn't seem to be working. I obtained the pizzarolls.mp3 file from SoundCloud if that helps.

$ uname -a
Linux laptop 3.9.10-200.fc18.x86_64 #1 SMP Sun Jul 14 01:36:53 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ node --version
v0.10.13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.