tumtumtum / StreamingKit

A fast and extensible gapless AudioPlayer/AudioStreamer for OSX and iOS (iPhone, iPad)
Other
2.43k stars 525 forks source link

M4A files over 5 minutes do not play #310

Open alexfoxy opened 8 years ago

alexfoxy commented 8 years ago

Hey,

I'm having an issue playing M4A files with StreakingKit. I can play M4A files under 5 minutes but any that exceed that length result in an an unexpected error (code 2) and do not play back.

I've read about M4A needing to be optimised for streaming, is this the issue with the larger files? If so how do you do so?

Thanks, Alex

doriansgithub commented 7 years ago

Every 5:31+ song that I try to play fails. I have many on my phone, and my partner has the same issue. I'm not sure how you encoded those songs, but all I do is encode my cds into aiff or lossless, then have iTunes encode to 256.

doriansgithub commented 7 years ago

Also, the same songs play fine in Apple's music player, or in my app using AVAudioPlayer or using Novocaine.

iDevelopper commented 7 years ago

Money (9:52) is from an album I purchased in iTunes ( https://itunes.apple.com/fr/album/delicate-sound-of-thunder-live/id696774967 ). Sous Le Soleil (7:02) is from a CD I imported in iTunes with the AAC encoder.

doriansgithub commented 7 years ago

So both are 256. Can you try playing the files I sent you? Thanks!!

doriansgithub commented 7 years ago

The file I sent you is an m4a, but lossless. It plays fine on Apple's Music Player. Ok, it plays a 5:40 from an iTunes purchase, but doesn't play an MPEG of 5:40. Mp3 over 5:31, don't play. So the trigger is the length, because it can play a 3:52 mp3 from the same album as a 6:10 mp3 that it won't play. The same applies to practically every format. It will play anything under 5:31, but not over. The exception being iTunes purchased items or AIFF.

iDevelopper commented 7 years ago

The file you sent cannot be play !

Patrick BODET

De : Dorian Mattar notifications@github.com Répondre à : tumtumtum/StreamingKit reply@reply.github.com Date : vendredi 15 septembre 2017 à 17:16 À : tumtumtum/StreamingKit StreamingKit@noreply.github.com Cc : Courriel BODET patrick.bodet4@wanadoo.fr, Comment comment@noreply.github.com Objet : Re: [tumtumtum/StreamingKit] M4A files over 5 minutes do not play (#310)

So both are 256. Can you try playing the files I sent you? Thanks!!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

iDevelopper commented 7 years ago

@tumtumtum , help please on this issue.

doriansgithub commented 7 years ago

Hi, do you have a new sample that is iOS 11 ready, where you moved the STKPlayer to a singleton?

ggggffff commented 6 years ago

@tumtumtum , help please on this issue.

doriansgithub commented 6 years ago

STKSample.zip

This can play any file.

veila commented 6 years ago

Hey,

I'm having same issue. It works perfectly with files 320kps, but flac or m4a over 3mins, the duration always wrong ( a song 3mins but StreakingKit detect duration over 5mins, 6mins). So when finish song, the player freeze, can not play anymore and I need restart.

Did you guys find any solution? Thanks,

kutakmir commented 5 years ago

Try this: https://firebasestorage.googleapis.com/v0/b/fir-chat-dab84.appspot.com/o/test_music_dont_delete_yet%2FSTKSample.zip?alt=media&token=0cdb2ad6-e42b-41a3-a062-ce10ea8a7a8c

If the song gets over 10 minutes when playing from the start without skipping, it goes silent.