<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks for the quick response Ross,<div><br></div><div><blockquote type="cite"><div><br>Note that the existing "JPEGVideoRTPSink" code already does this. You should not have to reinvent the wheel here.</div></blockquote><br></div><div>I think I should explained this better. I don't know how to obtain the qFactor from one MJPEG image so I'm copying all the values from the original image to the new header. And then TestJPEGVideoSource::qFactor() returns 255. Maybe this part is wrong and I need to calculate the Q, but how? is there an example of this somewhere?.</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Helvetica; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Helvetica; "><blockquote type="cite"><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br>The JPEG transmitting code ("JPEGVideoSource" and "JPEGVideoRTPSink") currently don't support "Restart Marker Headers" (see RFC 2435, section 3.1.7). You will need to update the (definition and implementation) of these two classes to support them.</span></font></div></blockquote><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Helvetica; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;">Ok, I have been thinking on other possibility. Do you know if is possible to decode de MJPEG image to get a simpler version and remove the restart marker headers?</span></font></div></div><div><br></div><div><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-family: arial; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px; ">-- <br>Francisco Feijoo<br>Software Engineer<br>J2K Video Limited<br></span></font></span></div><div><span class="Apple-style-span" style="font-family: arial; "><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px; ">W: <a href="http://www.j2kvideo.com">www.j2kvideo.com</a></span></font></span></div></div></span></div></span></div></span></div>
</div>
<br><div><div>El 27/10/2010, a las 02:39, Ross Finlayson escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite">I'm trying to create a rtsp server to stream MJPEG images.<br></blockquote><br>Ugh. JPEG is a *terrible* codec for video streaming.<br><br><br><blockquote type="cite"> I have implemented a new TestJPEGFileServerMediaSubsession that creates a TestJPEGVideoRTPSink.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In TestJPEGVideoRTPSink::doSpecialFrameHandling I'm adding the quantization tables of the image into the header using setSpecialHeaderBytes<br></blockquote><br>Note that the existing "JPEGVideoRTPSink" code already does this. You should not have to reinvent the wheel here.<br><br><br><blockquote type="cite">This is working fine using some JPEG images, but fails with others.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'm testing one image that has the marker 0xFF, 0xDD ( Define Restart Interval) and I think I have to do something else seeing this comment in the code<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">// Note: We assume that there are no 'restart markers'<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">So, what should I do with images containing restart markers and macroblocks?<br></blockquote><br>The JPEG transmitting code ("JPEGVideoSource" and "JPEGVideoRTPSink") currently don't support "Restart Marker Headers" (see RFC 2435, section 3.1.7). You will need to update the (definition and implementation) of these two classes to support them.<br>-- <br><br>Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a><br>_______________________________________________<br>live-devel mailing list<br>live-devel@lists.live555.com<br>http://lists.live555.com/mailman/listinfo/live-devel<br></div></blockquote></div><br></div></body></html>