Whats the best C# Way to stream a H.264 Video to another computer/device on a network? Is there a library/API For this? File Sharing?

StackOverflow https://stackoverflow.com/questions/9323658

Question

I am experimenting with C#, and I wanted to create a fun/useful network program. I've programmed for most of my years using C++, C# seems a lot cleaner and easier to program in. I mostly programmed data structures and algorithms. I haven't really touched networking much.

I have video files on my computer that I would like to be able to share/stream/send to other computers on my network. I'm going to eventually expand on it and add a lot of features, but I want to conquer the hardest part first.

Is there a library out that helps with the data management for this?

I see accomplishing this three ways, Idk what's easiest and best.

  • Maybe using Windows File Sharing (Like how other computers on a network can open videos in a shared folder?)
  • Streaming the video data to the client computer? Then having their native video program open the data stream? (Buffer-like on youtube?)
  • Silverlight or some other Library. I can use the built in video player, etc to run it

Features:

  • I want to allow the client to be able to copy the video tutorial file to their own computer eventually if necessary, so idk. Maybe buffering is the best solution.
  • Want to allow the client to pause/download the video.

Hopefully I can learn a lot in this project.

Was it helpful?

Solution

You can use Microsoft Expression Encoder SDK to push video stream to a local port, or publish it in Windows or IIS Media Services. Windows Media Player, Silverlight or player-based application can be used for playback on another computer. Also, the are some options for playback on Apple devices. For H.264 support, you would need Pro version of the encoder.

For more information see the SDK documentation on MSDN, and articles Getting started with IIS Live Smooth Streaming and Apple HTTP Live Streaming with IIS Media Services.

OTHER TIPS

You should be able to use vlc to transcode the file (or just stream it) then connect to the stream it produces. I know you're experimenting with C#, but it seems odd to re-invent the wheel, especially when it's such a good one!

I'm sure you'd have some fun automating vlc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top