How do I control the streaming frame rate of ffmpeg?

5

1

I am using ffmpeg to stream video:

ffmpeg -i $file -f mpegts udp://hostname:port

On another machine, I am using VLC to play the output stream. The problem I have is that VLC is playing the stream in a rate of 48 fps (instead of 24 fps).

I tried adding the -r 24 option but it seems to have no effect on the output.

How can I control ffmpeg output rate?

Aliza

Posted 2011-07-29T12:47:56.823

Reputation: 241

Answers

9

I found the answer for this: simply add the -re flag before the input.

From the ffmpeg documentation: -re Read input at native frame rate. Mainly used to simulate a grab device.

Aliza

Posted 2011-07-29T12:47:56.823

Reputation: 241