srs
srs copied to clipboard
Lost some last frames while streaming video to RTMP using FFmpeg
!!! Before submitting a new bug report, please ensure you have searched for any existing bugs. Duplicate issues or questions that are overly simple or already addressed in the documentation will be removed without any response.
Describe the bug Lost some last frames while pushing video to RTMP using FFmpeg. Only when the next video streaming begins will the last few frames of the previous video be streaming out.
Attempts to resolve the issue by disabling GOP cache, using -fflags nobuffer, -flags low_delay, and -flvflags no_duration_filesize parameters proved ineffective.
Version 5.x, 6.x, v5.0.60.
To Reproduce Steps to reproduce the behavior:
- ffmpeg -re -i 1.mp4 -c copy -f flv rtmp://127.0.0.1/live/123456, will lost some last frames of 1.mp4
- ffmpeg -re -i 2.mp4 -c copy -f flv rtmp://127.0.0.1/live/123456, will lost some last frames of 2.mp4
- When playing rtmp://127.0.0.1/live/123456 with VLC, you will notice that the last few frames of each video are missing.
Expected behavior Push the entire video stream, ensuring all frames are transmitted completely.
Screenshots None
Additional context None