30

For analyzing videos, I am looking for a Linux tool to browse through frames one by one, both forward and backward in time.

I am currently using MPlayer for studying these videos, using . to step frame by frame. However, I cannot step through frames one-by-one backward in time.

Therefore, I am looking for a video-player that meets all of the following requirements:

  • Backward/reverse frame-by-frame stepping through the movie (of course also forward, but that seems obvious)
  • Runs on Linux (SLES for me)
  • Gratis
  • Support for AVI videos

I've read on some websites that VLC player or SMPlayer might be able to do this, but I could not confirm it in official resources, and rather not take the time to install a tool which in the end does not have the right features after all.

  • 1
    With VLC media player, you can step forward frame by frame - just press E. Though it seems it is not possible to go backwards frame by frame. – vclaw Jun 12 '14 at 13:07
  • 2
    Given how the compression works in common video formats going backwards can be pretty difficult. For many formats a new frame is only represented by the difference from the previous frame. Going backwards would mean you would have to either keep the previous frames in memory, or re-construct them. This would only really be easy with uncompressed video. – Zoredache Jun 12 '14 at 16:55
8

With VLC you can slow down the file, but it isn't really frame-by-frame. OpenShot is a pretty lightweight (and very useful) video editor, which can show frame-by-frame.

You can use the left and right arrows to navigate frame-by-frame backwards or forwards in time.

You can also get a live DVD (or USB) with it on here: http://www.bandshed.net/AVLinux.html

It's available in most repositories (yum install openshot or aptitude install openshot).

  • Sorry, just realised you're on SUSE: yast2 -i openshot – Elliot Reed Jun 12 '14 at 11:37
  • Ok, will try it out on my Ubuntu machine at home, seems a bit easier :) – Bernhard Jun 12 '14 at 11:53
  • By the way, looking at the installers on their website, it seems heavily outdated, because the newest one for Ubuntu is 9.04? – Bernhard Jun 12 '14 at 11:56
  • There are other programmes such as Pitivi which are updated more often. But for what you're after I'd recommend sticking with openshot, it only does a few things, but keeps it simple. There's likely not been much of an update for some years as no new features are required. It's really a GUI for various command line tools, which are more frequently updated. – Elliot Reed Jun 12 '14 at 12:01
  • Openshot can indeed do what I expected. Any clue why the quality on screen seems worse? – Bernhard Jun 14 '14 at 19:42
16

The command line editor MLT melt can function as a command line player; this is what I get in terminal:

$ melt ./testvideo.mp4 
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
|1=-10| |2= -5| |3= -2| |4= -1| |5=  0| |6=  1| |7=  2| |8=  5| |9= 10|
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
+---------------------------------------------------------------------+
|               H = back 1 minute,  L = forward 1 minute              |
|                 h = previous frame,  l = next frame                 |
|           g = start of clip, j = next clip, k = previous clip       |
|                0 = restart, q = quit, space = play                  |
+---------------------------------------------------------------------+
Current Position:        356

Note the h = previous frame, l = next frame keyboard shortcuts; also "Current Position" is given in total frames.

  • 5
    Very useful, works flawlessly, just like I expected VLC to. I cannot believe VLC doesn't have native ability to do frame by frame (backwards and forwards). Melt appears to be installed on Ubuntu by default too. – Elijah Lynn May 29 '15 at 16:03
  • installation was easy and it looks very nice. – Silvio Levy Sep 25 '17 at 8:13
  • @ElijahLynn VLC is a video player, while melt is a video editor. A player does not need to keep past frames. And no, there is no past frame in the video file. Recreating the previous frame from the file requires using about 10 or so past frames from the file, possibly many more. – Volker Siegel Apr 24 '18 at 7:28
13

VLC has an extension called Previous Frame for frame-stepping backwards.

Extension Installation: Put the file in the VLC subdir /lua/extensions, by default:

  • Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
  • Windows (current user): %APPDATA%\VLC\lua\extensions\
  • Linux (all users): /usr/share/vlc/lua/extensions/
  • Linux (current user): ~/.local/share/vlc/lua/extensions/
  • Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/

(create directories if they don't exist)

Restart the VLC.

Then you simply use the extension by going to the "View" menu and selecting it.

jkj

  • 1
    Unfortunately, this extension doesn't really do frame by frame jumps. It sort of tries to, and does short jumps, but they are not frame by frame, and usually several frames off. – mivk May 16 '15 at 10:56
  • @mivk: The problem is soved by using the settings shown in the screenshot above. – Nicolas Raoul Jan 27 '16 at 3:53
13

Development of mplayer has stopped (edit: resumed) and you should consider replacing it with mpv which supports this feature. Framestep forward with . and backwards with ,.

  • but stepping backward is not as smooth as stepping forward. – Santhosh Yedidi Sep 17 '18 at 7:14
  • Do you know a player where it is? – Tanath Sep 17 '18 at 8:46
  • djvview: step backword is working great – Santhosh Yedidi Sep 17 '18 at 8:57
  • Development on that stopped in 2015. – Tanath Sep 18 '18 at 18:50
  • it looks i have installed by latest PKGBUILD in arch's aur : aur.archlinux.org/packages/djv. I dont know whether its developed recently or not – Santhosh Yedidi Sep 19 '18 at 10:21
0

As detailed in this answer on askubuntu, SMPlayer can do it when using "mpv" as it's "Multimedia engine" (under Options -> Preferences, at the top of the "General" tab).

The default keyboard shortcuts are , (comma) and . (dot) for back and forward by 1 frame.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.