diff --git a/machinery/src/capture/gortsplib.go b/machinery/src/capture/gortsplib.go index 370866d..b37f137 100644 --- a/machinery/src/capture/gortsplib.go +++ b/machinery/src/capture/gortsplib.go @@ -721,6 +721,9 @@ func (g *Golibrtsp) Start(ctx context.Context, streamType string, queue *packets configuration.Config.Capture.IPCamera.PPSNALUs = [][]byte{g.VideoH264Forma.PPS} log.Log.Warning("capture.golibrtsp.Start(main): fallback PPS set from keyframe") } + if len(configuration.Config.Capture.IPCamera.SPSNALUs) == 0 || len(configuration.Config.Capture.IPCamera.PPSNALUs) == 0 { + log.Log.Warning("capture.golibrtsp.Start(main): SPS/PPS still missing after IDR keyframe") + } } if len(filteredAU) <= 1 || (!nonIDRPresent && !idrPresent) { diff --git a/machinery/src/capture/main.go b/machinery/src/capture/main.go index bdc591a..fa9a60c 100644 --- a/machinery/src/capture/main.go +++ b/machinery/src/capture/main.go @@ -279,6 +279,9 @@ func HandleRecordStream(queue *packets.Queue, configDirectory string, configurat ppsNALUS := configuration.Config.Capture.IPCamera.PPSNALUs vpsNALUS := configuration.Config.Capture.IPCamera.VPSNALUs + if len(spsNALUS) == 0 || len(ppsNALUS) == 0 { + log.Log.Warning("capture.main.HandleRecordStream(continuous): missing SPS/PPS at recording start") + } // Create a video file, and set the dimensions. mp4Video = video.NewMP4(fullName, spsNALUS, ppsNALUS, vpsNALUS, configuration.Config.Capture.MaxLengthRecording) mp4Video.SetWidth(width) @@ -499,6 +502,9 @@ func HandleRecordStream(queue *packets.Queue, configDirectory string, configurat ppsNALUS := configuration.Config.Capture.IPCamera.PPSNALUs vpsNALUS := configuration.Config.Capture.IPCamera.VPSNALUs + if len(spsNALUS) == 0 || len(ppsNALUS) == 0 { + log.Log.Warning("capture.main.HandleRecordStream(motiondetection): missing SPS/PPS at recording start") + } // Create a video file, and set the dimensions. mp4Video := video.NewMP4(fullName, spsNALUS, ppsNALUS, vpsNALUS, configuration.Config.Capture.MaxLengthRecording) mp4Video.SetWidth(width)