473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 4225
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

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

Similar topics

3
by: craig | last post by:
i want to make a button that will start an embedded windows media player playing AND in full screen. i can do it with TWO buttons: <input onclick="MediaPlayer.controls.play();" type="button"...
0
by: tushargupta82 | last post by:
Hi all, I have some video files embedded in html files included in a chm file. I am trying to invoke this chm file through a VB .NET application. The chm file opens when I click on a button in...
5
by: mcfarlandorama | last post by:
Hello, How do I play a DVD from a website? I am starting with zero knowledge of media but have HTML Experience. I found out that Windows Media Player won't play the DVD. Do I suggest everyone...
16
by: Dobedani | last post by:
Dear All, I found the code added below at: http://simplythebest.net/sounds/sound_guide.html Unfortunately, the code doesn't seem to work in Firefox. These are the error messages I can see in...
13
by: anil.rita | last post by:
When the user chooses an AV file to play, based upon the type of file, I want to use the default installed media player to play it. I am wondering if this is a good way - any alternatives,...
6
by: xhunter | last post by:
I have this problem on my website and no matter what I have not been able to get over it, it is really getting on my nervers. it's a problem that only exists in non IE browsers. the frame work...
3
by: Ryan Liu | last post by:
Hi, I want to play Audio/Video in my C# application(standlalone, not web applicatoin). The source of multimedia may in different formats and decided by the end user, which I have no control. ...
3
by: pavanip | last post by:
Hi, I am new to Silverlight application.I want to display video using Mediaelement tag and I used the below code to play video. <Canvas> <MediaElement x:Name="mPlayer"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.