Search code examples
videovideo-streamingmjpeg

packing MJPEG into MPEG-TS


I have algo that packing RAW h264 into MPEG-TS. But I need also to pack MJPEG. Whats PES stream_type id I need? For h264 it is 0x1b. Or it is impossible to pack MJPEG and streaming it via UDP? Thanks.


Solution

  • I think you cannot pack MJPEG inside MPEG2-TS. But you can pack it in other formats wiki:

    Unlike the video formats specified in international standards such as MPEG-2 and the format specified in the JPEG still-picture coding standard, there is no document that defines a single exact format that is universally recognized as a complete specification of “Motion JPEG” for use in all contexts. This raises compatibility concerns about file outputs from different manufacturers. However, each particular file format usually has some standard how M-JPEG is encoded. For example, Microsoft documents their standard format to store M-JPEG in AVI files,[2] Apple documents how M-JPEG is stored in QuickTime files, RFC 2435 describes how M-JPEG is implemented in an RTP stream, and an M-JPEG CodecID is planned for the Matroska file format

    Also, there is no corresponding elementary stream id here: http://en.wikipedia.org/wiki/Program-specific_information.

    You can use UDP/RTP to stream it. For example, you can use gstreamer (http://gstreamer.freedesktop.org).