FFmpeg saves an mp4 file every 10 seconds for the rtsp stream, and the progress bar for the video is incorrect
I had some problems when I was programming with the FFmpeg API
I implemented this by changing the example remux.c. After writing the file header, read the packet. AVPacket wrote the trailer to the file for 10s, and then wrote the trailer to the av_write_trailer(ofmt_ctx). Then write the new file header again…
The program can successfully save the mp4 file, but the progress bar of the first MP4 file is 10s, the second is 20s, the third is 30s…. But only the first 10 seconds of the video can be played
Read more here: Source link
