Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET4.0
any code for live streaming in asp.net using c#
thanks in advance
Posted 23-Jun-12 7:01am
Edited 23-Jun-12 7:02am
v2
Comments
Joseph-Ali at 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.)?
مجاهد أحمد at 13-Nov-13 0:55am
   
how can i stream for capture web cam?
Member 9695480 at 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
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
Abhinav S at 2-Jul-12 5:00am
   
5!
Shahin Khorshidnia at 2-Jul-12 5:39am
   
Thank you very much Abhinav :)
Rate this: bad
good
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;
        }
    }
}
  Permalink  
Comments
nariman008 at 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
0 DamithSL 285
1 Zoltán Zörgő 170
2 OriginalGriff 140
3 Sergey Alexandrovich Kryukov 120
4 Maciej Los 115
0 OriginalGriff 7,740
1 DamithSL 5,769
2 Sergey Alexandrovich Kryukov 5,424
3 Maciej Los 5,076
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 26 Mar 2014
Copyright © CodeProject, 1999-2014
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