Hoping someone can guide me to the right place. I have a application is being the "middle man" receiving a video stream from a source via UDP and passing this video stream to a ffmpeg instance on a server and record a certain period of the video (without audio), on a certain occasion it will need to play the video from recorded video instead of passing the live video stream to the ffmepg instance on the server.
/ffmpeg -an -f mpegts -i udp://@:7100/?fifo_size=2000&overrun_nonfatal=1 -analyzeduration 150 -f rawvideo -map 0:0 -vcodec rawvideo -pix_fmt bgra - -af volumedetect -vn -sn -dn -map 0:1 -f mpegts -y -flush_packets 0 udp://127.0.0.1:7208?pkt_size=1316
I managed to record the video without audio frm Extracting the h264 part of a video file (demuxing)
The difference is i save the recorded file as "mpegts"
avformat_alloc_output_context2(&ofmt_ctx_a, NULL, "mpegts", out_filename_a);
As soon i need to play from this recorded file, i read every 1316 packets from this file and pass it to the ffmpeg via the localhost port.
The problem is the ffmpeg seems doesn't like my recorded file and i noticed it has error msg "DTS 18635855 < 24133055 out of order"
How do i resolve this issue?
Thanks.