andrewrk / node-groove

bindings to libgroove - music player backend library
MIT License
157 stars 16 forks source link

Error adding file to Playlist #29

Open Beatusvir opened 8 years ago

Beatusvir commented 8 years ago

Hey guys, I'm getting this error when inserting a file to a playlist, reading the code in playlist.js sample as a guide.

I'm using a local mp3 file, as in the same directory as my main.js electron file.

On my groove.open callback, I have:

var player = groove.createPlayer()
  var playlist = groove.createPlaylist()

  groove.connectSoundBackend()
  var devices = groove.getDevices()
  var defaultDevice = devices.list[devices.defaultIndex]
  player.device = defaultDevice

  playlist.insert(file)

If I log the file metadata for example, I'm getting the expected information.

And this is the error I'm getting:

.node-gyp/6.2.1/include/node/node_object_wrap.h:28: static T* node::ObjectWrap::Unwrap(v8::Local<v8::Object>) [with T = GNPlaylistItem]: Assertion `!handle.IsEmpty()' failed.

I added debug information and it reads:

[mp3 @ 0x3f2acc467a00] Could not find codec parameters for stream 1 (Video: mjpeg, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options

This seems to be an FFMPEG error, but have not found a solution yet.

Update: The hell.. If I do ffmpeg -report filename.mp3 I get

Stream #0:0 Audio: mp3 ...
Stream #0:1 Video: mjpeg ...

Update 2: Ok, further reading got me to this post which says my file probably has album artwork (which I'm 100% all my mp3 files do) and ffmpeg is clueless about it.