libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] MJPEG streaming using MHD : only first frame display


From: Christian Grothoff
Subject: Re: [libmicrohttpd] MJPEG streaming using MHD : only first frame displayed in client
Date: Fri, 05 Sep 2014 12:29:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.6.0

Hi!

I believe the problem is that your boundary is set to
"--MyBoundary\r\nContent-Type: ..." which works fine for the first
frame, but because the JPG doesn't (usually) end with "\r\n" this is not
a valid boundary for the subsequent frames.  You need to use
"\r\n--MyBoundary\r\nContent-Type: ..." so that the browser detects the
boundary correctly.

At least that's my best guess right now.  Generally, you should probably
use wireshark to look at the HTTP stream that you're generating, that
way you can likely tell yourself if it looks 'correct'.

Happy hacking!

Christian

On 08/19/14 09:42, Kiran G wrote:
> Hi all,
> 
> I am trying to implement MJPEG streaming server using MHD. I have
> attached my test code.
> 
> Basically I am looping through a directory with JPEG files to create
> each frame. And I am able to start the process without any error.
> 
> But fetching the URL using wget gets stuck . Vlc player shows the first
> frame only.
> 
> I suspect there is some issue with buffer handling in the callback
> function. Please take a look and let me know if you find any issues in
> my code(Please note that this is just  POC code). Also If there is a
> publicly available implementation of MJPEG server using MHD please let
> me know.
> 
> Thanks for your time.
> 
> Regards,
> Kiran G
> 
> 
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]