Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format-location for splitmuxing #60

Open
dathuynh1108 opened this issue Apr 29, 2023 · 1 comment
Open

Format-location for splitmuxing #60

dathuynh1108 opened this issue Apr 29, 2023 · 1 comment

Comments

@dathuynh1108
Copy link

dathuynh1108 commented Apr 29, 2023

Hello, i have a pipeline receive from rtspsrc and record to multi file by using splitmuxing:
rtspsrc location="__URL__" name=demux is-live=true demux. ! queue ! application/x-rtp ! rtph264depay ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,is-live=true ! x264enc bitrate=1024 speed-preset=ultrafast interlaced=true key-int-max=20 tune=zerolatency byte-stream=true name=encoder ! tee name=video_tee ! queue ! video/x-h264,stream-format=byte-stream ! h264parse ! appsink name=videosink sync=false video_tee. ! queue ! h264parse ! splitmuxsink name=splitmuxsink muxer=matroskamux location="/videos/record_%d.mkv"
i want to rename recording files to time.Now().UnixNano(). So i use format-location callback:

element, _ :=pipeline.GetElementByName("splitmuxsink")
element.Connect("format-location", func(
			this *gst.Element, index uint,
		) string {
			return fmt.Sprintf("/videos/%v.mkv", time.Now().UnixNano())
})

The pipeline creates new file as I return in the callback but then crashes immediately. Can you help me find the problem, thanks!

@dathuynh1108 dathuynh1108 changed the title format-location for splitmuxing Format-location for splitmuxing Apr 29, 2023
@RSWilli
Copy link

RSWilli commented Aug 24, 2023

@dathuynh1108 move this issue to https://github.com/go-gst/go-gst (where future development of the bindings will take place) if you think it is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants