joshvillbrandt / goprohero

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

How can I stream in python? #21

Open ghost opened 8 years ago

ghost commented 8 years ago

Hi, This library is awesome! I would like to stream the recording images in my python interface.. is this possible?

Thank you so much

arpit1997 commented 8 years ago

@martamill3 Yeah it is possible but you have to write some additional codes for this here are some hints. There are many libraries available you can use gst-python also. There is another fmous library named python-requests A sample code which you can use:

>>> import requests
>>> url = <any url >
>>> r = requests.get(url, stream=True)

then pass this r object to any interface it will stream the video. Hope this helps :smile: :smile_cat:

ghost commented 8 years ago

Hi! I really don't get the point of how to stream the images in TKinter. I've OpenCV installed but when I pass the url (http://10.5.5.9:8080/gp/gpControl/execute?p1=gpStream&c1=restart) and the R object nothing appears and I don't get any error so I'm quite lost..

Thanks so much