StreamingKit icon indicating copy to clipboard operation
StreamingKit copied to clipboard

audio/mp4 streams cause fatal crash

Open patrickjquinn opened this issue 7 years ago • 6 comments

I know this is a duplicate issue but I also know the wider issue here is impacting a number of people. Let try a group-effort approach in resolving this.

Try passing https://r9---sn-q0c7dn7k.googlevideo.com/videoplayback?ms=au&mt=1498731939&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&mv=m&ip=89.101.154.41&requiressl=yes&id=o-AINUkDfOnF5Pa4rARBvCTtlIjRKDrl6SF1Tm4xiqL3W8&pl=20&mm=31&mn=sn-q0c7dn7k&expire=1498753663&ipbits=0&dur=223.352&mime=audio%2Fmp4&gir=yes&key=yt6&clen=3548277&signature=1D75AB647D9365C0078287879DD7FB148FFFFFE6.5CB9B958B7775392DFC6AFD82165503CF1DA3325&source=youtube&lmt=1386698023760937&ei=H9ZUWdfxBcPK1wKj0q2gCQ&initcwndbps=1767500&itag=140&keepalive=yes&ratebypass=yes to StreamingKit and you'll get a crash (audio frames related, either its an encoding issue or something else)

AVPlayer handles this stream just fine (However AVPlayer is a pile of crap, especially when compared to StreamingKit) so i'd imagine this is CoreAudio related.

Let me know if you want logs etc as to the source of the crash (They're all available in my previously posted issues: https://github.com/tumtumtum/StreamingKit/issues/325)

I've tried and failed to tackle this on my own on a number of occasions and i'd love the communities help here.

patrickjquinn avatar Jun 29 '17 10:06 patrickjquinn

Hello @patrickjquinn I have the same problem, have you found a solution so far?

Thank you, Marco

marf avatar Apr 04 '18 18:04 marf

Never did sorry, ended up building my own AVAudio based solution.

On Wed, Apr 4, 2018 at 7:04 PM, marf [email protected] wrote:

Hello @patrickjquinn https://github.com/patrickjquinn I have the same problem, have you found a solution so far?

Thank you, Marco

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tumtumtum/StreamingKit/issues/352#issuecomment-378692070, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvC6mo-PXP6FDQW7iSJYx2UlncVkdx3ks5tlQs2gaJpZM4OJH0X .

patrickjquinn avatar Apr 04 '18 18:04 patrickjquinn

Thank you @patrickjquinn, as I read from the docs AVAudioPlayer doesn't allow streaming, have you used a specific library for it?

Thank you for your time, Marco

marf avatar Apr 06 '18 08:04 marf

Try AVPlayer instead of AVAudioPlayer, something like this worked for me https://github.com/StreetVoice/HysteriaPlayer and is what I based my implementation on.

On Fri, Apr 6, 2018 at 9:47 AM, marf [email protected] wrote:

Thank you @patrickjquinn https://github.com/patrickjquinn, as I read from the docs AVAudioPlayer doesn't allow streaming, have you used a specific library for it?

Thank you for your time, Marco

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tumtumtum/StreamingKit/issues/352#issuecomment-379189603, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvC6mcILKBsc3uKcyjhjR2oNX7bH3Njks5tlyuwgaJpZM4OJH0X .

patrickjquinn avatar Apr 06 '18 08:04 patrickjquinn

Thank you @patrickjquinn, I tried the HysteriaPlayer and it works, but I notice a delay when playing youtube audio with direct link, while when playing mp3 from an url the audio starts immediately. Have you noticed it? How have you solved?

Thank you, Marco

marf avatar Apr 06 '18 20:04 marf

Hi @patrickjquinn Do you have one of those URLs that are causing those issued mentioned here and in #325? I'll try to have a look at them.

diegostamigni avatar Mar 27 '19 18:03 diegostamigni