472,145 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

How to play an embedded video file in C#

14
I am looking for a way to play embedded videos using either Windows Media Player, or DirectX. I have tried using the url option with WMP, but can only play files off the HDD. I am running into the same problem using DirectX, can only play videos from the HDD. I have added videos (*.wmv) to the project and set them to embedded resource. How can I then access and play them?
Jul 9 '08 #1
5 4091
Could you elaborate on what you mean by embedded?
Jul 9 '08 #2
TxAg03
14
Forgive me if my terms are not correct. In the solution explorer, I right-click and select 'add', then 'existing item'. I then select the added video (*.wmv) and for it's build action property, I set it to 'embedded resource'. I have found many explanations on how to do this with pictures and text, even audio, but nothing for video.

I am trying to write a program that contains multiple videos. So that the user can not distribute them or access them without letting me know, I currently have them zipped up with a password. This is slow because I have to extract them to a temp file to play them in an embedded WMP on another form. I am trying to find a way to access them from within my program to eliminate the wait of extracting.
Jul 9 '08 #3
Forgive me if my terms are not correct. In the solution explorer, I right-click and select 'add', then 'existing item'. I then select the added video (*.wmv) and for it's build action property, I set it to 'embedded resource'. I have found many explanations on how to do this with pictures and text, even audio, but nothing for video.

I am trying to write a program that contains multiple videos. So that the user can not distribute them or access them without letting me know, I currently have them zipped up with a password. This is slow because I have to extract them to a temp file to play them in an embedded WMP on another form. I am trying to find a way to access them from within my program to eliminate the wait of extracting.
I'll research this problem some myself. What version of the .Net framework are you using?
Jul 10 '08 #4
TxAg03
14
Thank you cnixuser.

Using Visual Studio 2008 and am writing in .NET 2.0. If need be, I can switch to .NET 3.0 or 3.5.
Jul 10 '08 #5
TxAg03
14
Maybe this is an alternative to embedding the files... Is there a way to encrypt a file (video) and have the program be able to read it without having to decrypt the file to a temp location? I know that Windows can encrypt files, making it that only that user can access/run them. Is there a way that I can make it so that my program is the only program that can have access to the files?
Jul 11 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by mcfarlandorama | last post: by
16 posts views Thread by Dobedani | last post: by
6 posts views Thread by xhunter | last post: by
3 posts views Thread by Ryan Liu | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.