Frame-by-frame forward/reverse

Feature requests for VLC.
Keatah
Blank Cone
Blank Cone
Posts: 20
Joined: 06 Jun 2015 06:12

Frame-by-frame forward/reverse

Postby Keatah » 06 Jun 2015 06:21

Frame-by-frame forward & reverse buttons would be a nice thing to have. As it stands now, the step forward and step backward buttons don't do frame by frame.

hobbes
Blank Cone
Blank Cone
Posts: 38
Joined: 28 Mar 2010 17:19

Re: Frame-by-frame forward/reverse

Postby hobbes » 06 Jun 2015 10:18

Frame-by-frame forward is already there as a shortcut key ("Next Frame" in the hotkeys preferences).

Reverse is difficult to implement because of the way video is compressed. The file contains one full video frame, then a series of data blocks that only contain the differences between one frame and the next. So for "Previous frame" to work, you'd have to buffer all those intermediate frames, which would be a huge performance hit.

goeckerd
New Cone
New Cone
Posts: 1
Joined: 08 May 2016 02:44

Re: Frame-by-frame forward/reverse

Postby goeckerd » 08 May 2016 02:53

I am in need of this feature also. What if you only buffer full frame images when single frames are stepped forward? I think this will offer a working solution for most people. Usually when you need to step back is when you have stepped forward too far. There could be step forward and back buttons where the step back button would be grayed out until you have stepped forward.

drwin
New Cone
New Cone
Posts: 8
Joined: 12 May 2016 03:16

Re: Frame-by-frame forward/reverse

Postby drwin » 13 May 2016 05:45

