gabrielg / periscope_api

Ruby Periscope API client
MIT License
139 stars 42 forks source link

Stream video via ffmpeg #5

Open ghost opened 8 years ago

ghost commented 8 years ago

Hello

I've done everything with API. But i have one main problem yet - i can not stream video to periscope. Ffmpeg connects to server, streams video - i see black screen in browser or fatal error in android application.

Video codec: h264 Audio codec: AAC

I have tried "-f flv" and "-f mpegts" - same result at all.

May be someone already solved this problem...

Thanks

zvedenyuk commented 8 years ago

I have a similar problem on #6. To fix the black screen error you should do -c copy. But still I get fatal error on my smartphone. If you've found the fix please share it.

Max0nyM commented 8 years ago

Man can i know how u auth to ur acc? Thx

Enelar commented 8 years ago

So, looks like api useless?

zvedenyuk commented 8 years ago

@Enelar looks like so. Actually, it's not about the API, the problem is about the stream. Either you should include special headers in it or a video itself should be encoded somehow specially.

MichaelZaporozhets commented 8 years ago

@zvedenyuk if you patch ffmpeg to attach wowza-specific metadata to the rtmp stream it stops crashing on android so that's a start. It's still crashing on iOS for me however which is very peculiar.

here is the system log attached to the crash:

Last Exception Backtrace:
0 CoreFoundation 0x23b1f866 0x23a2a000 + 0xf5866 // __exceptionPreprocess + 0x7a
1 libobjc.A.dylib 0x3521edfa 0x35218000 + 0x6dfa // objc_exception_throw + 0x22
2 CoreFoundation 0x23b25030 0x23a2a000 + 0xfb030 // -[NSObject(NSObject) doesNotRecognizeSelector:] + 0xb8
3 CoreFoundation 0x23b22c8a 0x23a2a000 + 0xf8c8a // ___forwarding___ + 0x2ba
4 CoreFoundation 0x23a522b4 0x23a2a000 + 0x282b4 // _CF_forwarding_prep_0 + 0x14
5 CoreFoundation 0x23a3a9e2 0x23a2a000 + 0x109e2 // -[__NSCFNumber compare:] + 0x66
6 Periscope (*) 0x000da844 0x00014000 + 0xc6844 

I've tried doing all kinds of wild & wacky things with metadata but I have no idea how to debug it any further. Fixing this last point would complete the solution.

zvedenyuk commented 8 years ago

@MichaelZaporozhets thank you for sharing! Hope that eventually, we'll find a solution.