MPEG Video Decoding

General Example

The section provides an example for decoding an MPEG video file to YUV.

The example requires the following plug-in(s).
  • mjpeg_omx
The following code block shows the example in general.
ffmpeg -nostdin -nostats -c:v mjpeg_omx -omx_pix_fmt nv12 -scale_width 1 -i MJPEG_3840_2160_444.mjpeg ff_MJPEG_1920_2160_420_scale.yuv -hide_banner -y -v verbose

Scenarios

The following code block provides examples in different scenarios.
  • Output YUV and mirror vertical:
    ffmpeg -c:v mjpeg_omx -mirror 1 -i sample_3840x2160.mjpeg ff_MJPEG_3840_2160_I420.yuv -hide_banner -y
  • output YUV and rotation 90 degrees:
    ffmpeg -c:v mjpeg_omx -rotation 1 -i sample_3840x2160.mjpeg ff_MJPEG_3840_2160_rotation.yuv -hide_banner -y
  • Output YUV with crop at x:800 y:800 width:800 height:800:
    ffmpeg -c:v mjpeg_omx -crop 800,800,800,800 -i sample_3840x2160.mjpeg ff_MJPEG_800_800_crop.yuv -hide_banner -y
    Note: The crop width and height must be a value of 16 multiples.