Ubuntu – How to measure “millisecond” timing in videos like Youtube (incl. frame by frame advance video)

timevideo-recordingyoutube

I do some "kitchen science" at home. I would like to measure the timing of movements in YouTube videos. YouTube only has a counter of seconds.

My first thought is to use a screen recorder program and have a timer running beside the video.

I don't know frame rates and details yet, but I want to measure the speeds of some movements. I hope to be able to measure within a few hundreds of a second, Or I will have to settle for tenths of seconds maybe.

How should I do this?

What programs are simple to use for screen recording and timer? (and give reasonable detail)

Is there any other method that could be simple or useful?

Best Answer

You can increase the fps of RecordMyDesktop to get finer control frame by frame. as noted here. Sadly this appears to currently be limited to 50 fps which at best will result in one frame every 1/20th of a second. You'll have to play with the settings to accommodate the limits of your system.

You'd need to be able to record 1000 fps to get millisecond frames. While 1000 fps recordings are possible the hardware is pretty cost prohibitive.

Playing the resulting video with the command ffplay videoname will give you not only a window to watch the video in but also a terminal output showing duration accurate to 1/100 th of a second.

You can also get the duration of the entire video with mediainfo as in mediainfo videoname which appears to have results accurate to 1/1000th of a second.

You can use ffmpeg to break a video into frames that you can examine seperately to determine the timing (frame 990 @ 1000 fps would be 990 ms from the beginning)

RecordMyDesktop is available in the Software Center if you don't have it and ffplay is part of the ffmpeg package also available in the Software Center