hybridgroup / gocv

Go package for computer vision using OpenCV 4 and beyond. Includes support for DNN, CUDA, OpenCV Contrib, and OpenVINO.
https://gocv.io
Other
6.67k stars 865 forks source link

Expose apiPreference and int fourcc in VideoWriter Constructor #690

Closed jhhurwitz closed 4 years ago

jhhurwitz commented 4 years ago

Hello,

It seems currently the only way to create a VideoWriter is through the C.VideoWriter_Open function.

It would be great to expose a function that allows a user to specify the apiPreference (in my case to force CAP_GSTREAMER) and the fourcc as an int (to allow for fourcc=0) when constructing the VideoWriter.

I was able to use such a function I created locally to make gstreamer video writing work consistently with gocv.

Happy to open a PR if that makes sense.

Thanks for the awesome library!

deadprogram commented 4 years ago

Hi @jhhurwitz that sounds like a good enhancement. Right now I think you can only do this for input by using the arcane GStreamer syntax as a string passed to the camera.

We would be really happy to get a PR that added this!

nibbleshift commented 4 years ago

Is there any status on this? I'd like this functionality. If you need a PR, i could look into integrating this functionality.

jhhurwitz commented 4 years ago

@nibbleshift, unfortunately, some things changed recently with me, and I am unable to work on this right now. Would definitely be happy to see a PR, though.

nibbleshift commented 4 years ago

Thanks for the update. I will look into getting this done.

On Fri, Jul 24, 2020 at 1:20 PM jhhurwitz notifications@github.com wrote:

@nibbleshift https://github.com/nibbleshift, unfortunately, some things changed recently with me, and I am unable to work on this right now. Would definitely be happy to see a PR, though.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hybridgroup/gocv/issues/690#issuecomment-663645159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJDHPWWWWS3CPKU4XVYIISDR5G7HDANCNFSM4NTLLOIA .

nibbleshift commented 4 years ago

hi @deadprogram, i submitted PR https://github.com/hybridgroup/gocv/pull/718

If there are any changes you would like in the PR, let me know and I'll make them.

deadprogram commented 4 years ago

I just merged #739 which appears to have done the same sort of thing as #718

@nibbleshift thank you anyhow for the contribution it is appreciated!

Marking this issue for next release.

deadprogram commented 4 years ago

This has now been released so closing. Thanks!