mjpeg_omx
The plug-in mjpeg_omx supports JPEG picture and MJPEG video hard
decoding through VPU.
Note: The plug-in does not support hard
encoding
The following code block shows the special options supported by the plug-ins.
Option | Type | Explanation |
---|---|---|
-omx_pix_fmt |
string | Set the decoding pixel format for mjpeg_omx decoder. The following formats are supported: yuv420p, nv12, nv21, nv16, yuv422p, yuyv422, yvyu422, uyvy422, yuv444p. |
-scale_width |
int | Set the scaling width for OMX (Only zoom out is supported, ceil 8 (width/8) and minimum 1/8) (from 0 to INT_MAX) (default 0) |
-scale_height |
int | Set the scaling height for OMX (Only zoom out is supported, ceil 8 (height/8) and minimum 1/8) (from 0 to INT_MAX) (default 0) |
-mirror |
int | Mirror 0 (none), 1 (V), 2 (H) or 3 (VH), cannot be set at the same time as pixel format conversion, rotation and crop (from 0 to 3) (default 0) |
-rotation |
int | Rotation 0 (0), 1 (90), 2 (180) or 3 (270), cannot be set at the same time as pixel format conversion, mirror and crop (from 0 to 3) (default 0) |
-crop |
string | Crop <x>, <y>, <w>, <h>: crop coord and width/height(from left/top, must be an integer multiple of 16), cannot be set at the same time as pixel format conversion, mirror and rotation. |
The following code block shows an example of decoding a 3840x2160 JPEG picture output to
nv21 1920x1080 yuv.
ffmpeg -nostdin -nostats -c:v mjpeg_omx -omx_pix_fmt nv21 -scale_width 1 -scale_height 1 -i JPG_3840_2160_420.jpg ff_JPG_1920_2160_i420_scale.yuv -hide_banner -y -v verbose