Adding service & provider metadata

I’m using the Go “generated” bindings by @RSWilli and have a couple questions.

  1. Am I using the most complete commits?
require github.com/go-gst/go-gst v1.4.1-0.20260422122825-3754473356de
require github.com/go-gst/go-glib v1.4.1-0.20260319133722-f9cac05a5d55 // indirect
  1. How should I declare the following correctly?
func advertise_service(mux *gst.Element) {
	var (
		service *gst.MpegtsSDTService
		sdt     *gst.MpegtsSDT
		desc    *gst.MpegtsDescriptor
		section *gst.MpegtsSection
	)
	sdt = gst.Mpegts_sdt_new()
	// ete...
}

This doesn’t compile, but it would be a start if it did, because I need to insert metadata into an mpeg transport stream. For example, as can be done with ffmpeg by using the following tags…

   -metadata service_provider="MY-PROVIDER-NAME"
   -metadata service_name="MY-SERVICE-NAME" 

I’m very impressed with the effort @RSWilli has put into these bindings, with which I now have a complicated application up and running. But it won’t be useful until I’m able to add the service & provider metadata. Some help will be much appreciated.

Hi,

The mpeg-ts muxer doesn’t support adding multiplex-wide PSI (except for PAT). So inserting SDT is not supported.

I’m using the mpegtsmux plugin, so are you saying it’s not possible? The docs seem to imply otherwise: SI sections can be specified through a custom event

Regardless of the fact that this is not supported, the mpegts functions live in it’s own go package, as they are advertised as a separate library GstMpegts:

whoops. you’re right. That example should indeed work (forgot well defined sections had a PID defined in them).

Congratulations on your big merge, and thank you for all the effort that’s made this possible. I immediately switched and it just works!.

And thanks for the NewSTD() function, even though I haven’t yet figured out how to use it - whilst feeling even more confused whether it’s possible to insert service_name and service_provider into my UDP MPEG TS, or not.