Click here to Skip to main content
13,002,133 members (80,248 online)
Rate this:
Please Sign up or sign in to vote.
See more:
any code for live streaming in using c#
thanks in advance
Posted 23-Jun-12 6:01am
Updated 23-Jun-12 6:02am
Joseph-Ali 9-Jul-12 9:04am
This depends on where from and where to you want to stream (web client to another web client, server to general client, etc.)

Also, what exactly do you mean by "live" streaming? Will you be streaming from a capture source such as web cam?

Finally, are there any restrictions on the video format and the compression used (MPEG2, H264, Flash video, etc.)?
مجاهد أحمد 13-Nov-13 0:55am
how can i stream for capture web cam?
ramakant verma 10-Nov-15 1:01am
Hi Joseph
I am working on online virtual class room kind of application. where i have to achieve live video stream from web client(Teacher) to mutiple web clients(Students).
Can you please provide any help regarding this.
Member 9695480 21-May-13 4:54am
Moi je souhaite envoyer le flux de la webcam en Streaming sur ma page aspx. Comment procéder? j'utilise la bibliothèque AForge qui me permet de détecter la webcam et de l'activer mais après ces étapes, je ne sais plus trop comment procéder. Pouvez vous m'aider?
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

public void ProcessRequest(HttpContext context) {
    // read input etx
    context.Response.Buffer = false;
    context.Response.ContentType = "text/plain";
    string path = @"c:\somefile.txt";
    FileInfo file = new FileInfo(path);
    int len = (int)file.Length, bytes;
    context.Response.AppendHeader("content-length", len.ToString());
    byte[] buffer = new byte[1024];
    Stream outStream = context.Response.OutputStream;
    using(Stream stream = File.OpenRead(path)) {
        while (len > 0 && (bytes =
            stream.Read(buffer, 0, buffer.Length)) > 0)
            outStream.Write(buffer, 0, bytes);
            len -= bytes;
nariman008 10-Sep-14 3:26am
hi larry what is this code for? can i put a video or audio path to it and get that stream in my android phone?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 26 Mar 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100