VLC0.5 question

I’m a little confused about video looping-- I’ve read about using commandlines like

video.avi | input-repeat=-1 | start-time=5.5 | stop-time=10.0

but I don’t understand where these commands go. I’m using Vlc(Ex9Texture 0.5) and I’m looking to loop various sections of one video file on the fly.

From Vlc contribution:

  • The loop pin is implemented in a stupid way, but VLC can help you here, just use this as the filename:
    video.avi | input-repeat=-1

  • or if you don’t want to loop the entire file, but only from 5.5 to 10 seconds, you can even use:
    video.avi | input-repeat=-1 | start-time=5.5 | stop-time=10.0

So the best way to loop various sections of a file would be to type a big spread of all the loops and use getSlice on the file input, right? I wish there was a better way but Vlc0.5 is the first time I’ve ever got any video at all to work reliably so I should count my blessings.

ah yea just use prev next logic

Ok so here’s a silly patch I wrote to loop stuff. Things loop just fine; except when switching between different reference times. Then it always briefly flashes the first frame of the file before looping that section. Using the ‘do seek’ pin doesn’t have this problem but I can’t seem to incorporate it into what I’m trying to do (experienced all kinds of problems using a similar table on the ‘seek time’ pin and an LFO timer to bang the ‘do seek’). So close yet so far… any ideas?

VideoLoopExample.v4p (13.6 kB)

hi,
even with the example from vlc plugin, I don’t understand how does work the next movie process. which data does vlc plugin need to go to the next movie (pin 2) ?
thx

I’m also interested into that, I always though that next pin was for preloading different videofile… also I had always a little freeze while looping with vlc plugin… What video codec are you using to have a seamless clean loop?

PS: Just alligned the patch…

VideoLoopExample_1.v4p (15.1 kB)

This would be my approach.

Instead of loading the file every time you want to have it played, load all files together (uses substantially more texture memory of course), and only play the one that you want to have playing, and select only that slice from the 10 textures for display.

The ‘Next filename’ pin, actually does the same => already loading another file, so that you only have to start playing (instead of starting to load the file at that time) as soon as the Filename becomes equal to ‘Next filename’. This can only be done if you know what the next filename will be, and in that case you could do with only 1 filename slice. But for what you want to do, you don’t know what the next filename will be (I guess), so that is why I would load all 10 files together.

Each slice will restart playing from where it stopped when playing it the last time, but I am sure you can easily program the ‘do seek’ when switching the file yourself if needed.

VideoLoopExample_2.v4p (18.8 kB)

Thanks ft. Your patch works better as far as eliminating that flash of the first frame when switching between loops.

@ robe: I don’t have a seamless clean loop. It freezes a little when it starts over. I just deal with it because, like I said, this is the first time I’ve been ever able to get video to loop at all on vvvv. But not ideal in most circumstances.

It’s true that the next pin doesn’t help if I don’t know what I’m going to play next; (or does it? maybe using a frame delay on the play pin with the same file loaded on next pin might make it switch better. I’ll try later)

cheers

One other try (doing the seeking yourself). This seems to work quite well over here if your vvvv framerate is high enough (> 50 fps).

VideoLoopExample_3.v4p (15.9 kB)