Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET4.0
any code for live streaming in using c#
thanks in advance
Posted 23-Jun-12 7:01am
Edited 23-Jun-12 7:02am
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
Please Sign up or sign in to vote.

Solution 1

Abhinav S at 2-Jul-12 5:00am
Shahin Khorshidnia at 2-Jul-12 5:39am
Thank you very much Abhinav :)
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 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 Maciej Los 495
1 Sergey Alexandrovich Kryukov 479
2 OriginalGriff 360
3 CHill60 280
4 CPallini 250
0 Sergey Alexandrovich Kryukov 10,102
1 OriginalGriff 9,495
2 Peter Leow 5,241
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,076

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