"Next frame" is OK, but slow and painstaking.
How about allowing the right arrow key on the keyboard to advance the frames? One press = one frame; holding the arrow key down would continue to advance the frames at a slow, frame-by-frame rate.
The left arrow key on the keyboard could be used to run the video in reverse (in case you overshoot the frame you're looking for).
This is a great way to scroll through a video to find the perfect frames for frame caps.

YankeePappa
Blank Cone
Blank Cone
Posts: 10
Joined: 25 Nov 2012 05:34

Re: Frame-by-frame forward/reverse

Postby YankeePappa » 16 Aug 2016 04:03

"you'd have to buffer all those intermediate frames, which would be a huge performance hit"

Really? A few hundred frames? That would tax the system? Then how does Adobe Premiere do it so well?

This is one good way for an upstart media player to knock VLC off its throne.

4REEE
New Cone
New Cone
Posts: 8
Joined: 09 May 2014 00:01

Re: Frame-by-frame forward/reverse

Postby 4REEE » 22 Aug 2016 22:58

I'm just going to take a wild guess that the reason why vlc developers have not implemented a fwd/rev, frame-by-frame feature is that they personally have not had a need for it.

I like to shoot weddings and capturing "the moment" and getting snapshots from video is so crucial. Snapshots from video has become more and more important as the resolution of videos has increased dramatically. I've been doing snapshots from videos since even when resolution was 480x360. Now with 4K... WOW! And 8K is sneaking around the corner!!!

This video by Canon pretty much shows how important capturing the moment has become with 4K:

https://www.youtube.com/watch?v=nRDIV0trv_Q

The best implementation that I have seen of the fwd/rev, frame-by-frame feature is MAGIX's Movie Edit Pro 2016. They have a jog wheel that you can enable to hit that exact moment. The problem with making a snapshot with Movie Edit Pro is that you have to go through quite a lengthy mouse and keystroke process to save a file:

File --> Export Movie --> Single frame as jpeg --> then give a file name --> click OK

Another problem is that Movie Edit Pro doesn't read nearly as many video file types as vlc can.

Anyway, the way vlc does the snapshot is way easier in terms of file naming. I have assigned the hotkeys "e" as the next frame, and "f" as the snapshot. As for the file naming prefix, I could have, say, "Bouquet Toss-" and then have vlc automatically do the numerical incrementing of the file.

All I have to do then is hit eeeee f eeee f e f e f eeeee f and I have captured the critical snapshots of the bouquet toss. UNFORTUNATELY, as others have experienced, sometimes I hit the next frame button too much and overshoot the critical point. Argghhhh! Then I have to go back and retrace those last few steps again.

And of course, vlc can read LOTS of different video file types.

The request for this feature has been made for quite some time now, and since the developers don't personally see a need for a fwd/rev, frame-by-frame feature, I just don't think it's going to get implemented in vlc anytime soon.

As for the technical programming aspect of it, it obviously can get done because MAGIX has done it, and as YankeePappa mentioned, Adobe has done it too.

*

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Frame-by-frame forward/reverse

Postby Jean-Baptiste Kempf » 25 Aug 2016 11:46

You are comparing video editors that takes Gigabytes of RAM and video player, that takes a few 100MB...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

4REEE
New Cone
New Cone
Posts: 8
Joined: 09 May 2014 00:01

Re: Frame-by-frame forward/reverse

Postby 4REEE » 03 Sep 2016 07:35

You are comparing video editors that takes Gigabytes of RAM and video player, that takes a few 100MB...
True that.

I'm disappointed that a video editor that takes gigabytes of RAM could make the workflow so long.

But I'm hoping that one of the developers for vlc could come up with coding that can do a frame-by-frame reverse, because the workflow is quite decent (except when the user overshoots the critical point).

So close, yet so far.

4REEE
New Cone
New Cone
Posts: 8
Joined: 09 May 2014 00:01

Re: Frame-by-frame forward/reverse

Postby 4REEE » 06 Sep 2016 11:29

All I have to do then is hit eeeee f eeee f e f e f eeeee f and I have captured the critical snapshots of the bouquet toss.
I forgot to mention that sometimes hitting the "e" key too many times to go to the next frame results in vlc freezing. Not sure what's causing that.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Frame-by-frame forward/reverse

Postby Jean-Baptiste Kempf » 28 Sep 2016 22:59

All I have to do then is hit eeeee f eeee f e f e f eeeee f and I have captured the critical snapshots of the bouquet toss.
I forgot to mention that sometimes hitting the "e" key too many times to go to the next frame results in vlc freezing. Not sure what's causing that.
I have a patch for this.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Rémi Denis-Courmont
Developer
Developer
Posts: 15257
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Frame-by-frame forward/reverse

Postby Rémi Denis-Courmont » 30 Oct 2016 17:00

Forward frame-by-frame is implemented, and it's been for quite a few years. But it's very buggy because the VLC buffer and flow control code was really not designed for that purpose. Unfortunately, fixing that properly is a massive undertaking that nobody has had the time and courage (and salary) for.

Reverse frame-by-frame is impossible. It simply is not feasible within bound and reasonable computational, memory and bandwidth limits because video codecs and container formats are not meant to be played in reverse.

Sure, professional tools do it. But there are two big differences:
  • VLC consumes a lot less resources (typically).
  • VLC supports all sorts of video codecs and file formats.
Professional editing software typically only works with specific file formats and video codec profiles that are precisely meant for the purpose of supporting frame-by-frame.

To make it work with normal video files, in general, VLC would have to re-read the file from the beginning for every frame.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

sps
New Cone
New Cone
Posts: 1
Joined: 03 Nov 2016 06:34

Re: Frame-by-frame forward/reverse

Postby sps » 03 Nov 2016 06:44

This is speaking as someone who doesn't know anything about coding so don't shoot me down too hard here.

A lot of people are saying that for that you need high end commercial/professional software, video editors, and such like, but nobody seems to point out that Media Player Classic (MPC-HC) has been able to do forward and back frame stepping for quite some time. That's free, and open source too. And supports a ton of video formats. And is low on resource usage.

Logically beause you obviously can't go back one frame with the way normal video compression works, it must be stepping back to the first full video frame, key frame, i frame, whatever the proper term is, then encoding forward to "current frame - 1"

Again I might be way off there, but it's just a thought.

Just checked and while playing a 5.5GB 1080p file, MPC manages to use less than 100MB of RAM, even when stepping forward and backwards.

Is there no way this can be done? I keep seeing 'impossible' mentioned any time this comes up, but patently it is possible. VLC can just play things like Blu Ray discs more easily than other players, this is why people ask, I think.

Rémi Denis-Courmont
Developer
Developer
Posts: 15257
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Frame-by-frame forward/reverse

Postby Rémi Denis-Courmont » 03 Nov 2016 22:12

Logically [because] you obviously can't go back one frame with the way normal video compression works, it must be stepping back to the first full video frame, key frame, i frame, whatever the proper term is, then encoding forward to "current frame - 1"
Not all file formats support accurate seeking efficiently. In general, you still need to parse the file linearily from the beginning to get an accurate backward change of time position. And frankly, I wouldn't call decoding everything from the last keyframe as an "low on resource", even if the file formart supports accurate seeking more efficiently.

Now if we assume that:
  • the file format supports accurate seeking efficiently,
  • the video is encoded with reasonably frequent key frames,
  • and the system is powerful enough to decode a full group of picture faster than the user will skip frames
then, sure, it is theoretically possible to seek backward and with that, implement step-by-step previous frame.

But how do you explain the above constraints to typical users?
And who will spend the time or money to implement all of that in VLC? (Realistically, this requires quite a few developer-months or tens of thousands of euros.)
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

aitte
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 28 Feb 2012 00:26

Re: Frame-by-frame forward/reverse

Postby aitte » 05 Nov 2016 20:42

Logically [because] you obviously can't go back one frame with the way normal video compression works, it must be stepping back to the first full video frame, key frame, i frame, whatever the proper term is, then encoding forward to "current frame - 1"
Not all file formats support accurate seeking efficiently. In general, you still need to parse the file linearily from the beginning to get an accurate backward change of time position. And frankly, I wouldn't call decoding everything from the last keyframe as an "low on resource", even if the file formart supports accurate seeking more efficiently.

Now if we assume that:
  • the file format supports accurate seeking efficiently,
  • the video is encoded with reasonably frequent key frames,
  • and the system is powerful enough to decode a full group of picture faster than the user will skip frames
then, sure, it is theoretically possible to seek backward and with that, implement step-by-step previous frame.

But how do you explain the above constraints to typical users?
And who will spend the time or money to implement all of that in VLC? (Realistically, this requires quite a few developer-months or tens of thousands of euros.)
i´m also 100% with you.

i´m not a developter only a systems integrator.
So my job is to get the PC working and i also have to look for software that does the job, that has to be done.

It would be nice if you don´t del this thread or posting to the other Software that does this particular job.
I also said they do a good job. Only good not perfect. ;-) Your concerns that there are so many different files types out there is absoluty correct.
Some files have problems skipping backwards.

