How to display the number of frames per second in mplayer

19,000

Solution 1

Sounds as if you are interested in benchmarking, try the -benchmark option.

From the ubuntu man page

-benchmark
Prints some statistics on CPU usage and dropped frames at the end of playback. Use in combination with -nosound and -vo null for benchmarking only the video codec. NOTE: With this option MPlayer will also ignore frame duration when playing only video (you can think of that as infinite fps).

mplayer -benchmark -nosound -vo null your_file

Solution 2

If you are using the open source drivers, you can use GALLIUM_HUD=fps <program> to display the FPS. I personally use mpv rather than mplayer, so for me that would be GALLIUM_HUD=fps mpv <video>

Share:
19,000
puk
Author by

puk

Updated on September 18, 2022

Comments

  • puk
    puk almost 2 years

    Is there a command (either a command line option, or a navigation command) to display the number of frames per second of the playing movie?

    I am testing to see if my computer is slow (ie running at less than 30 fps) or if the video was sampled poorly.

    Note: I did try to 'google it', but googling for 'mplayer' and 'fps' returns how to set the desired number of frames per second.

  • puk
    puk over 12 years
    that's exactly what I was looking for! Yet it doesn't at all do what I want. Where is the information displayed? I was hoping it would be displayed either on the movie, or in the console, but it doesn't appear anywhere. Also, the fps is indicated in the console, but I believe that's the intended frame rate, not the actual rate
  • Panther
    Panther over 12 years
    It will print stats at the end of the playback. What is it you are trying to benchmark exactly ? If you start mplayer from the command line I believe it displays FPS in the terminal.
  • puk
    puk over 12 years
    My video is choppy and I want to know if it's due to low performance or low video quality. The FPS is displayed in the terminal, but it is exactly 24.000 fps. I am assuming this is the intended frame rate. Surely at some point the frame rate will drop below 24.000
  • Panther
    Panther over 12 years
    Is the playback choppy with only a single file, or all files ? What video card do you have ? I am not sure how benchmarks are going to help you debug your problem.
  • puk
    puk over 12 years
    It's mostly choppy with 720p files, but I think it has to do with the fact that they are 25 fps