joshvillbrandt / goprohero

A Python library for controlling GoPro cameras over http.
Apache License 2.0
264 stars 57 forks source link

Add support for live preview with Hero 4 #8

Open 3v1n0 opened 9 years ago

3v1n0 commented 9 years ago

Hero4 has not the live/amba.m3u8 file anymore, to get live preview it's needed to do what is explained in this link.

joshvillbrandt commented 9 years ago

Awesome! Thanks for sharing this.

I don't have any immediate need for this myself. I might add it on a raining day or I'll also consider a pull request.

Thanks again!

joshvillbrandt commented 9 years ago

Copying the contents of the link here in case reddit blows up...

The new HERO4 Black and Silver edition cameras use a different, more powerful chip (ambarella A9). The traditional URL for HERO2/HERO3/HERO3+ http://10.5.5.9:8080/live/amba.m3u8 does not work for the new HERO4 camera. Here is how to get the live stream:

3v1n0 commented 9 years ago

Ah, and what the reddit page doesn't include is also that this is stopped by opening the URL

KonradIT commented 9 years ago

The reddit thread is mine (konrad-iturbe = KonradIT), its very easy to stream it using FFplay, just trigger the URL, and use FFplay to play it, after some seconds it stops, but if you open the URL again it continues. Use FFmpeg to save the stream, UNINTERRUPTED!!! Maybe use FFmpeg to re-stream to local host and use VLC/FFplay/media player to play local host. Just my 2 cents

3v1n0 commented 9 years ago

Do you have the command to use ffmpeg to stream it to localhost?

Also it would be nice to get a simple python client that is able to stream from udp://

FREDI5 commented 7 years ago

You can now live broadcast from your GoPro - https://www.yatko.com/live-streaming/gopro-live-streaming !! Follow this instructions !!

chri1389 commented 6 years ago

Hello! Is it possibile display live streaming in Android from a GoPro Hero 4 ? Can you help me, please?

Thank you very much!

Jpfonseca commented 6 years ago

@chri1389 there is app from GoPro available in Google Play that allows you to see the preview of the stream on your smartphone.

I have used @KonradIT 's solution on a Go Pro h4 (firmware version 1.00) and could see the live preview both on the smartphone(using the GoPro App) and on the pc(using ffplay)

chri1389 commented 6 years ago

@Jpfonseca I am sorry but I don't have explain the problem well :)

I need to develop an Android App that display live streaming from GoPro Hero4. Can you help me?

Thank you very much!

Jpfonseca commented 6 years ago

I have no knowledge in programming for Android, but I believe that your app will need at least :

->WiFi permissions for connecting to the camera

->a script to capture udp packets (the format of the video is MPEG-TS) and display them in a video container

-> a script to maintain the connection between the camera and the phone

After these requirements are working you can improve the video preview quality, etc.

Since the go pro seems to act like a Webservice(check this repo and KonradIT's) , you shouldn't have any problems using kotlin/Java to develop a app that has a video container and makes calls to this Webservice...