And the VLC for sure does play a lot files but not all !
https://forum.videolan.org/viewtopic.php?f=14&t=135327 ( one samplefile is still online http://www39.zippyshare.com/v/GWA14jeq/file.html uploaded by Xcoder)

bye bye

dgm3333
New Cone
New Cone
Posts: 2
Joined: 22 Feb 2013 13:36

Re: Frame-by-frame forward/reverse

Postby dgm3333 » 08 Nov 2016 23:29

Thanks so much aitte, I've been wanting a frame by frame reverse for ages since I often extract frames from our home movies to 'summarise' the video, make slideshows for later viewing, and even with 1080 and 4k images I now put images into a calendar to be printed. However it's really hard to get the best frame when you can only go forward - MPC does a brilliant job - slight lag in reverse cf forward, but so much faster than trying to drag the seek bar back and step forward one frame less than last time. I have no idea how much resource it uses and I don't care, my computer can reverse in approx 1/4 of a sec/frame which is easily fast enough for me
It's also only 2 keystrokes (approx 1/2 a sec slower than VLCs 1 keystroke). And the F+R are controllable with keystrokes!
I have a new favorite media player!!

tragicmagic
New Cone
New Cone
Posts: 5
Joined: 10 Nov 2017 22:23

Re: Frame-by-frame forward/reverse

Postby tragicmagic » 10 Nov 2017 22:26

If you install the Jump to time (Previous frame) v2.1 VLC extension and modify the lua script, you can use alt+b and alt+f to move back/forward one frame at a time.

https://addons.videolan.org/default/hiv ... ent/156396

After installing, change the following two sections of script in the lua file:

jumps = { -- drop-down list
{"1/FPS", "vlcfps"},
{"2 sec", 2},
{"20 sec", 20},
-- {"30 sec", 30},
{"1 min", "1:00"},
{"5 min", "5:00"},
{"10 min", "10:00"},
{"1/2 sec", 0.5},
{"1/x", "reciprocal"},
{"1/23.976", 1/23.976},
{"1/24", 1/24},
{"1/25", 1/25},
{"1/29.97", 1/29.97},
{"1/30", 1/30},
{"1/60", 1/60},
}

