I need to program an application that does the following:
The user has two trackbars (sliders): one changes the displayed video
file, the second change the time (seek the video timeline), the user
also has play/stop buttons. The application need to play frames from
one of 40 video files. When the user moves the time trackbar, the
display will show the relevant frame. The frame that will be displayed
is the frame from the video file selected by the video trackbar (one
of 40 videos). When the user presses the play button the video starts
to play. Dragging the video file trackbar WHILE playing should show
the correct frame (according to the play time) but from the selected
video file. (Note that the video files have the same size and fill all
the displayed area.)
The question is what is the best way to achieve this?
Should I load all the video files and connect them to a VMR. In the
VMR I will change the Z-order of the displayed video (according to the
video file trackbar) or should I change the alpha of the displayed
video file to 1 and all the others to 0?
What about performance? does all the videos frames, at certain play
time, from all the video sources are decoded and only the relevant (Z
order 0) will be displayed, or only the top most will be decoded ?
Should I be able to play the video at the correct frame rate (25 fps)
or the video frames decoding will cause problems?
Hope I clarified myself.
TNX,
Vertilka
The max number of streams for a VMR is 16!
And I believe you are going to have performance problems anyway on a
single PC. I think decoding 40 files in parallel is going to kill your
PC. (And if you had uncompessed video, the bottleneck would be the
disk read speed anyway). IMO, you need to implement a multi-machine
architecture to successfully implement your function (multiple reader
machines feeding a display machine).
So can i do that with 16 video files ? Note that only one video is
displayed at a time on the display area. I do not need other video
files to be decoded.
Can I cause only the relevant video file to display it's frame, so
other will not be decoded ? again by using z-order or alpha ?
And what about mixing video files and seeking each video file
independently, can I do that ?
If yes, I can only control the relevant video file. Does this will
solve the problem ?
Tnx,
Vertilka
What do you mean by "decoded"? Is it "displayed" or do you mean
"decompressed", as required for mpeg files?
> Can I cause only the relevant video file to display it's frame, so
> other will not be decoded ? again by using z-order or alpha ?
If your files are using long GOP, then you need to decompress all
files in order to be able to switch files "on the frame"
> And what about mixing video files and seeking each video file
> independently, can I do that ?
Not in one single graph. You need to use multiple independent graphs.
Two techniques : use Geraint Davies' GMF Bridge, or a custom
allocator presenter with the VMR (as in VMR multi-sample).
> If yes, I can only control the relevant video file. Does this will
> solve the problem ?
Both solutions allow you to do this. But it is still a very complex
exercise.
If I remember correctly the GMF Bridge example does something very
similar to what is described here so best thing would be to download
GMF Bridge and run the included example
So, I installed the latest DirestX SDK and the Windows Vista SDK,
as described in the article/post: http://www.fungileo.com/?p=4
But in both installations i couldn't find the MultiVMR sample. Where
else can i find it ?
Tnx,
Vertilka
What about just building a DES timeline?
Vivek
Tnx,
Vertilka
DES is DirectShow Editing Services. With this you can build a playlist
which you then can load into DES. You could do what you want by
letting your "first" slider set time in this playlist and the "second"
slider set the time in the current video.
However, it is easy to run into limitations when using DES...