How to play Video?

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jun 2009
Posts: 210
Reputation: avirag is an unknown quantity at this point 
Solved Threads: 15
avirag avirag is offline Offline
Posting Whiz in Training
 
0
  #11
22 Days Ago
Originally Posted by VibhorG View Post
Hi all,
Can anyone tell me how can we play the video(.wmv) in C# window application .................?
Take a look at this also.
http://www.codeproject.com/KB/direct...diaplayer.aspx
Last edited by avirag; 22 Days Ago at 2:34 am.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,187
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 571
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast
 
0
  #12
22 Days Ago
Vibhorg -- Adatapost provided the article you should read regarding embedding the media player. Take a look and see if that solution meets your needs.

Originally Posted by VibhorG View Post
Well sknake i have done whatever you mentioned here,
BUt now tell me how can i run the video inside this........?
Originally Posted by adatapost View Post
Take a look at this article - http://msdn.microsoft.com/en-us/libr...51(VS.85).aspx
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 56
Reputation: VibhorG is an unknown quantity at this point 
Solved Threads: 1
VibhorG VibhorG is offline Offline
Junior Poster in Training
 
0
  #13
22 Days Ago
Originally Posted by sknake View Post
Vibhorg -- Adatapost provided the article you should read regarding embedding the media player. Take a look and see if that solution meets your needs.
Yes, but i just have one query regarding this, that the code behind the play button is:
  1. axWindowsMediaPlayer1.URL = @"C:\Documents and Settings\All Users\Documents\My Music\Sample Music\Videofile.wmv";
In this it is load the video from our system(hard drive of user), but in my application i have inbuilt some videos with it, and i want that when user click on play button so video load from that location(In to my application).
Kindly help me in that Sknake..
Last edited by VibhorG; 22 Days Ago at 3:05 am.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,187
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 571
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast
 
0
  #14
22 Days Ago
This depends how you have the videos inbuilt. If they're compiled in as an embedded resource you could do something like:

  1. private void button3_Click(object sender, EventArgs e)
  2. {
  3. string tmpFile = System.IO.Path.GetTempFileName();
  4. File.WriteAllBytes(tmpFile, Properties.Resources.File_MOV);
  5. //mediaPlayer.URL = tmpFile;
  6. //mediaPlayer.Play();
  7. }

Be sure to clean up your temp files when the application closes.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 56
Reputation: VibhorG is an unknown quantity at this point 
Solved Threads: 1
VibhorG VibhorG is offline Offline
Junior Poster in Training
 
0
  #15
22 Days Ago
Originally Posted by sknake View Post
This depends how you have the videos inbuilt. If they're compiled in as an embedded resource you could do something like:

  1. private void button3_Click(object sender, EventArgs e)
  2. {
  3. string tmpFile = System.IO.Path.GetTempFileName();
  4. File.WriteAllBytes(tmpFile, Properties.Resources.File_MOV);
  5. //mediaPlayer.URL = tmpFile;
  6. //mediaPlayer.Play();
  7. }

Be sure to clean up your temp files when the application closes.
No Sknake this is not what i want,
Let i have a folder(name video) in my application, and i m put(copy) some videos in that folder, now i want to play these videos into my form.
How can i do this ..............
I thing now my problem is clear to you.....
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,187
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 571
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast
 
0
  #16
22 Days Ago
Just set the path to C:\Program Files\Wherever you installer your application\Videos\video1.mpg and play the video. I don't understand why this is a problem?
Last edited by sknake; 22 Days Ago at 3:56 am.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 56
Reputation: VibhorG is an unknown quantity at this point 
Solved Threads: 1
VibhorG VibhorG is offline Offline
Junior Poster in Training
 
0
  #17
22 Days Ago
Originally Posted by sknake View Post
Just set the path to C:\Program Files\Wherever you installer your application\Videos\video1.mpg and play the video. I don't understand why this is a problem?
Okey thank you..........
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 323
Reputation: Diamonddrake is a jewel in the rough Diamonddrake is a jewel in the rough Diamonddrake is a jewel in the rough 
Solved Threads: 39
Diamonddrake's Avatar
Diamonddrake Diamonddrake is offline Offline
Posting Whiz
 
0
  #18
21 Days Ago
Its a far back reference, but using DirectX is a very good practice. and all windows computers XP and up have DirectX installed. It's installed with windows and comes as an automatic update as well. The managed directX libraries have very easy to use audio and video objects that is as simple as passing it a filepath, giing it a parent control to play on, and calling play.

This is just for future reference. Glad you already have this solved.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC