VLC playback speed

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
fitnessgolfer
New Cone
New Cone
Posts: 1
Joined: 13 Nov 2018 04:04

VLC playback speed

Postby fitnessgolfer » 13 Nov 2018 04:24

I'm working on a program where a user will control the video playback speed within VLC via various user-worn sensor hardware. I am shooting video at 6o fps so that if the sensor input decreases the playback speed by 50% then the 30 fps will still be acceptable to the human eye. At high playback speeds I am getting video stuttering and freezing because I assume my CPU is overloaded by the high fps created. My questions:

1. If my video is shot at 60 fps does doubling the VLC video speed increase this to 120 fps, 4x to 240fps, 8x to 480fps etc.?

2. If so, is it possible to make VLC skip frames? i.e If I double the playback speed, VLC only shows every other frame and if I quadruple the playback speed it shows every fourth frame?

3. If this is not possible within VLC, because it is open source, do you think it is possible to write code that essentially keeps the video at 60 fps no matter how much the playback speed is increased, and achieves this by skipping frames?

garf
Developer
Developer
Posts: 132
Joined: 19 Jul 2017 09:38

Re: VLC playback speed

Postby garf » 13 Nov 2018 09:17

Hello,

1. In theory yes, except for example 480fps means VLC would have 2 milliseconds per picture to render and display it, which is (too) very short.
2. VLC already tries to skip frames when it considers to be late (compared to the audio). The problem is in modern codecs, frames are not equivalent: for example, "inter" frames depend on "key" frames to be decoded, which means if you skip some key frames, any other related frame cannot be decoded nor displayed.
You can ask VLC to skip frames that are not references for others with the command line parameter: "--avcodec-skip-frame 1" , but you cannot easily remove a percentage of frames.
3. As a consequence of 2., speeding up to 60fps is doable, lowering is hard.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 24 guests