StreamingKit icon indicating copy to clipboard operation
StreamingKit copied to clipboard

Content-Type audio/mp4 crashes StreamingKit

Open patrickjquinn opened this issue 8 years ago • 16 comments

Upon attempting to play an audio/mp4 stream url streamingKit throws an exception (generic, bad exec, debugging simply gives me a memory address) on line 2625 of STKAudioPlayer.m which is status = AudioConverterFillComplexBuffer(audioConverterRef, AudioConverterCallback, (void*)&convertInfo, &framesToDecode, &localPcmBufferList, NULL);

patrickjquinn avatar Feb 23 '17 13:02 patrickjquinn

Okay @tumtumtum I know you're not around much anymore but if you have even 2 minutes I'd really appreciate you taking a look at this with me!

The error is occurring on line 2625 of STKAudioPlayer.m i.e: status = AudioConverterFillComplexBuffer(audioConverterRef, AudioConverterCallback, (void*)&convertInfo, &framesToDecode, &localPcmBufferList, NULL);

Any help on this would be greatly appreciated.

patrickjquinn avatar Mar 13 '17 13:03 patrickjquinn

I will try to look at this this week. My Mac is in for repairs :-(

Is it possible the format of the file is incorrect or not encoded for streaming?

tumtumtum avatar Mar 13 '17 13:03 tumtumtum

Hey @tumtumtum thank for getting back to me! It is possible that this is the case but it streams fine in VLC and via the browser (i.e its headers accept range, its content type isn't application:stream-octect etc)

But more interestingly it doesn't play once its downloaded locally to the device and fed in as a file path url (This applies to all streams of content type audio/mp4, not just the one above).

I've been seeing complaints generally on iOS that H264 encoded files no longer play properly as of iOS 9+, this could have something to do with it?

patrickjquinn avatar Mar 13 '17 13:03 patrickjquinn

Hey @tumtumtum did you get a chance to look at this yet? I've a brand new shiny app that I'm waiting to push live to the App Store with this as the only blocker (I've at least 4 apps live which use your framework so I'm a diehard supporter of your work) :)

patrickjquinn avatar Mar 19 '17 23:03 patrickjquinn

Alright, i've had to move my project, lock stock, over to https://github.com/StreetVoice/HysteriaPlayer which supports this content type properly(ish)

If ever you fix this i'll migrate back to StreamingKit.

Let me know if I can help when you get around to it.

patrickjquinn avatar Mar 30 '17 08:03 patrickjquinn

Hey @tumtumtum did you ever get your mac back and have a chance to look into this issue? I've zero problems working through this bug with you helping you debug and resolve it!

patrickjquinn avatar May 06 '17 09:05 patrickjquinn

Hello Patrick,

Have you solved this issue? I have the same problem with that kind of url.

kiwi07 avatar May 16 '17 16:05 kiwi07

Btw, hysteriaplayer cannot play the url too.

kiwi07 avatar May 16 '17 16:05 kiwi07

Hysteria player can in fact handle this data source, I switched everything over to it and it worked fine, I decided to implement my own player using AVPlayer instead of AVQueuePlayer. Core concept is the same.

Am I right in saying that your content is coming from YouTube using the 140 tag?

patrickjquinn avatar May 17 '17 14:05 patrickjquinn

Hi Patrick,

Yes, you're right, I got the streaming url from youtube like yours. However, Hysteria cannot stream that link. I will send you the log tomorrow, Please tell me in detail how to make it works. Unfortunately, Avplayer takes very long time to start to play the content.

kiwi07 avatar May 17 '17 14:05 kiwi07

Yes thats going to be your biggest problem. Like 10-30 second delays in some cases.... If you show me how you're doing it i'll do my best to resolve your problem.

Ideally if someone could find a solution for the issue with StreamingKit i'd switch back to that but until then we will have to compromise.

patrickjquinn avatar May 17 '17 14:05 patrickjquinn

:D i have the same issue. It delays 10-20 seconds before starting plays a content that has long duration. According to the Hysteria, I just paste the url in the sample code to test this pod.

kiwi07 avatar May 17 '17 14:05 kiwi07

Probably best that we continue this over on the Hysteria GitHub repo instead of here, dont want to spam @tumtumtum

patrickjquinn avatar May 17 '17 14:05 patrickjquinn

Please send me your email. I would like to ask you for detail about hysteria.

kiwi07 avatar May 17 '17 14:05 kiwi07

Hello Patrick,

I've tested on HysteriaPlayer with the url like this: https://redirector.googlevideo.com/videoplayback?id=f61e2c1fe780f8b5&itag=140&source=youtube&requiressl=yes&initcwndbps=2528750&mm=31&ei=xwYdWYPfHsra-gOewJCoAQ&mv=m&ms=au&pl=20&mn=sn-n4v7sne7&ratebypass=yes&mime=audio/mp4&gir=yes&clen=98697746&lmt=1492920570151300&dur=6214.240&upn=7QyTJ-2gRgU&signature=761F17A80B11380EA7455D7DD6F38A6142915370.94FACF4B67323C8DAE455374E293099494D1329B&mt=1495074384&key=dg_yt0&ip=45.63.90.180&ipbits=0&expire=1495096103&sparams=ip,ipbits,expire,id,itag,source,requiressl,initcwndbps,mm,ei,mv,ms,pl,mn,ratebypass,mime,gir,clen,lmt,dur

it delays about 10s-15s before playing. How can I start streaming immediately?

Thank you for your time.

kiwi07 avatar May 18 '17 02:05 kiwi07

Hello @patrickjquinn and @kiwi07 I have the exact same problem, have you found a solution for it?

Thank you, Marco

marf avatar Apr 04 '18 18:04 marf