This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

5m mjpeg play for appro ipnc code base

Dears,

I need play 5M mjpeg for appro ipnc368 code base, 5fps frame rate is accessable. In WISJPEGStreamSource.cpp, I modified fLastHeight and fLastWidth

/*

            fLastHeight = (fBuffer[i+5]<<5)|(fBuffer[i+6]>>3);
            fLastWidth = (fBuffer[i+7]<<5)|(fBuffer[i+8]>>3);

*/

            int tHeight  = (fBuffer[i+5] << 8) | (fBuffer[i+6]);
            int tWidth = (fBuffer[i+7] << 8) | (fBuffer[i+8]);
            int scale = 16;

            fLastHeight = tHeight /scale;
            fLastWidth = tWidth / scale;

But I can't find where to modify in my appro activeX play control client code. I browse the ffmpeg source code, it seems there are no mjpeg rtp decode code to recovery jpeg picture width and height.

Can help me?

  • Hi Wan,

    You can give a try with this code?

    Regards,

    Venu

  •      My real problem is I can't find the rtp protoco decode source code segment in ffmpeg that recovery jpeg picture width and height. If I can find it, just only change

      unsigned width = (unsigned)headerStart[6] * 8;
      unsigned height = (unsigned)headerStart[7] * 8;

    to

      unsigned width = (unsigned)headerStart[6] * 16;
      unsigned height = (unsigned)headerStart[7] * 16;

    like in JPEGVideoRTPSource.cpp in live555, or ffmpeg don't process mjpeg rtp packet decode?  If this is true, what code function like live555?

    I am sorry my english is poor.

  • when jpeg picture dimension scale factor is 8( normal, consistent with rtp specification)

    when jpeg picture dimension scale factor is 16( custom, to support jpeg picture width beyond 2040, Inconsistent with rtp mjpeg specification)