26

There is a frame-by-frame playback on VLC (E key or view > advanced controls), which is very useful; but there is no way to use it backwards.

This is a long-time requested feature (at least since 2015); and I was wondering if it was part of VLC 3.0.

Does anyone know if this can be done?

7
  • 3
    Modern video relies on key frames and deltas from those key frames going forwards in time. Encoding can also use data from frames in the "future" to construct the frame to be played at that immediate time. Going forwards one frame relies on data from the previous frame as well as some extra data but going back a frame is more difficult as you have to reconstruct everything from the previous keyframe for each and every step back. You can't use the "current" frame data for a previous frame without a lot more work. I'm not surprised that this hasn't been implemented yet.
    – Mokubai
    May 17, 2018 at 9:29
  • 4
    Mokubai, you could simply limit it to N frames backward and cache them while you construct the frames as you go forward. sheesh Feb 9, 2021 at 2:30
  • 3
    @Mokubai That may have been a valid excuse a decade ago, but my >2 year old 3800X can decode 1080p video at 1266 fps or 232fps single-threaded. With a typical keyframe interval of 15, that's <65ms per seek from the last I-frame on 1 core. (Yes, I know latency != throughput; Add pipeline length to the keyframe interval and you'll still get a very reasonable delay)
    – Navin
    Sep 7, 2021 at 9:49
  • 5
    Hopefully this is someday implemented. Even the youtube web player supports this
    – JGurtz
    Sep 30, 2021 at 20:14
  • 2
    @JaydenLawson because video editing software is a completely different beast to video playing software. One decided to tackle a difficult problem because it is a necessary part of the workflow. Typically editing software will completely decode compressed video to raw frames that can easily go backwards and forwards while players would pass compressed video to their player libraries which have much simpler interfaces. If VLC only did software decoding and had control of all the decoding and playback buffers it might be easy, but VLC uses a lot of external libraries for playback.
    – Mokubai
    Sep 15, 2022 at 6:33

3 Answers 3

10

The VLC help says :

Unfortunately, VLC doesn’t support frame-stepping backwards; it’s only possible to move forward.

Other players may have a limited support for backward playing. This would be somewhat slow, because video files are usually constructed with the occasional full frame, while in-between frames only contain the difference.

Backward stepping would involve going back to the last full frame and then forward to the requested frame.

I found two posts that relate to your request :

These posts contain links to various players that are said to be able to step backward, but VLC is not one of them. You will need to test and see.

Because product recommendations are not allowed on our site, I cannot list these players here.

4
  • What about audio? Dec 10, 2019 at 12:15
  • 3
    "Backward stepping would involve " Wrong. That's only the (almost) most naive, non-smart approach. Dec 28, 2021 at 5:50
  • 2
    @JürgenA.Erhard: Your comment is incomplete without at least a link to the smart approach.
    – harrymc
    Dec 28, 2021 at 8:50
  • mpv with . and , requires some additional stuff, buffer, etc. So, it is kinda true. Feb 10, 2023 at 8:58
3

MPV can easily move one frame forwards or backwards with , & .. It is FOSS and available for Windows, Linux and MacOS. https://mpv.io/

1
1

Using a wrapper for VLC named Vlc.DotNet, I was able to write my own video player with the buttons and controls displayed just how I like it.

It calls the frame forward function, but I wrote my own method in my program to step backwards in the position in the video approximately one frame based on the number of frames per second of the media that is playing.

It does not work all the time. Sometimes, when you click the back frame button, nothing happens in the video. I am guessing that it has to do with Mokubai's comment above. BUT, it works most of the time, if you are trying to get to a particular frame.

If I may brag a little, I have buttons for jumping forward and backwards a configurable number of seconds. I have enhanced rate of playback controls that let you halve or double your speed as well as finer controls that can change the rate by a small amount and a numeric box to enter the rate you want. In addition, I have an enhanced time slider that lets you issue keyboard sequences to hop to any spot in the video by percentage by hitting 1-9 (10%-90%). I just like to make it how I like it!

3
  • 2
    If you re-encoded the file to uncompressed AVI then in theory you code go backwards. However, it would be a vastly larger, and your computer might not be able to handle the data rate.
    – cybernard
    Oct 23, 2018 at 20:24
  • 1
    If MPC can do it, how come VLC cannot? Oct 29, 2022 at 16:12
  • @BenjaminGoodacre Exactly, MPC has done it for YEARS.
    – GTS Joe
    Jun 24, 2023 at 16:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .