7

Every time I try to seek a local video with VLC, there is a noticable lag, as opposed to MPlayer/MPV, no matter what "ultrafast" x264 presets or loop filter skipping is used.

What's the fundamental reason for that?

  • I've not noticed this, but maybe we are talking about different media. Is it audio or video? And is it internet streaming, local network streaming, local file, or CD/DVD/BluRay? – AFH Jun 02 '15 at 22:35
  • 1
    @AHF pretty much any local video. –  Jun 03 '15 at 04:03
  • 1
    Have you check your CPU utilization when playing the same video? Is hardware acceleration enabled? – some user Jun 03 '15 at 05:53
  • 1
    It might help if you specify your OS – Ludenticus Jun 05 '15 at 00:16
  • 2
    @someuser with or without GPU decoding, VLC is slower (just try for yourself). –  Jun 05 '15 at 04:13
  • 1
    @Ludenticus same thing. With every OS (Linux, Windows), PC or laptop I've tried, VLC is slower (try for yourself). You pretty much need to know the code or otherwise be very familiar with both to answer this question. –  Jun 05 '15 at 04:14
  • 1
    @Det In that case, your question, as it is stated, may not render the answer you're waiting for. I mean, it can be said that VLC is «slower» because it loads more plugins/addons. You don't need to see the code to know that. In other words, it'd be enough to say that it is «bloated», hence its slowness. On the other hand, if you want to know *which* plugins/addons are making it slower, then you should specifically ask it. – Ludenticus Jun 05 '15 at 05:45
  • 1
    @Ludenticus I don't think VLC's more plugins in itself is making it that much slower than MPV (even with defaults or all the "speed tricks"). There should be something more fundamental in the decoding process than that, but even if any of them did, that's what this question is about anyway. –  Jun 06 '15 at 11:13
  • Are they both using the same video output driver? There is a big performance difference depending on which one you pick. I don't use VLC but you can specify the VO in mplayer with `-vo=driver`. To see a list of drivers issue `mplayer -vo help` (assuming Linux the default is the one for your GPU or xv and lastly X11 IIRC). Another big difference might be framedropping. Is it enable for VLC? It'll cause... well, frame drops. It's disabled by default with mplayer. – Alex Jun 08 '15 at 02:34
  • I observe the same difference in seek performance between SMplayer and VLC using `xv` output and framedrop disabled on Angstrom linux, so it seems to be a cross-plaform fundamental difference rather than a problem with a particular setup. – Dmitry Grigoryev Jun 19 '15 at 09:15

2 Answers2

7

Try this :

  • Go to the Menu Tools / Preferences
  • Click at the bottom at Show Settings on All
  • Click on Input / Codecs
  • Ensure that Fast seek is checked
  • Click Save

image

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • This seems to solve the issue at least on my 32-bit debian machine. Let's wait for feedback from @Det. Additionally, I'd love to see an explanation as to why this isn't set by default. – Dmitry Grigoryev Jun 19 '15 at 16:58
  • 1
    @DmitryGrigoryev: Fast seek probably uses an algorithm that is not guaranteed. Video compression usually entails master-frames that are full, followed by delta frames only containing the differences. Therefore exact positioning requires a sequential scan of the video, while fast seek will perhaps find some master-frame that is only more or less at the designated position. I don't think most people will care about this problem, but there might also possibly exist videos on which fast seek may fail. BTW and FYI, not every video is seekable, this depends on the encoding, so VLC will need to scan. – harrymc Jun 19 '15 at 19:16
  • VLC probably chose to use the slow and guaranteed method by default, while MPV/MPlayer chose otherwise. – harrymc Jun 19 '15 at 19:21
  • Does improve it, though MPV is still noticably faster. –  Jun 28 '15 at 07:05
  • Fast seek does work but the issue is it doesn't go to exact position we click. Sometimes the gap is more than 30 secs. – kmchmk Jul 20 '21 at 11:51
2

VLC has an issue known for long with seeking, when running it alongside a nVidia GPU. It seems to have a relationship with GPU hardware acceleration, not fully supported.

To try and resolve this, assuming you have the last version of VLC (2.2.1), and if you have a powerful enough CPU, you can deactivate the GPU acceleration: Tools -> Preferences (Simple settings) -> Video -> Uncheck Accelerated video output (Overlay)

Michael
  • 21
  • 1
  • 3
    As stated in comments, GPU acceleration doesn't make a difference. I currently use an AMD GPU and it's the same thing. –  Jun 19 '15 at 15:30