Original article: [reprint] C # several methods for playing Streaming Media
There are so many things to learn for video development. I don't know how to get started, so I am confused and try again!
First, set up the windows Meida server. The method is very simple. You need to declare that these methods can play local videos. In addition, the method 2, method 1, and method 2 can also directly play video cards and cameras. Alternatively, you can use method 2 to capture information such as a video card, camera, or desktop to a new file or network ......
Next, use the following methods for use.
1. directly use WMP (Windows Media Player)
What is WMP? I don't need to introduce it. simply use the method.
Key code
Wmplayer. url = URL; wmplayer. ctlcontrols. Play ();
I think the rest of the work should be done. If not, leave an email.
2. Use VLC
What about VLC? I can only describe how powerful it is. It does not need to use a filter in Windows to play local or online videos. The implementation principle is different from that of DirectShow-based media players. Of course, you can call DirectShow to capture TV card signals, desktops, and cameras.
Method 1: After installing VLC, use the ActiveX control that comes with VLC,
Key code:
Axvlcplugin21.playlist. Add ("MMS: // new-media/publishingpoint1", "", ": MMS-caching = 1000 ");
Axvlcplugin21.playlist. Play ();
If not, please email,
Method 2: Use nvlc (an encapsulation of C)
For details, see:
Http://www.codeproject.com/KB/audio-video/nVLC.aspx? FID = 1587520 & DF = 90 & MPP = 25 & Noise = 3 & sort = Position & view = Quick & Fr = 26 # xx0xx
Method 3: libvlc.net (another encapsulation of C)
Http://sourceforge.net/projects/libvlcnet/
In fact, C # encapsulates a lot of VLC. I just chose two stable versions.
C # several methods for playing Streaming Media