Loop video without stuttering

16,905

VLC seems to reinitialize the codecs or something every time through. I am unaware of any way to stop this.

However, I can get videos to loop smoothly with mplayer. Windows binaries are on that page (Windows download page, choose appropriate platform, just below news section).

To install it just extract it somewhere. Then on the command line (or via a shortcut or a file association), run:

mplayer videofile.xyz -loop 0

And it should loop smoothly forever. To start in full screen mode:

mplayer -fs videofile.xyz -loop 0

Make sure you put the -loop 0 last. If you put it before the file name then mplayer will restart on every loop. If you put it after then it runs smoothly. I don't know why but apparently it's a very old quirk (or maybe it's by design, I don't know, -loop is actually rather flexible) (also note the OSD issue mentioned there has long since been resolved).

Share:
16,905

Related videos on Youtube

Andreas Haferburg
Author by

Andreas Haferburg

Updated on September 18, 2022

Comments

  • Andreas Haferburg
    Andreas Haferburg over 1 year

    When VLC 2.1.3 loops a short video of about 600 ms (animation, uncompressed, 100 MB), there's a big delay of ~200 ms when it loops from the end back to the start. Windows Media Player can't even play it properly at 60 FPS. I remember that there used to be mplayer2.exe in Windows 2000 which was able to do that, but I can't find it anymore.

    Which program can loop videos flawlessly?

    • Jason C
      Jason C almost 10 years
      I've never had looping issues with VLC nor issues with 60 FPS uncompressed video in WMP; 100MB/0.6s is a decent amount of bandwidth but small enough to fit in a cache. Can you give some more details about the format? You can try mplayer (Windows binaries are a little down the page); it's based on ffmpeg and has served me well in the past. It might handle the file better. Also in VLC see if "loop one" provides better looping than "loop all" (click the loop button twice).
    • Andreas Haferburg
      Andreas Haferburg almost 10 years
      @JasonC It's an AVI, VLC says "Codec: 24 bits RGB (RV24)". I also tried VLC 2.0.8, same issue. When it reaches the end, the progress bar quickly fills yellow before playing the video again, maybe indicating that it's buffering. Is there some setting that I can change so it keeps the file in memory? There's no difference for me between "loop one" and "loop all".