<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Il 27/10/2010 09:32, Francisco Feijoo ha scritto:
    <blockquote
      cite="mid:3E3638C5-6C30-4F20-8C2B-2A78E6545151@j2kvideo.com"
      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
        &nbsp;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>
    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]<br>
    <br>
    <blockquote
      cite="mid:3E3638C5-6C30-4F20-8C2B-2A78E6545151@j2kvideo.com"
      type="cite">
      <div>
        <div style="margin: 0px; font: 10px Helvetica;"><font
            class="Apple-style-span" size="3"><span
              class="Apple-style-span" style="font-size: 12px;"><br>
            </span></font></div>
        <div style="margin: 0px; font: 10px 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). &nbsp;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: 0px; font: 10px 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;"><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; font-size: medium;">
              <div style="word-wrap: break-word;"><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;">
                  <div style="word-wrap: break-word;"><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;">
                      <div style="word-wrap: break-word;">
                        <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;">--&nbsp;<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
                                  moz-do-not-send="true"
                                  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&oacute;:</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. &nbsp;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). &nbsp;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 moz-do-not-send="true" href="http://www.live555.com/">http://www.live555.com/</a><br>
              _______________________________________________<br>
              live-devel mailing list<br>
              <a class="moz-txt-link-abbreviated" href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
              <a class="moz-txt-link-freetext" href="http://lists.live555.com/mailman/listinfo/live-devel">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
live-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a>
<a class="moz-txt-link-freetext" href="http://lists.live555.com/mailman/listinfo/live-devel">http://lists.live555.com/mailman/listinfo/live-devel</a>
</pre>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      Belloni Cristiano<br>
      Imavis Srl.<br>
      <a href="http://www.imavis.com">www.imavis.com</a><br>
      <a href="mailto://belloni@imavis.com">belloni@imavis.com</a><br>
    </div>
  </body>
</html>