Pmmlabs / OpenPeriscope

Unofficial Periscope client
GNU General Public License v2.0
74 stars 30 forks source link

Update of periscope streaming API #1

Open DmT021 opened 8 years ago

DmT021 commented 8 years ago

Hi, As I can see, you create a broadcast with /liveorigin path in the rtmp URL. When I create a broadcast i get vidmanlive application in response of createBroadcast function. Do you get the same?

MichaelZaporozhets commented 8 years ago

Found another reference with some more information in the security logs on iOS:

Mar 17 11:57:55 securityd[210] <Error> [SecLogging{} ]: securityd_xpc_dictionary_handler Periscope[1267] copy_matching Error Domain=NSOSStatusErrorDomain Code=-50 "query missing class name" UserInfo={NSDescription=query missing class name}

Pmmlabs commented 8 years ago

@MichaelZaporozhets this error only when running stream created with ffmpeg?

MichaelZaporozhets commented 8 years ago

@Pmmlabs yep

lepikhinb commented 8 years ago

Is there any progress on it, guys?

MichaelZaporozhets commented 8 years ago

@lepikhinb I'm still working on it but with no progress :(

lepikhinb commented 8 years ago

@MichaelZaporozhets have you tried to upload a replay at least?

Pmmlabs commented 8 years ago

@DmT021 is right, decrypted rtmp dump is needed. But currently I am not able to start broadcast on smartphone, somehow the app stucks on "initializing video stream" message. Maybe it is because I am on nightly build of CyanogenMod? I will try to rollback to 5.0 on weekend.

Pmmlabs commented 8 years ago

No luck, my smartphone refuses to start broadcasting, and I can't dump rtmp traffic :(

MichaelZaporozhets commented 8 years ago

@lepikhinb I tried uploading a replay but I couldn't figure out the method being used. Seems to through a post to signer.periscope rather any clear api.

What is the best way for me to try and read the decrypted rtmp dump?

Pmmlabs commented 8 years ago

What is the best way for me to try and read the decrypted rtmp dump?

sslsplit, Mallory Proxy, MITMPROXY, WebScarab, Burp Proxy, Zaproxy

or just boot Kali Linux - there are many useful tools.

MichaelZaporozhets commented 8 years ago

So I just stumbled upon a little bit of info by accident.

If you create a broadcast on iOS and you call it 'My test' and the swipe down twice you seem to get some data:

screen shot 2016-03-28 at 2 45 43 pm

Quick Note: at the start that Q parameter seems to hit a high number and then changes back to 0 throughout the rest of the stream.

lepikhinb commented 8 years ago

@MichaelZaporozhets I see that info independently on broadcast name

MichaelZaporozhets commented 8 years ago

@lepikhinb really? nevermind then. Looked useful at the time

Pmmlabs commented 8 years ago

Intercepted part of video stream, with metadata capture484371534.zip

minwater commented 8 years ago

Also when you publish broadcast with friend_chat=true it works fine without any metadata for everybody except your friends. Hope, it can help you somehow

MichaelZaporozhets commented 8 years ago

@minwater Could you please clarify. Are you saying that if you write in friend_chat=true, the stream does not crash on iOS?

If so, this means we're most likely looking for an issue with the pubnub settings as opposed to rtmp metadata..

Pmmlabs commented 8 years ago

@minwater thanks, you are right! Broadcast don't crash the apps, both Android and iPhone! It will be useful! @MichaelZaporozhets yes, seems to be some problem with pubnub, I think need to create room somehow or so.

minwater commented 8 years ago

@Pmmlabs let me know if you solve this problem, please. And also the room_id is always equals with broadcast id. But I don't know what to do with this id. I've tried to create Pubnub instance with publisher and subscriber key, set auth key. I recieve messages when somebody tries to connect the channel or write some comments(when I create empty broadcast), but when I try to upload video with ffmpeg broadcast crashes for everybody who has access to writing comments.

MichaelZaporozhets commented 8 years ago

What's most strange is the fact that android was fine with whatever we're missing...

For anyone using charles, I've got an iphone charles session for periscope that i've been using as a reference: iphone-success-bc.chls.zip

aakldey commented 8 years ago

Does charles support websocket capturing?

MichaelZaporozhets commented 8 years ago

@aakldey since v3.11 https://twitter.com/charlesproxy/status/631226639490289664

MichaelZaporozhets commented 8 years ago

So I'm getting back onto this today- has anyone made any progress I can work off yet? We know it's got to do with the chat and my suspicion is we're not passing a time sync var somewhere...