The Go bindings for gstreamer use the cgo package, making necessary to link against static C libraries. Obviously, I don’t want to compile the entire gstreamer sources, so is there an easy way, or bash script, to build a Go static binary using only what’s required. To be honest, I’m out of my depth and need help.
ping @RSWilli any thoughts on this?
This is not as straight forward as it initially sounds, see:
- Using gstreamer-full in a Rust project
- Draft: meson: Full static linking of gstreamer-full (!7624) · Merge requests · GStreamer / gstreamer · GitLab
This is not a limitation of the go bindings, but of gstreamer itself. We are facing the same challenges as the Rust bindings.
Regardless of how this will be implemented in the future, I do think that you will need to compile your own version of gstreamer. Currently gstreamer does not support it though.
The GStreamer project started back in 2001, and I’m too old to wait another 25 years, so I’ll try my luck with ffmpeg. There are Go bindings available for both ffmpeg and libavc, but these are outdated and unmaintained. Seems the only option will be exec.Command and Start…