Open samrat opened 4 days ago
Hello @samrat !
Could you provide the input HLS stream that causes the trouble? I've tried to reproduce it with some example HLS and I didn't encounter the problem. I suspect that there might be some problem with the timestamps in the input HLS stream (but I am not sure why the problem goes away when you remove the transcoding part).
Just as a blind guess - as an experiment you can try setting the max_b_frames: 0
option in the Membrane.H264.FFmpeg.Encoder
to disable B-frames (and therefore to make sure that PTS always match DTS) as I suspect that a mismatch between these two might be the reason of the problem
I'm seeing HLS segments output by the HTTP Adaptive Stream plugin where there is a huge PTS & DTS jump:
Looks like the problem comes up because the durations in https://github.com/membraneframework/membrane_mp4_plugin/blob/2c439e6332be36b6100c926a642ed1d34d0b4664/lib/membrane_mp4/muxer/cmaf.ex#L725 are sometimes negative.
The video is coming from an HLS stream with MPEG-TS segments so the pipeline is:
The problem seems to arise at the ffmpeg decoder/encoder part because when I remove it, the problem goes away.
Here is the relevant section of my pipeline: