How should I set the ffmpeg parameters to avoid delay?
To reduce delays in FFmpeg, you can try the following methods:
- Just Down原。
ffmpeg -re -i input.mp4 output.mp4
- Adjust the bitrate and frame rate of the output file to match those of the input file. For example, if the input file has a frame rate of 30fps, you can use the following command to set the frame rate of the output file to 30fps:
ffmpeg -i input.mp4 -r 30 output.mp4
One option could be:
You can set the video bitrate of the output file using the -b:v parameter, for example:
ffmpeg -i input.mp4 -b:v 2M output.mp4
- synchronization of vertical refresh率
- zero, one, two
ffmpeg -i input.mp4 -vsync 0 output.mp4
- -size of the buffer
ffmpeg -i input.mp4 -bufsize 10M output.mp4
These methods may need to be adjusted and tried according to specific situations in order to find the best setting that suits your needs.