albertz / music-player

Music player - endlessly plays your music
http://albertz.github.io/music-player/
BSD 2-Clause "Simplified" License
492 stars 59 forks source link

avcodec_decode_audio4 #45

Closed ibeex closed 10 years ago

ibeex commented 10 years ago

There is one mp3 in my collection that cant be played and in logg i get this error avcodec_decode_audio4 error at pos 0 but this mp3 can be played with ffplay and mplayer. Can I send you somehow mp3 or?

Edit: It can be played if I add it manually to queue. But it generated that error when player tried to auto add it to queue and was skipped.

albertz commented 10 years ago

Yes, send it to albzey@gmail.com. The ffplay is from the same FFmpeg which you have linked to the musicplayer module? (I guess so, if you used ./compile.py.)

albertz commented 10 years ago

You said that ffplay generates the error:

[mp3 @ 0x7fb41d015a00] Header missingB vq=    0KB sq=    0B f=0/0
Last message repeated 2 times

That is probably the same as the avcodec_decode_audio4 error at pos 0, only more informative.

I added it manually and it generates the same error for me (so the mp3 is probably somehow corrupt) but it didn't skipped.

When it tried to auto-add it to the queue, did it actually land in the queue or did it even not landed there? If it was in the queue, it was skipped when it should have been played? Technically, there is no difference when the player auto-adds something to the queue or when you add something manually, so the auto-adding is probably not relevant here.

albertz commented 10 years ago

Do you know Python? You could try with python core/examples/test_ffmpeg.py <your-mp3>, if it skips that. It should show the error, including some more verbose info like from ffplay. But the interesting part is whether you can somehow reproduce that it skips the song. I couldn't. But that seems to be the actual problem here, the skipping, because it shouldn't do that.

ibeex commented 10 years ago

that song I found in stdout output in console with tat error message, but in GUI it dint played and it was not in history so I assumed that player tried to add it to queue and failed. After I manually added it to queue it played after some time.

albertz commented 10 years ago

Ah, I see. It didn't necessarily mean it tried to add it, just that it considered it and maybe it took some other song instead. That is not a bug then.

In general, you can ignore those avcodec_decode_audio4 errors. They just indicate that there is something strange in the mp3 and are helpful in case that you cannot play the mp3. But in most cases, it still works, even with this error.

Or did I misunderstood you and it was there in the GUI queue and it just skipped over it?

ibeex commented 10 years ago

You understood OK. It newer showed in GUI only in console.

albertz commented 10 years ago

Ah ok. I think it's all fine then. :) Then I'm closing this issue now. If you stumble upon some song which is in the (GUI) queue and where it just skips over or it breaks-up in the middle or so, then open another issue.