-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hero 4 Session LiveStream in v02.00 #47
Comments
Hi @ivanmkc, use the GoPro App to make sure your camera is up to date. I recently played around with a HERO4 Silver and used the URL you mentioned to get a live feed using FFplay. |
Thanks for the quick response @KonradIT. It is brand new and up-to-date. From the official site (https://gopro.com/update/hero4_session), the Hero 4 Session runs the HERO4 Session v02.00 firmware (March 31, 2016) and the Hero 4 Black\Silver run firmware v03.00.00 (July 30, 2015). Given the 8 month difference in release, I'm not surprised that there are discrepancies between them. I'd love your help resolving this, but I don't mind helping either if you tell me how I can best contribute. Thanks, |
For reference here is the output from: http://10.5.5.9/gp/gpControl The GET request looks to be as your guide says them to be, but the GoPro4 Session just doesn't react to the command. |
@ivanmkc crap I read it as HERO4 Silver, I am aware of this problem as I have a HERO4 Session myself and cannot get to stream. I tried using Charles Proxy but didn't get anything relevant. I have the Session with me now, will see what I can do |
@KonradIT Ya I picked the session as its form factor makes it great for mounting on a drone. I think I read that you had interest in drones as well ;) How do you set up Charles proxy to view the Android traffic? I used Wireshark on my Mac (on promiscuous mode) and couldn't see it. Would love to help. |
If your Android phone is rooted, try Termux or Terminal Emulator with tcpdump or mitmdump, that should help. Or decompile the GoPro smarty apk |
OK I know what's happening here (I guess). My phone being pity does not let me run tcpdump/mitmdump because of some PIE setting. I used "Packet Capture" app from the Play Store and got some interesting requests. The app is wonderful: no root needed, material design... Screenshots here: http://i.imgur.com/VviiGhB.png http://i.imgur.com/bmLKIRX.png That is 3 methods of turning the preview ON |
Forgot to mention /gp/gpControl/camera/PV/2 gives 500 Internal Error. /camera/PV/2 is used in HERO2 and HERO3 cameras but not in HERO4, I think they just messed up (being GoPro, it does not surprise me at all) |
I used the app like you suggested. It shows me what you screenshotted. So is the answer to send a preview ON request after sending the stream request? |
I will need to reproduce everything in the right order later |
Ok, let me know when you do and I'll test it out. Thanks! On Wed, Jul 20, 2016 at 2:50 PM, Konrad Iturbe notifications@github.com
|
@ivanmkc have you gotten anything? just got home so I'll see if I can get a working stream |
I'd take a bet and say that maybe they keep preview alive by using /gp/gpControl/status every second? |
GoPro app also sends outdated or bad requests, such as the pairing success and the /camera/PV/2 from HERO3... why? |
Ya, I wonder if the outdated requests are actually being used for some Ivan On Sat, Jul 23, 2016 at 7:44 AM, Konrad Iturbe notifications@github.com
|
Got the preview working in FFplay after using the GoPro App on mobile. They still use udp 8554, although I didn't check any variable status in /gp/gpControl/status All its missing is a preview ON url |
Ah I should have mentioned that was what I was doing to get it working in On Mon, Jul 25, 2016 at 5:51 AM, Konrad Iturbe notifications@github.com
|
Hi guys, I am trying to get my Session to stream to an iOS app. I am able to stream for now but encounters some difficulties for it to stream easily. I am not able to stream immediately after turning the wifi of GoPro on but after I tried visiting gp/gpControl/status for several times it can start to stream. I don't know if this is the magic method to allow it to start streaming. Also, the python script I used sends the "GPHD:0:0:2:0.00000" command to keep it alive. Can I do it also on iOS? Thank you. |
I had my doubts regarding this but since you got it working I'll update the repo accordingly. The python sends a magic packet with that command, same as GoPro App, you need to find a library for ObjC that does that, such as this one (Not tested with Hero4 Session!) I'll confirm later on that the stream works with Hero4 Session on FFplay |
Your doc mentioned that the magic packet is as:
But the python script sent "GPHD:0:0:2:0.00000", are they the same? Is this command only used for keeping the streaming alive and I need to send a magic packet first for it to start streaming? |
@chengsam No they are not the same, I think that keeps the stream alive where as the magic packet turns on the camera |
OK, I can stream the preview to my app now. However, the delay is ~5s. Just figuring out how to reduce the latency. |
@chengsam didn't have time yesterday I was travelling, did you send /gp/gpControl/status GET request to start the stream? Are you on 2.00? |
Yes, I sent /gp/gpControl/status several times until the status 31 of the camera and it's not 0 to start the stream. But I'm not sure if it works all the time. And my version is 2.00. |
Can confirm it works with pinging /gp/gpControl/status 5 times. I only neeeded to HTTP GET the URL 5 times at the start and then run the stream on FFplay. I used this script and it worked. I'll push a PR to add HERO4 Session support and update the docs on this repo accordingly. Proof: http://imgur.com/a/PHtoi Closing thread. |
I found that sometimes it requires me to ping more than 5 times to make status 31 > 0. So in my implementation, i check for the count of status 31 and start the stream when it's not 0. |
@chengsam I'll write it then, thanks! |
Problem:
Livestream GET request has no effect.
Side-note: I would like to help investigate this. What's the best way to set up the packet sniffing on Android to do that? Thanks!
Details:
I sent the GET request:
http://10.5.5.9/gp/gpControl/execute?p1=gpStream&a1=proto_v2&c1=restart
I get the response:
{status: "0"}
Live stream mode does not start. I can confirm this by no change on the Hero 4 Session Display, as well as no UDP packet stream for video.
Hero 4 Session
v02.00
I sent the GET request:
http://10.5.5.9/gp/gpControl/execute?p1=gpStream&a1=proto_v2&c1=restart
Y
The text was updated successfully, but these errors were encountered: