KonradIT / gopro-py-api

Unofficial GoPro API Library for Python - connect to GoPro via WiFi.
MIT License
1.4k stars 211 forks source link

Camera hangs when Switching between Livestreaming and Photo mode #12

Open Prasanth90 opened 7 years ago

Prasanth90 commented 7 years ago

I am currently Hero 4 Session and my use-case is to stream the live feed and when the user clicks a button, I want to take a photo and resume the live feed.

I am able to stream the live feed gopro.stream("udp://127.0.0.1:1000", "high") and capturing the feed in the browser

I also wanted to take picture in the mid of the live streaming. I tried

1) gopro.take_photo(),

2) gopro.livestream("stop") gopro.take_photo() gopro.stream("udp://127.0.0.1:1000", "high")

But the camera hangs in both the cases, the ISBUSY flag is set indefinitely. (take_photo method doesn't return)

I am calling gopro.stream(.......) in a separate thread.

Environment:

Am I missing anything ?

Do I need to call any other function before calling the take_photo method ?

Any clue would be much helpfull

Thanks in Advance

KonradIT commented 7 years ago

Just did it with my HERO5 Black

Don't have the session working at the moment but it works here.

Prasanth90 commented 7 years ago

Thanks for replying

Please post here if you get sometime to make it work with Hero Session or HERO 4 Session

Just wanted to make sure whether I am doing it the right way

I called the following code in a separate thread since its a blocking call. gopro.stream("udp://127.0.0.1:1000", "high")

and I am calling gopro.take_photo() from the main thread.

Regards Prasanth

Prasanth90 commented 7 years ago

Update:

I am able to capture 4 to 5 images when the camera(HERO 4 Session) is in live streaming mode. After that it hangs.

The ISBUSY flag is set indefinitely.

Is there anyway where i can forcefully reset the ISBUSY flag ?

Please advice.

Regards Prasanth

KonradIT commented 7 years ago

Not really, if the camera is streaming you can take pictures in another terminal, see my video.

danigna77 commented 4 years ago

I am facing the same problem without streaming. I cant take a couple of pictures. Then the API freezes. How did you solve this @Prasanth90 ?