Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 606247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:14:03+00:00 2026-05-13T17:14:03+00:00

I have an ASP.NET application that I need to show a video feed from

  • 0

I have an ASP.NET application that I need to show a video feed from a security camera. The video feed has a content type of ‘multipart/x-mixed-replace; boundary=–myboundary’ with the image data between the boundaries. I need assistance with passing that stream of data through to my page so that the client side plugin I have can consume the stream just as it would if I browsed to the camera’s web interface directly.
The following code does not work:

//Get response data
byte[] data = HtmlParser.GetByteArrayFromStream(response.GetResponseStream());
if (data != null)
{
 HttpContext.Current.Response.OutputStream.Write(data, 0, data.Length);
}
return;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:14:04+00:00Added an answer on May 13, 2026 at 5:14 pm

    Well, if you want your client to see the mjpeg stream, you need to send the whole http response. HTTP client like browser or media player like VLC need a mjpeg stream that looks like :

    HTTP/1.1 200 OK
    Content-Type: multipart/x-mixed-replace; boundary=myboundary
    
    --myboundary
    Content-Type: image/jpeg
    Content-length: 12345
    
    [image 1 encoded jpeg data]
    
    
    --myboundary
    Content-Type: image/jpeg
    Content-length: 45678
    
    [image 2 encoded jpeg data]
    
    ...
    

    NOTE: As Ergousha said in an answer, you must have an empty line after the Content-length field.

    By the way, why not redirect your client directly to the mjpeg stream ?

    You can use http://ipcam/mjpg/video.mjpg AXIS IP cameras for example.

    If you just need the image through HTTP, you have to set the correct header and the MIME content-type
    image/jpeg. To decode the image, you have to get the byte data and you will get jpeg encoding. Then you will have to decode jpeg to get an image in a specific format (something like yuv420p I think). I’ve check on my ip camera, and its stream is not base64 encoded I think.

    Precise your needs, I will try to help more.

    my2c

    EDIT:

    Well, I suppose you do something like :

    client    : connect to proxy, 
                get example.com/camera1.mjpg,
                while not the end
                    recv
    
    
    yourproxy : wait connection
                connect to camera,
                get 10.0.0.123/camera1.mjpg
                while not the end
                    recv buffer
                    copy buffer
                    send buffer to client
    

    That to say that you must send the correct header to your client. To be sure use a tool like wireshark to spy on the packet and be sure that after your client has issued a HTTP GET you send to him the correct MJPEG stream (like the one I describe at the beginning of my post …)

    m2c

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC Web Application that interacts with a SQL Server 2008
I just started using NLog in my asp.net application, and I need to see
I have an ASP.NET Web Forms application. There is a page with TextBoxes and
I have to maintain an ASP.net application in VB.Net. There is a page with
I'm looking into building an ASP.NET MVC application that exposes (other than the usual
In order to support a legacy application that's in the field, I need my
I'm using sql dependent caching in my ASP.NET application, and to achieve this I
So currently in our code, we have a bunch of classes around accessing roles
I have no experience on this matter, so I do not expect anyone to
This is a very broad question, but hopefully I can get useful tips. Currently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.