Getting the video frame number in VLC

36

6

I'm running VLC 2.0.5 on Mac OS X 10.6.8.

I have a .mpg video paused, and I would like to know the frame number for this moment in the video. Is there a way to reveal that in VLC?

P.S. I scrubbed back and forth through the video to reach the point it is currently paused at.

hpy

Posted 2013-01-28T17:22:11.217

Reputation: 5 269

Answers

9

Apple's Quicktime Player 7 (free download @http://support.apple.com/kb/DL923) has a dead-easy way to view frames; all you have to do is click the time in the bottom left corner and select "frames". (It also supports frame-by-frame stepping with the arrow keys.) Such a pity the feature was removed in QTX, the one that ships with OSX 10.6.8. Dont worry, though, you can install then both and they won't interfere with each other.

Marcus Chan

Posted 2013-01-28T17:22:11.217

Reputation: 1 643

8

I wanted to do the same but I couldn't find a way to do it with VLC.

But, according to this, you can use the drawtext filter in ffmpeg to overlay the frame number to the video permanently. So if you watch it on a player of your choice, you can always see the frame number.

For example:

ffmpeg -i video.mov -vf "drawtext=fontfile=Arial.ttf: text=%{n}: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099" -y output.mov

jjulianf

Posted 2013-01-28T17:22:11.217

Reputation: 133

2Tip: one might want to add fontsize=72 (or whatever) to the options to produce something more readable – Brian Gordon – 2019-06-22T17:58:43.570

7

I don't have an OS X version, but it should be similar to the other versions. On Windows select Tools->Media Information. From the window that opens select the "Statistics" tab. Under the video section you'll see the statistics for displayed and lost frames. The frame # should be those two numbers added together.

VLC Screenshot

heavyd

Posted 2013-01-28T17:22:11.217

Reputation: 54 755

2

From user Blauhirn: Concerning Tools->Media Information->Statistics: If I compare the frames counter before and after pressing e, the number doesn't increase by 1. (but, instead, randomly by up to 300). Not knowing of another way also, I think it's simply not possible using VLC.

– fixer1234 – 2016-07-15T03:52:46.113

@heavyd The player knows the number of minutes and seconds, why can't it know the number of frames into the current second? And from that, an absolute frame count can be found based on frames/second, if needed. (Personally I just want to know the intra-second frame number). – Michael – 2020-02-08T17:50:52.783

23That assumes you've played the video from the beginning – Marcus Chan – 2013-01-28T17:35:44.083

2Yes, that is true, but I don't think there is any way to get an absolute frame number. AFAIK that information is not typically embedded in video streams. – heavyd – 2013-01-28T17:37:08.293

I tried this with a nonstandard frame rate in OSX, and it didn't work at all (by the way, command-I to open it in OSX). I don't think VLC has this feature. – Marcus Chan – 2013-01-28T17:42:58.933

@heavyd Thanks for the quick reply! I did find the Media Information window, but unfortunately I scrubbed back and forth through the video, so the frame count would not be accurate... – hpy – 2013-01-28T18:35:09.213

6

With VLC 2 or 3 on OS X, one can estimate the frame number as follows:

A. ADDON: Install Jump to time Previous Frame via the macOS menu VLC > Addons Manager or the Ubuntu menu Tools > Plugins and extensions > Addons Manager tab > Extensions. In VLC 3, click the "Find more addons online" button. The online install page is here. Restart VLC. Use VLC > Extensions > Jump to time (Previous frame) [Get time >>] button to show the HH:MM:SS,mmm lapse time.

B. CALCULATE/ESTIMATE: Convert HH:MM:SS,mmm to total lapsed seconds SS.mmm. Then total_lapsed_seconds * frame_rate_per_second = frame number.

Note: Jump To Time version 3 extension may need to be manually installed.

Jump To Time extension

C. TIME: Use the "Time v3.2 (intf)" VLC Extension to display the running time _,mmm on the screen in a playing video. A [Efps] format option provides a elapsed time * fps estimate. The fps value needs to be supplied in the format, e.g. [E25]

Time Extension

l --marc l

Posted 2013-01-28T17:22:11.217

Reputation: 307

how do you get the .mmm to show up? That's really all I want! – Michael – 2020-02-08T17:51:34.900

@Michael Currently, the _,mmm values shows in the "Jump to time" window; and, this extension does not show mmm in VLC itself. Click to Time format button to rotate through various _,mmm formats. – l --marc l – 2020-02-08T20:47:04.440

@Michael One could also install the Time extension for _,mmm display only.

– l --marc l – 2020-02-08T23:49:26.627