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 6205569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:17:52+00:00 2026-05-24T05:17:52+00:00

I want to receive images from an IP camera over HTTP via GET request.

  • 0

I want to receive images from an IP camera over HTTP via GET request. I have written a program that creates TCP socket connection with the camera and sends the following GET request to the camera:

GET /mjpeg?res=full HTTP/1.1\r\nHost: 143.205.116.14\r\n\r\n

After that, I receive images with the following function in a while loop:

while((tmpres = recv(sock,(void *) buf, SIZE, 0)) > 0 && check<10)

…..

where SIZE represents the size of the buffer. I, infact, don’t know what size to define here. I am receiving a color image of size 2940×1920. So I define SIZE=2940x1920x3. After receiving the MJPEG image, I decode it with ffmpeg. But I observe that ffmpeg just partially/uncorrectly decodes the image and I just see a half (or even less) of the image. I assume it could be a size problem.
Any help in this regard would be highly appreciated.

Regards,

Khan

  • 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-24T05:17:53+00:00Added an answer on May 24, 2026 at 5:17 am

    Why reinvent the wheel (for the umpteenth time)? Use a ready-made HTTP client library, such as libcurl.

    For that matter, perhaps you can even just write your entire solution as a shell script using the curl command line program:

    #!/bin/sh
    
    curl -O "http://143.205.116.14/mjpeg?res=full" || echo "Error."
    curl -o myfile.jpg "http://143.205.116.14/mjpeg?res=full" || echo "Error."
    
    # ffmpeg ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to receive the following HTTP request in PHP: Content-type: multipart/form-data;boundary=main_boundary --main_boundary Content-type:
Greetings, I want to write a script that handles simple http requests from Google
I have stereo cameras systems. In my program I catch the images from each
im in Flash CS5. I have a TileList that loads its images from an
I have an application that receives a pointer to JPEG data from a camera
I just want to transfer (send or receive) a hash from client to server.
I want to list messages that received specific user from other users group by
How to receive an Image via dojo.xhr ? I have a datagrid , and
Is it possible to resize images which we receive from sprite. I mean like
I want to get an extension (or HTTP headers received) and base64-encoded (seems like

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.