On Thu, May 20, 2010 at 3:17 AM, Andy Bell <span dir="ltr"><<a href="mailto:andy@j2kvideo.com">andy@j2kvideo.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<div><br></div><div>I have used the 'Elphel' code to build a simple RTSP server which streams a fixed JPEG frame. I want to be able to configure the RTSP server to use a specific JPEG file on disk. The problem I have is that different JPEG files have different header sizes and I want to work out how I can work out where the header ends and where the payload begins. Looking at the header I can locate the start of the scan using the marker 0xFFDA, but even when I send this back to the client I don't get a valid image. As I am using a JPEG file I have no idea of the Q factor so I have set this to 100 for the time being. Is there any code out there which can help me break up a JPEG file from disk and stream it back to the client? If not, where am I going wrong?
</div></blockquote><div><br>You could probably use libjpeg (<a href="http://www.ijg.org/">http://www.ijg.org/</a>) to get at the raw image data. <br></div></div><br>