Changing videos

hi,

I need to play many video loops, one after the other. I call them using ‘dir’ and ‘getslice’ connected to a ‘file stream’ and ‘video texture’. the problem is that each time I change the slice, the video playback stops for a while (about less than a second) and than the video starts.

Is there a way to make the changing between videos smoother and with no stopping in the playback?

1mpar

I’d say use avisynth scripts but no idea how :) Elektromeier?

edit: btw, shouldn’t be too tricky to handle aviscripts if just needed to play each file one after the other. As far as i know the script acts in the filestream as one big videofile…just push play ;)

switching between videos takes its time as all codecs and internal processing filters are reloaded each time a new video gets played.
it would be great to have some more experiences how avisynth performs in this application in real-life situations.

on the other hand, just appending all clips after another in one big file and using Seek should be faster anyway.

moved the FAQ parts here to the FileStream (DShow9) page

yeah i did some patches to make the process of joining with avisynth convenient…

you just select the folder with your avis and the patches creates the avisynthscript plus a file with start and enpoints of the avis.

with the playermodule you just open the created script, and the module loads the file with the duration. this way you just have to select the index of the avi you want to play and filestream jumps to corresponding position.

avisynth joins the avis very smoothly no freeze between the avis…
i have tested that with dv encoded movies…

but i had some troubles with looping in a joined avi, sometimes filestream just ignores the loop and plays the whole joined avi on.
it also sometimes stops playing the movies when in loop mode…
with loopmode turned off it works with no troubles and very fluent…

ill post that stuff tomorrow, maybe you find out some tricks…

My problem in fact is not playing one file right after the other, because I’ll make this manually according the the music.

The problem is the freeze of the videos when I change from one to another.

1mpar

1mpar:

with the avisynthtrick you can actually achieve exactly that. in fact you can jump at any time to each file, of course you can also jump manualy… i experienced no freeze this way, but there are some problems when it comes to looping in one file…

it works fine without looping, but then at the end of one file it automatically jumps to the next…

maybe we can fix this…

Hi all. I download avisynth and AvsP, but how i can add folder of avis’s to script? I found only- “AVISource”. But how i can add many avi’s to 1 script with some clicks?

Elektromeier,

thanks for the reply, but I to play the loops inside vvvv. I’m trying to make a VJ mixer patch that plays 4 videos at the same time. Everything is working fine, less this little freeze when I can another clip.

I don’t know how v4 is built, but in all vj applications you can change from one video to another without stopping the playback. Is there something in v4’s architecture that doesn’t allow it to inicialize the videos smoothly?

1mpar

Hi again. I also trying to make mixer patch. Now my version can change 9 videos without delay, but when i try to use 2 decks, i get huge delay. Maybe someone know, how optimize it. See attached file.

videomixer.zip (15.8 kB)

Hi alg , nice to see you are using my aproach but as i said in the other post not sure if it is a good way , what sort of delay ,video or whole computer going slow ? i made a few slight changes , work real time in my computer for mixing the videos , press crtl F9 to see comsumption , hope it works for you , regards

videomixer.zip (14.8 kB)

Hi, alg

great patch! Just perfect ;)

I just deleted the frame delay node and set the end timme of the loop to 99999. This way it loops continuouslly and I don’t get any delay.

This is exactly what I needed. Thank you very much.

As soon as I finish my patch I’ll post it here.

1mpar

here is that avisynthjoiner package:
AVISynthJoiner
tell me what works and what not…

elektromeier, looping dont work with Pegasus mjpeg codec. When i press- loop, it’s just lopping 2 frames of first video file. Also, it’s dont change videos, when i change they in patch.

colorsound, thx for good algoritm =). When i press- ctrl+F9 all works fine, but my CPU load- 100%. I use mjpeg codec, to compress my videos, and i think- it’s problem. Now i must try to convert they to DV, and see CPU load again. Also, it’s can be my CPU problem. I use AMD64 3800+ with single core. It’s can be very serious reason to slow down.

P.S. Sorry for bad eng.

hi alg , i tested it with videos compress with indeo avi 1 keyframe everyframe , 640 480

Hi, colorsound. I test it now with Microsoft DV- works good, i don’t see CPU load, but i don’t have delay in switching. I also trying Canopus DV, but it’s more slow, i think. How i see, vvvv works good with native windows codecs, but with installed it’s have slowdown. Such, in Resolume mjpeg works faster, then MSDV, but in vvv i see another results.
P.S. Why end frame calculation with framedelay node buggy sometimes? I read FAQ, and it’s was the way to calculate end frame. But how i see, sometimes data just don’t go to framedelay and to end frame from it. Very strange.

at alg: seems that the durations arent written correctly, mh ill have a look at that. can you open the dur file and tell me whats in it?

elektromeier, in dur i see all 0.
it’s contains:
“0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000”

UPD:
Hmm, with DV avi files, coded by “Super” with ffmpeg i also get all 0. I install MainConcept DV to open DV in AVS. maybe, i must use another DV decoder? As i know, AVS dont open dv files with built in MS encoder.

thanks…

i think its an issue of the aviparser. it outputs 0 before the avil is loaded and copied to the filetexture node…

i succesfully play dv avis with aviynth and ms decoder btw…

Hmm, maybe it’s problem of my system, but if i dont another DV encoder installed, AVS dont read it’s. it’s can be “Super” codec problem?