AND

function activate()
Create_dialog()
click_Get_time()
click_Use_jump()
end

Now when you launch a video in VLC, hit alt+i, up-arrow twice (or until you have the Jump to Time extension highlighted in the menu), enter, then you can use alt+b/alt+f to move back/forward one frame at a time.

Someday, when I'm more familiar with VLC extensions, maybe I'll figure out how to enable and launch the extension dialog by default, or with one simple hotkey. But until then, this at least makes the functionality possible, and easy enough to enable/use.

10years2late
New Cone
New Cone
Posts: 3
Joined: 15 Aug 2020 05:24

Re: Frame-by-frame forward/reverse

Postby 10years2late » 15 Aug 2020 05:43

Sorry to "Necropost", but for anyone reading this in 2020, the website for the plugin is down. I found a working version here:
https://addons.videolan.org/p/1154013
Just install the version for VLC 3 and it should work fine. It is a very imperfect piece of software but whatever.

Frankly, after all this talk about video encoding, I still just don't understand why this is so hard to implement. It's Current Year, for god's sake! Even YouTube has implemented this. MPC-HC has also done it. The plugin above can do it within ~20 kilobytes - I've tried it and there's zero performance hit. Surely you can just copy how they did it?

Rémi Denis-Courmont
Developer
Developer
Posts: 15257
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Frame-by-frame forward/reverse

Postby Rémi Denis-Courmont » 15 Aug 2020 08:35

Yeah, you don't understand. And yet you taunt people. That's going to get things working. Not.

If it's so easy, how about you do it? VLC is open-source.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

10years2late
New Cone
New Cone
Posts: 3
Joined: 15 Aug 2020 05:24

Re: Frame-by-frame forward/reverse

Postby 10years2late » 15 Aug 2020 14:36

Fair point. I was just really annoyed that VLC doesn't have this, seeing as it's *this* close to being the perfect media player. I hate unsolvable problems. I'm sure there's some very good reason for this that goes way over my head.

Unfortunately even rereading all the explanations here, it still just does not make logical sense to me. It seems like it's because in order to skip backwards one frame you'd have to load every frame from either the first frame of the entire video or the last keyframe - you said earlier it's impossible as it would have to read everything from the beginning, then revised that to that it's because it would have to read from the previous keyframe. The keyframe explanation seems to fit with YouTube's ability to do that, seeing as it reencodes everything into it's own format that plays better with browsers (VP9?), so it can make sufficient keyframes.

Assuming my understanding of the keyframe explanation is more or less the correct one, that leaves keyframes and the concept of "accurate seeking efficiently" in the way of this proposed feature. A lot of the latter really goes over my head and I can't find much online regarding it, but I'll take it to mean that only some file formats inherently support skipping individual frames without using more RAM than 100 Chrome tabs. But if this is correct, then what file formats would those be? I've tried playing a variety of file formats with competing software like MPC-HC and even with very jankily encoded video in all sorts of crazy codecs (did you know Microsoft made a creatively named codec back in the 90s?) the frame skip feature works flawlessly forwards and backwards in stuff like MPC-HC. I can't seem to find a codec that doesn't support frameskipping in other software, and I certainly looked. It doesn't seem like this is much to do with the files themselves.

Assuming the above is more or less correct - which I highly doubt, and encourage anyone reading to correct me on - then that leaves me with a much simpler explanation. I saw you mention how the forward skip feature is very buggy because of an inherent flaw with VLC, so maybe that's why - there's just something about the way VLC is built that makes skipping back a frame impossible. I would totally get that, and am certainly not expecting anyone to put time and effort into fixing it just for that small feature - I'd just love some closure so I can walk away from this understanding why it's impossible, and hopefully someone else can read that and not have to make another thread regarding this.

glentek
New Cone
New Cone
Posts: 1
Joined: 17 Aug 2020 20:59

Re: Frame-by-frame forward/reverse

Postby glentek » 17 Aug 2020 21:49

