matroskamux : frames lost due to "invalid" pts (value -1) in gst_matroska_mux_handle_buffer but were not Invalid PTS before sending to matroskamux
I have created a pipeline to record rtsp from h264 cameras that worked on the gstreamer 1.4.4 version and that now not working with 1.18.6. Here is the pipeline with all his GstElements : rtspsrc ! rtph264depay ! typefind ! identity ! h264parse ! capsfilter ! tee ! queue ! typefind ! queue2 ! matroskamux ! filesink location = "../xxxx.mkv.
My camera is an axis with those parameters : FPS = 25 , P_Frame = 25 and H264 Encoding. I use a personnal segmentDuration = 1s (for particular use) to create an mkv file every 1s. What I see in the output of matroskamux is 6 lost frames on 25 expecteed. So I Have an xxxx.mkv file in my filesink with FPS = 20. Those frames are every time the 6 first ones. If I set a superior segmentDuration like for instance 10s I observe a drop of 4 or 5 frames on 250 (here also the 4 or 5 first frames). Maybe it can be caused by the EOS ? don't know.
Setup
- Linux LFS
- GStreamer Version: 1.18.6
Solutions I have tried : I put log on the srcProbe of queue2. Here is the PTS of the buffer passing through this queue 2 with segment duration = 1s and FPS = 25 frames , H264 :
I put log directly in matroska-mux.c and I have this output in the function gst_matroska_mux_handle_buffer :
Here are the compressed logs of my problem : gstreamer.log.xz