You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
dathuynh1108
changed the title
format-location for splitmuxing
Format-location for splitmuxing
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:
The pipeline creates new file as I return in the callback but then crashes immediately. Can you help me find the problem, thanks!
The text was updated successfully, but these errors were encountered: