How can I make a video "seekable" using ffmpeg when played in VLC player?

1

I have a .mkv video with the following properties:

Input #0, matroska,webm, from 'DEMO.mkv':
  Metadata:
    ENCODER         : Lavf56.4.101
  Duration: 00:00:56.37, start: 2.333000, bitrate: 2032 kb/s
    Stream #0:0: Video: h264 (High), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 30 fps, 30 tbr, 1k tbn, 60 tbc (default)

The problem is that when I play this video in VLC player (latest version on OS X) it is not possible to jump to an arbitrary position, instead it takes a while before it displays the video only several seconds after the desired position. It's a screen recording, so maybe the keyframes are so widely spaced that VLC has trouble to find and display the next one? Anyway, I'm looking for a way to be able to easily jump to a certain frame in VLC without lowering the quality while keeping the file size as small as possible.

Lenar Hoyt

Posted 2015-01-10T01:44:22.250

Reputation: 260

1"It's a screen recording, so maybe the keyframes are pretty rare so that VLC has trouble to find and display the next one?" – that's likely the case, and you cannot do much about it other than re-encoding, ideally to an intra-only codec or something completely lossless. Perhaps Periodic Intra Refresh could work when recording the screencasts. – slhck – 2015-01-10T12:03:36.057

does ffplay do a better/faster job at seeking? – rogerdpack – 2015-09-29T22:15:22.453

@rogerdpack I don't have a machine and a video at hand to test it. If you do, go ahead; I would be interested to know the result. – Lenar Hoyt – 2015-10-01T00:41:25.330

No answers