I was a software engineer for 35 years. I agree with 10years2late. When people see a "Next Frame" function, they expect to see a "Previous Frame" function. The fact that the Mederi's "Jump to time Previous frame v3" extension provides a "Previous Frame" function with only 17 kb of lua code indicates that would be possible and probably "easy" (for programmers) to provide "Previous Frame" in VLC. I am enjoying my retirement so I won't be one of those programmers. The extension is lightning fast (on my Athlon 5350 APU), and I doubt that any horrendous processing or reprocessing is occuring. That being said, I appreciate VLC's other bells and whistles, and the fact that it costs no money. I find that Mederi's "Jump to time Previous frame v3" extension does what I need. It also has the benefit of not having VLC's problem of sporadically allowing only about 10 "Next Frames", and then nothing....

So, I was frustrated by the VLC's lack of "Previous Frame", but reminded myself that VLC is free so hey whatever, and then found Mederi's "Jump to time Previous frame v3" extension, so now I'm happy using VLC. Thanks!

hpcampr2
Blank Cone
Blank Cone
Posts: 13
Joined: 21 Dec 2009 15:06

Re: Frame-by-frame forward/reverse

Postby hpcampr2 » 02 Oct 2020 21:28

I've been using frame by frame backwards and forwards on smplayer for years. It's my video player of choice but today I was using VLC PLayer because it allows cropping which smplayer doesn't. Now I've been reading this thread as I was trying to step a frame back. I know nothing about any sort of "coding" so the commands and explanation of how to do this were not something I was looking forward to getting into. However, I clicked on the updated link https://addons.videolan.org/p/1154013 and got a stern security warning from Firefox so I'll leave this for now.

shape5
Blank Cone
Blank Cone
Posts: 21
Joined: 27 Nov 2020 06:52

Re: Frame-by-frame forward/reverse

Postby shape5 » 28 May 2021 20:18

Quicktime Player for Mac had both forward and reverse frame-by-frame playback working fine since the 90s with any video file that would open in the player (and most file formats were made compatible with the Perian component), so I’m not sure why reverse would be nearly impossible to implement – though I don’t have coding/dev knowledge. As a next best alternative, would it not be feasible to make new hotkeys that move the playback bar position back/fwd at the smallest possible increment?

@hpcampr2: You can most likely ignore that default Firefox warning as videolan.org is not a malicious site and the addons link is a subdomain of it (like this forum). As with spam, a lot of legitimate, trustworthy sites get blocked.
Last edited by shape5 on 29 May 2021 17:48, edited 1 time in total.

Lotesdelere
Cone Master
Cone Master
Posts: 9942
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Frame-by-frame forward/reverse

Postby Lotesdelere » 29 May 2021 12:06


Dorraj
New Cone
New Cone
Posts: 2
Joined: 27 Aug 2021 05:05

Re: Frame-by-frame forward/reverse

Postby Dorraj » 27 Aug 2021 05:18

Hopped on here because this (and a few other missing features) is one of the reasons I have a hard time switching to VLC. Potplayer has this feature on all codecs, it just works. It isn't perfect, but it works. I (very often) clip parts of video that I am watching with handbrake, and second-increments are not specific enough, I need exact frames, and Potplayer has that ability, I can skip both forward and back fame-by-frame and it tells me which frame I am on. Unfortunately VLC only has a forward option and the fact that we're told it's "impossible" despite another video player having the exact feature irks me a bit. Potplayer has really crapped the bed these past couple years, they even added an annoying little popup when you start video, so I was excited to leave it for VLC, but potplayer just has so many extra features that I never knew I used so often, like the frame skip feature. Really wish this "impossible" feature was implemented.

Rémi Denis-Courmont
Developer
Developer
Posts: 15257
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Frame-by-frame forward/reverse

Postby Rémi Denis-Courmont » 27 Aug 2021 16:33

Sigh. Is it hard to understand that backward compressed video playback is generally impossible, albeit possible with varying degree of computational, memory and coding complexity in some particular cases?

From experience, it is known that a feature that does not always work will trigger user complaints. It took only a day or so to implement forward step-by-step on top of existing forward playback. It would take many months to implement step-by-step backward playback. No volunteer VLC developer is willing and mentally and financially able to spend that much of their free time, only to end up on the receiving end of bug reports from an angry entitled users.

Bluntly, the copious amount of negative criticisms and threats of switching to competing applications, plus the many censored trolling messages, only makes the matter (way) worse. What is instead needed here is either a motivated developer or (very large) funding.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 15 guests