# Two stream - 1080p MJPEG encoder

Source: [https://docs.qualcomm.com/doc/80-70015-50/topic/1080p-mjpeg-encoder.html](https://docs.qualcomm.com/doc/80-70015-50/topic/1080p-mjpeg-encoder.html)

The MJPEG encoder encodes and writes the captured video stream in an MJPEG format.
        Run the use cases for encoding, saving to file, and previewing on display.

The following are the various use cases for this encoder:

- H.264 encode and MJPEG dump to a
                    file:

        gst-pipeline-app -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux.mp4" camsrc. ! "image/jpeg,width=3840,height=2160,framerate=30/1" ! queue ! avimux ! filesink location=/opt/4k_mjpeg.avi sync=true async=falseCopy to clipboard

    The
                        mux.mp4 and 4k\_mjpeg.avi files are
                    stored at /opt/.
- H.265 encode and MJPEG dump to a
                    file:

        gst-pipeline-app -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h265enc capture-io-mode=5 output-io-mode=5 ! queue ! h265parse ! mp4mux ! queue ! filesink location="/opt/mux.mp4" camsrc. ! "image/jpeg,width=3840,height=2160,framerate=30/1" ! queue ! avimux ! filesink location=/opt/4k_mjpeg.avi sync=true async=falseCopy to clipboard

    The
                        mux.mp4 and 4k\_mjpeg.avi files are
                    stored at /opt/.
- Preview on display with MJPEG encoding in a file:

        gst-pipeline-app -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! queue ! waylandsink fullscreen=true camsrc.video_1 ! "image/jpeg,width=1920,height=1080,framerate=30/1" ! queue ! avimux ! filesink location=/opt/mjpeg.avi sync=true async=falseCopy to clipboard

    The
                    video is previewed on a screen and the mjpeg.avi file is
                    stored at /opt/.
- Preview on display with MJPEG and H.264 encoding in a file:

        gst-pipeline-app -e qtiqmmfsrc name=camsrc video_0::type=preview ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! queue ! waylandsink fullscreen=true camsrc.video_1 ! "image/jpeg,width=1920,height=1080,framerate=30/1" ! queue ! avimux ! filesink location=/opt/mjpeg.avi sync=true async=false camsrc.video_2 ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location="/opt/mux.mp4"Copy to clipboard

    The
                    video is previewed on a screen and the mux.mp4 and
                        mjpeg.avi files are stored at
                        /opt/.

**Parent Topic:** [Camera and video encode](https://docs.qualcomm.com/doc/80-70015-50/topic/camera-and-video-encode.html)

Last Published: Oct 27, 2025

[Previous Topic
Three stream – 4K JPEG snapshot, 1080p AVC MP4, 1080p YUV from live source](https://docs.qualcomm.com/bundle/publicresource/80-70015-50/topics/three-stream_4k_jpeg_snapshot_1080p_avc_mp4_1080p_yuv_from_live_source.md) [Next Topic
Slice-based encoding](https://docs.qualcomm.com/bundle/publicresource/80-70015-50/topics/slice-based-encoding.md)