gopro / OpenGoPro

An open source interface specification to communicate with a GoPro camera with accompanying demos and tutorials.
https://gopro.github.io/OpenGoPro/
MIT License
707 stars 152 forks source link

Allow Encoding During Preview Stream #352

Open follesoe opened 1 year ago

follesoe commented 1 year ago

We are experimenting with the OpenGoPro APIs over USB.

If we issue /gopro/camera/shutter/start, while the preview stream is running (/gopro/camera/stream/start) it stops. After calling stop on the shutter /gopro/camera/shutter/stop, we have to also stop the non-working stream and re-start it every time.

The documentation does not mention that the preview stream will be unavailable if recording/triggering with the shutter. We are using a GoPro Hero 11 Mini, running firmware 2.0.

follesoe commented 1 year ago

Found this on the Home page describing the streaming option.. This is a major bummer, as we would love to use the preview stream while recording/taking photos.

Screenshot 2023-06-08 at 14 29 45
KonradIT commented 1 year ago

This is a known issue since a few generations back, at least Hero5 iirc.

follesoe commented 1 year ago

What about still pictures? Is it possible to capture still pictures without interfering with the live stream? We are testing with a GoPro Hero 11 Mini which doesn't support pictures, so have not been able to test yet.

cheind commented 7 months ago

@follesoe are you saying that you can sucessfully restart the preview stream after triggering the shutter? I'm testing this on a Hero12 using the WiredGoPro (USB) interface and it seems that the API reports a successful restart of the stream, but the client (ffplay or vlc) is not able to connect again.

aveary commented 7 months ago

would love a way to stream multiple cameras to a computer and start/shutter without interrupting the stream. This possible yet?

cheind commented 7 months ago

@follesoe are you saying that you can sucessfully restart the preview stream after triggering the shutter? I'm testing this on a Hero12 using the WiredGoPro (USB) interface and it seems that the API reports a successful restart of the stream, but the client (ffplay or vlc) is not able to connect again.

just figured out that works fine. one needs to switch to video mode for the preview to work. hence if you want cap a photo you need to: a) disable preview, b) switch photo, c) shutter, d) wait for ready, e) switch to video, f) enable preview

follesoe commented 7 months ago

good find @cheind thanks for updating.

tcamise-gpsw commented 6 months ago

It's good that you have all found a workaround but I will leave this ticket open as an enhancement request to allow encoding during preview stream.

follesoe commented 2 months ago

I also see that the documentation has been updated to reflect that preview streaming while recording is supported on Hero 12 and upwards.

pavlosharhan2 commented 1 month ago

@follesoe are you saying that you can sucessfully restart the preview stream after triggering the shutter? I'm testing this on a Hero12 using the WiredGoPro (USB) interface and it seems that the API reports a successful restart of the stream, but the client (ffplay or vlc) is not able to connect again.

just figured out that works fine. one needs to switch to video mode for the preview to work. hence if you want cap a photo you need to: a) disable preview, b) switch photo, c) shutter, d) wait for ready, e) switch to video, f) enable preview

Do you mean that for the workaround to work you need to stop the preview stream every time before recording a video or taking a photo?

I'm also experiencing an unrecoverable preview stream on HERO10 if i trigger during a preview. In my use case the lowest latency is highest priority, so waiting a couple of seconds for the stream to stop is a quite a bummer :(

cheind commented 1 month ago

@pavlosharhan2, yes I needed to stop the preview stream everytime before I could take a photo. At least this was the case for Hero12/firmware 2.0 I was using at the time. Not sure if anything has changed in the meantime?

About the latency: I observed that the preview stream lacks behind ~200ms, probably due to encoding.