[Live-devel] Stair or Zig-Zag view with Mjpeg codec

Ross Finlayson finlayson at live555.com
Tue May 21 00:05:10 PDT 2019


> I am working on an IPCamera project and use live555 library for RTSP streaming of media. We have recently introduced option for user to select resolution of their choice. There seems to be an issue with RTSP streaming with custom resolution in MJPEG codec. Whenever the width is set to 180/230/260/310/340 pixels and so on the view is staired or cut and forms a zig-zag pattern. The issue doesn't seem to exist for H264/H265 codecs. So is there any limitation of the library for these widths for MJPEG?

Yes.  The RTP payload format for JPEG streaming (RFC 2435) requires that the width and height of the image be a multiple of 8 pixels.  (The payload format is not defined for widths or heights that are not multiples of 8 pixels.)

So, if you insist on streaming via motion-JPEG (but see <http://live555.com/liveMedia/faq.html#jpeg-streaming> for why this is usually a bad idea), your image widths/heights must be a multiple of 8.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

ps. If you are using our software in a product, you are free to do so, provided that you comply with the requirements of the GNU LGPL v3; see http://live555.com/liveMedia/faq.html#copyright-and-license




More information about the live-devel mailing list