Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Jul 31 '11 at 20:00

This question came from our site for professional and enthusiast programmers.

up vote 6 down vote accepted

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.

share|improve this answer
I was using ffmpeg on a RaspberryPi, and this also didn't help.. fps continues to drop till it reaches below 0 and streaming server stops receiving any stream – Sheikh Aman Oct 5 '14 at 17:38

Sheikh Aman, your problems sounds like it's because you are not consuming the stderr stream from ffmpeg and it gets backed up and everything stops working. I solved this problem using '-loglevel', 'quiet'

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.