[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mjpeg-users
Subject:    Re: [Mjpeg-users] mjpg webcam image to jpg
From:       Christian Verbeek <verbeek () servicerobotics ! eu>
Date:       2011-11-20 8:40:21
Message-ID: 4EC8BCF5.1010406 () servicerobotics ! eu
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Gernot,

Am 19.11.2011 20:04, schrieb Gernot Ziegler:
> Hej Christian,
>
> sorry for disappointing you, but AFAIK, JPEG has different DCT
> coefficients, and thus you can't recode JPG frames into MPEG1.
>
> Regarding missing DHT segements, I don't know more than:
> You could try inserting the DHT segment from an encoded JPEG into the
> "broken" frames arriving from the stream? Or does the DHT segment
> differ for every frame? But that is the only "hack" I could think of
> (without getting deeper into the subject, I left it 10 years ago)
The DHT segment is constant. So it would be possible to insert some non
changing data into the broken frames. The question here is: Where to
insert? I really have no idea and so far found nothing about the
internal structure of jpeg images.

Regards
Christian
>
> Sorry to be of so little help,
>   Gernot
>
>> Dear all,
>>
>> It might be that my question is a bit out of topic but I think you guys
>> might be able to help.
>>
>> You maybe know that a couple of modern webcams output some kind of
>> motion JPG image. The Logitech C905 webcam does so. The data is a
>> jpg-image without DHT segment. With the help of google I managed to
>> patch libjpeg to be able to decode these crippled jpg-images. The code
>> can be found here
>>
>> http://svn.openrobotino.org/common/trunk/lib/rec/cv_lt/jpeg_dec.cpp
>>
>> Still it would be nice to take the webcam's output and stream it
>> directly to a web browser. But because of the missing DHT segment
>> browsers are not able to decode the data. My work around right now is to
>> decode the data with my patched libjpeg and encode again as real jpg.
>> This works but puts my embedded platform to almost 100% cpu load.
>>
>> The question is if there is a way to insert the missing DHT segment to
>> the mjpg data without the need of decoding/encoding the image. Or is
>> there a simple way to make a mpg1 stream from these mjpg single images
>> coming from the webcam?
>>
>> Any help is highly appreciated
>> Regards
>> Christian
>>
>> -- 
>> ___________________________________________
>> REC GmbH
>> Dr. Christian Verbeek
>> Robert-Koch-Str. 2, 82152 Planegg
>>
>> Tel:    +49 89 85689672
>> Fax:    +49 89 85902327
>> Mobile: +49 160 7056589
>> e-mail: verbeek@servicerobotics.eu
>>
>> Geschäftsführer: Dr. Christian Verbeek
>> Registergericht: AG München (HRB 154463)
>> ____________________________________________
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> Mjpeg-users mailing list
>> Mjpeg-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mjpeg-users
>>
>>
>>
>
> Servus,
>   Gernot
>
> GPU. 3D Vision. Europe. Future. Now.
> Drop by: www.mpi-sb.mpg.de/~gziegler - www.geofront.eu
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application performance, 
> security threats, fraudulent activity, and more. Splunk takes this 
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
>
>
> _______________________________________________
> Mjpeg-users mailing list
> Mjpeg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mjpeg-users


-- 
___________________________________________
REC GmbH
Dr. Christian Verbeek
Robert-Koch-Str. 2, 82152 Planegg

Tel:    +49 89 85689672
Fax:    +49 89 85902327
Mobile: +49 160 7056589
e-mail: verbeek@servicerobotics.eu

Geschäftsführer: Dr. Christian Verbeek
Registergericht: AG München (HRB 154463)
____________________________________________ 



[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Gernot,<br>
    <br>
    Am 19.11.2011 20:04, schrieb Gernot Ziegler:
    <blockquote
      cite="mid:alpine.DEB.1.00.1111192001300.3830@geofront.eu"
      type="cite">Hej Christian,
      <br>
      <br>
      sorry for disappointing you, but AFAIK, JPEG has different DCT
      coefficients, and thus you can't recode JPG frames into MPEG1.
      <br>
      <br>
      Regarding missing DHT segements, I don't know more than:
      <br>
      You could try inserting the DHT segment from an encoded JPEG into
      the "broken" frames arriving from the stream? Or does the DHT
      segment differ for every frame? But that is the only "hack" I
      could think of (without getting deeper into the subject, I left it
      10 years ago)
      <br>
    </blockquote>
    The DHT segment is constant. So it would be possible to insert some
    non changing data into the broken frames. The question here is:
    Where to insert? I really have no idea and so far found nothing
    about the internal structure of jpeg images.<br>
    <br>
    Regards<br>
    Christian<br>
    <blockquote
      cite="mid:alpine.DEB.1.00.1111192001300.3830@geofront.eu"
      type="cite">
      <br>
      Sorry to be of so little help,
      <br>
      &nbsp; Gernot
      <br>
      <br>
      <blockquote type="cite">Dear all,
        <br>
        <br>
        It might be that my question is a bit out of topic but I think
        you guys
        <br>
        might be able to help.
        <br>
        <br>
        You maybe know that a couple of modern webcams output some kind
        of
        <br>
        motion JPG image. The Logitech C905 webcam does so. The data is
        a
        <br>
        jpg-image without DHT segment. With the help of google I managed
        to
        <br>
        patch libjpeg to be able to decode these crippled jpg-images.
        The code
        <br>
        can be found here
        <br>
        <br>
<a class="moz-txt-link-freetext" \
href="http://svn.openrobotino.org/common/trunk/lib/rec/cv_lt/jpeg_dec.cpp">http://svn.openrobotino.org/common/trunk/lib/rec/cv_lt/jpeg_dec.cpp</a>
  <br>
        <br>
        Still it would be nice to take the webcam's output and stream it
        <br>
        directly to a web browser. But because of the missing DHT
        segment
        <br>
        browsers are not able to decode the data. My work around right
        now is to
        <br>
        decode the data with my patched libjpeg and encode again as real
        jpg.
        <br>
        This works but puts my embedded platform to almost 100% cpu
        load.
        <br>
        <br>
        The question is if there is a way to insert the missing DHT
        segment to
        <br>
        the mjpg data without the need of decoding/encoding the image.
        Or is
        <br>
        there a simple way to make a mpg1 stream from these mjpg single
        images
        <br>
        coming from the webcam?
        <br>
        <br>
        Any help is highly appreciated
        <br>
        Regards
        <br>
        Christian
        <br>
        <br>
        --
        <br>
        ___________________________________________
        <br>
        REC GmbH
        <br>
        Dr. Christian Verbeek
        <br>
        Robert-Koch-Str. 2, 82152 Planegg
        <br>
        <br>
        Tel:&nbsp;&nbsp;&nbsp; +49 89 85689672
        <br>
        Fax:&nbsp;&nbsp;&nbsp; +49 89 85902327
        <br>
        Mobile: +49 160 7056589
        <br>
        e-mail: <a class="moz-txt-link-abbreviated" \
href="mailto:verbeek@servicerobotics.eu">verbeek@servicerobotics.eu</a>  <br>
        <br>
        Gesch&auml;ftsf&uuml;hrer: Dr. Christian Verbeek
        <br>
        Registergericht: AG M&uuml;nchen (HRB 154463)
        <br>
        ____________________________________________
        <br>
        <br>
        <br>
        <br>
------------------------------------------------------------------------------
        <br>
        All the data continuously generated in your IT infrastructure
        <br>
        contains a definitive record of customers, application
        performance,
        <br>
        security threats, fraudulent activity, and more. Splunk takes
        this
        <br>
        data and makes sense of it. IT sense. And common sense.
        <br>
        <a class="moz-txt-link-freetext" \
href="http://p.sf.net/sfu/splunk-novd2d">http://p.sf.net/sfu/splunk-novd2d</a>  <br>
        _______________________________________________
        <br>
        Mjpeg-users mailing list
        <br>
        <a class="moz-txt-link-abbreviated" \
href="mailto:Mjpeg-users@lists.sourceforge.net">Mjpeg-users@lists.sourceforge.net</a> \
                <br>
        <a class="moz-txt-link-freetext" \
href="https://lists.sourceforge.net/lists/listinfo/mjpeg-users">https://lists.sourceforge.net/lists/listinfo/mjpeg-users</a>
  <br>
        <br>
        <br>
        <br>
      </blockquote>
      <br>
      Servus,
      <br>
      &nbsp; Gernot
      <br>
      <br>
      GPU. 3D Vision. Europe. Future. Now.
      <br>
      Drop by: <a class="moz-txt-link-abbreviated" \
href="http://www.mpi-sb.mpg.de/~gziegler">www.mpi-sb.mpg.de/~gziegler</a> - <a \
class="moz-txt-link-abbreviated" href="http://www.geofront.eu">www.geofront.eu</a>  \
<br>  <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">------------------------------------------------------------------------------
 All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
<a class="moz-txt-link-freetext" \
href="http://p.sf.net/sfu/splunk-novd2d">http://p.sf.net/sfu/splunk-novd2d</a></pre>  \
<br>  <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Mjpeg-users mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:Mjpeg-users@lists.sourceforge.net">Mjpeg-users@lists.sourceforge.net</a> \
<a class="moz-txt-link-freetext" \
href="https://lists.sourceforge.net/lists/listinfo/mjpeg-users">https://lists.sourceforge.net/lists/listinfo/mjpeg-users</a>
 </pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
___________________________________________
REC GmbH
Dr. Christian Verbeek
Robert-Koch-Str. 2, 82152 Planegg

Tel:    +49 89 85689672
Fax:    +49 89 85902327
Mobile: +49 160 7056589
e-mail: <a class="moz-txt-link-abbreviated" \
href="mailto:verbeek@servicerobotics.eu">verbeek@servicerobotics.eu</a>

Gesch&auml;ftsf&uuml;hrer: Dr. Christian Verbeek
Registergericht: AG M&uuml;nchen (HRB 154463)
____________________________________________ 

</pre>
  </body>
</html>



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d

_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic