Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi friends.. I am developing a project in which i have to play 4 videos on single screen by dividing the screen into 4 portions.. i have done that.. i used windows media player for playing those videos.. Each portion will be playing multiple videos one after the other by them self.. Everything is fine but the problem is when a video is ended and the next video is staring- in that gap videos playing in other portions pause for half a second or so... Your thoughts on this??
Posted
Comments
Sergey Alexandrovich Kryukov 17-Sep-13 2:24am    
Don't you think that "all" is an unrealistic exaggeration? :-)
—SA
Sachin Athrady 17-Sep-13 2:30am    
yea sir... but atleast it should play usual formats like mov,avi,mkv etc..
Thanks7872 17-Sep-13 3:11am    
it should play usual formats like mov,avi,mkv etc. has nothing to do with the question you have asked.
Sergey Alexandrovich Kryukov 17-Sep-13 8:53am    
OP needs the explanation of the simple facts: the formats and codecs do not belong to Media Player, they are installed in the system...

I added my answer, please see. Not really a solution yet, but useful...

—SA
Sachin Athrady 17-Sep-13 3:19am    
no sir.. i was just replying SA's comment...

Not answering to the main problem, in relation to "all formats": this is not defined by Windows Media Player itself.
Actually, by default, the repertoire of available media formats and codecs is ridiculously narrow. Usually, you need to install a lot more, which is done on the system (please see my comment to the answer).

I would highly recommend, for example, freeware K-Lite Codec Pack:
http://en.wikipedia.org/wiki/K-Lite_Codec_Pack[^],
http://codecguide.com/[^].

It comes with alternative player, one of the best, "Windows Media Player Classic Home Cinema". Compared to it, Windows Media Player's features look ridiculous. However, I don't know the components based on it.

You can use a different component based on Video LAN, or VCL player:
http://en.wikipedia.org/wiki/VLC_media_player[^],
https://videolan.org/vlc/[^].

This one does not depend on installed codecs and can play the most of the kinds of media. How to use it in your code? It is open source, provides the API, and there are .NET wrappers for this API. You can use one of them:
https://wiki.videolan.org/C_Sharp/[^].

So, try some of them out. It may help to solve your main problem, too.

Good luck,
—SA
 
Share this answer
 
Comments
Thanks7872 17-Sep-13 13:41pm    
Haven't tried them before but seems good to me.
Sergey Alexandrovich Kryukov 17-Sep-13 13:49pm    
Thank you for the note. I also did not try, but the links are good; we can see the links related to both WPF and Forms, something I did not know before.
Perhaps it would be good to add the options to people who asked about the player components before and was advised VLC...
—SA
Thanks7872 17-Sep-13 13:58pm    
Great one. I am agree with you. This answer will get visits soon...Cheers...!
Sergey Alexandrovich Kryukov 17-Sep-13 14:23pm    
:-)
create different of each of the object of window media player lirbary u r using. May b there is a single instance of the object which playing all four video.

Or you can also check on crossover property of the window media player object. Hope this helps you.
 
Share this answer
 
Comments
Sachin Athrady 17-Sep-13 2:31am    
no sir... i am creating new instace for each portion and also each portion is playing in different threads
V.Lorz 17-Sep-13 3:23am    
Different threads? Are you using the media player ActiveX control for playing the videos?
Sachin Athrady 17-Sep-13 5:21am    
i am using the windows media player control from com components
V.Lorz 17-Sep-13 5:38am    
In that case I suppose all of them will be updating the viewport from code which runs in the main thread, so if any of them takes too long for completing one task in that thread all other viewport updates will be delayed.

This perhaps will not take you too long, take a look at using the VLC media player. There is some information about it here: http://www.codeproject.com/Answers/653111/Media-player-for-windows-forms
in media player we have something call crossover. What that does it start a file eventhough the previous files doesnt get completed, we need to specify the duration. check with that property. might that help you.

-SG
 
Share this answer
 
Comments
Sachin Athrady 17-Sep-13 2:38am    
no sir... i am creating new instace for each portion and also each portion is playing in different threads

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900