Python VLC MediaPlayer - Getting FPS Last Updated : 10 Apr, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article we will see how we can get the fps i.e frame rate per second in the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediaPlayer object is the basic object in vlc module for playing the video. We can create a MediaPlayer object with the help of MediaPlayer method. Frame rate is the frequency at which consecutive images called frames appear on a display. The term applies equally to film and video cameras, computer graphics, and motion capture systems. Frame rate may also be called the frame frequency, and be expressed in hertz. In order to do this we will use get_fps method with the MediaPlayer object Syntax : media_player.get_fps() Argument : It takes no argument Return : It returns float Below is the implementation Python3 # importing vlc module import vlc # importing time module import time # creating vlc media player object media_player = vlc.MediaPlayer() # media resource locator mrl = "death_note.mkv" # setting mrl to the media player media_player.set_mrl(mrl) # start playing video media_player.play() # wait so the video can be played for 5 seconds # irrespective for length of video time.sleep(5) # getting fps value = media_player.get_fps() # printing fps print("Frame Rate per Second : ") print(value) Output : Frame Rate per Second : 23.976215362548828 Another example Below is the implementation Python3 # importing vlc module import vlc # importing time module import time # creating vlc media player object media_player = vlc.MediaPlayer() # media resource locator mrl = "1.mp4" # setting mrl to the media player media_player.set_mrl(mrl) # start playing video media_player.play() # wait so the video can be played for 5 seconds # irrespective for length of video time.sleep(5) # getting cursor co-ordinates value = media_player.video_get_cursor() # getting fps value = media_player.get_fps() # printing fps print("Frame Rate per Second : ") print(value) Output : Frame Rate per Second : 29.969999313354492 Comment More infoAdvertise with us Next Article Python VLC MediaPlayer - Getting Play Rate R rakshitarora Follow Improve Article Tags : Python Python vlc-library Practice Tags : python Similar Reads Python VLC MediaPlayer - Getting Cursor In this article we will see how we can get the cursor position in the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediPlyer object is the basic obje 2 min read Python VLC MediaPlayer â Getting Scale In this article we will see how we can set scale to the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediPlyer object is the basic object in vlc modu 2 min read Python VLC MediaPlayer âGetting Audio Delay In this article we will see how we can get audio delay to the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediPlyer object is the basic object in vl 2 min read Python VLC MediaPlayer â Getting Track Count In this article we will see how we can get track count of the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediPlyer object is the basic object in vl 2 min read Python VLC MediaPlayer - Getting Play Rate In this article we will see how we can get media play rate of the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediaPlayer object is the basic object 2 min read Python VLC MediaPlayer â Getting Media Role In this article we will see how we can get role of the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediPlyer object is the basic object in vlc modul 2 min read Like