Now I'm extracting the tables starting with FFDB and adding them in doSpecialFrameHandling(). What Q value should I use? I have used 255 to indicate that each frame could have different tables.<div><br><br><div class="gmail_quote">
2010/10/27 Cristiano Belloni <span dir="ltr"><<a href="mailto:belloni@imavis.com">belloni@imavis.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div text="#000000" bgcolor="#ffffff">
Il 27/10/2010 09:32, Francisco Feijoo ha scritto:
<div class="im"><blockquote type="cite">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>
</blockquote>
<br></div>
Q factor is 255 if the quantization tables are dynamic. You got to
extract the quantization tables parsing the JPEG header and looking
for the "DQT" marker(s), [0xFF 0xDB as far as I remember]<div><div></div><div class="h5"><br>
<br>
<blockquote type="cite">
<div>
<div style="margin:0px;font:10px Helvetica"><font size="3"><span style="font-size:12px"><br>
</span></font></div>
<div style="margin:0px;font:10px Helvetica">
<blockquote type="cite">
<div><font size="3"><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 size="3"><span style="font-size:12px"><br>
</span></font></div>
<div style="margin:0px;font:10px Helvetica"><font size="3"><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"><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;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium">
<div style="word-wrap:break-word"><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;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div style="word-wrap:break-word"><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;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div style="word-wrap:break-word">
<div><span style="font-family:arial"><font size="2"><span style="font-size:10px">-- <br>
Francisco Feijoo<br>
Software Engineer<br>
J2K Video Limited<br>
</span></font></span></div>
<div><span style="font-family:arial"><font size="2"><span style="font-size:10px">W: <a href="http://www.j2kvideo.com" target="_blank">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>
<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/" target="_blank">http://www.live555.com/</a><br>
_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
</div>
</blockquote>
</div>
<br>
</div>
<pre><fieldset></fieldset>
_______________________________________________
live-devel mailing list
<a href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a>
</pre>
</blockquote>
<br>
<br>
</div></div><div class="im"><div>-- <br>
Belloni Cristiano<br>
Imavis Srl.<br>
<a href="http://www.imavis.com" target="_blank">www.imavis.com</a><br>
<a href="mailto://belloni@imavis.com" target="_blank">belloni@imavis.com</a><br>
</div>
</div></div>
<br>_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Francisco Feijoo<br>Software Engineer<br>J2K Video Limited<br><br>T: +34 654967246<br>E: <a href="mailto:francisco@j2kvideo.com">francisco@j2kvideo.com</a><br>W: <a href="http://www.j2kvideo.com">www.j2kvideo.com</a><br>
</div>