OKMX8MM-C Development Board & Audio Function Interfaces

OKMX8MM-C is a development board designed by Forlinx based on NXP's i.MX8M Mini quad-core 64-bit processor, with a main frequency of up to 1.8GHz and a wide range of audio interfaces, including I2S, AC97, TDM, PDM and SPDIF. While performance and calculation are greatly improved, the system is running more smoothly.

△ OKMX8MM-C Development Board

The OKMX8MM-C development board focuses on providing an excellent video and audio experience, with the audio and video part of the application layer software using Gstreamer, while the video section has a video processing unit VPU, both of which support hardware codecs.

△ Hardware Codec Parameter Table

Let's feel the OKMX8MM-C board's processing power in audio and video.

1. Play with the player

◾ use the Gplay player

Gplay is a Gstreamer-based audio-visual player that automatically selects the right plug-in for audio and video playback based on hardware, and is easy to run.

$ gst-play-1.0 /home/forlinx/video/1080p_30fps_h265.mp4

◾ play audio and video using gst-launch

gst-launch is a debugging tool commonly used by developers during the development phase, and it is more flexible and, of course, more complex to use than Gplay.

Play audio only:

$ gst-launch-1.0 filesrc location=/home/forlinx/audio/test.mp3 ! id3demux ! queue !

mpegaudioparse ! decodebin ! audioconvert ! audioresample ! pulsesink

Play video only:

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_30fps_h265.mp4 typefind=true !

video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d !

video/x-raw, format=RGB16, width=1024, height=600 ! waylandsink

Play audio and video at the same time:

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_30fps_h265.mp4 typefind=true ! video/quicktime ! aiurdemux name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=1024, height=600 ! waylandsink demux. ! queue max-size-buffers=0 max-size-time=0

2.Video hard-coded

◾ H264 hard-coded

Encode YUV420 video as H264 video:

$ gst-launch-1.0 filesrc location=/home/forlinx/video/yuv420_p352x288.yuv ! videoparse format=2

width=352 height=288 ! video/x-raw,width=352,height=288 ! vpuenc_h264 ! queue !

h264parse ! qtmux ! filesink location=yuv2h264.mp4

Play the encoded H264 video:

$ gst-launch-1.0 filesrc location=yuv2h264.mp4 typefind=true ! video/quicktime ! aiurdemux !

queue max-size-time=0 ! vpudec ! waylandsink

You can see the video playing on the screen.

△ Pictured is a screenshot from a scenario audio file

◾ VP8 hard-coded

Encode YUV420 video as VP8 video:

$ gst-launch-1.0 filesrc location=/home/forlinx/video/yuv420_p352x288.yuv ! videoparse format=2

width=352 height=288 ! video/x-raw,width=352,height=288 ! vpuenc_vp8 ! queue ! qtmux !

filesink location=yuv2vp8.mkv

Play coded VP8 video:

$ gst-launch-1.0 filesrc location=yuv2vp8.mkv ! qtdemux ! queue ! vpudec ! waylandsink

you can see the video playing on the screen.

△ Pictured is a screenshot from a scenario audio file

3.Video hard decode

◾ H264 decoding

Decode and play H264 video files:

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_60fps_h264.mp4 typefind=true !

video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d !

video/x-raw, format=RGB16, width=1024, height=600 ! waylandsink

Decode and play H264 video files (with audio):

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_60fps_h264.mp4 typefind=true !

video/quicktime ! aiurdemux name=demux demux. ! queue max-size-buffers=0

max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=1024,

height=600 ! waylandsink demux. ! queue max-size-buffers=0

max-size-time=0 ! decodebin ! audioconvert ! audioresample ! pulsesink

△ Pictured is a screenshot from a scenario audio file

◾ H265 decoding

Decode and play H265 video files:

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_30fps_h265.mp4 typefind=true !

video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d !

video/x-raw, format=RGB16, width=1024, height=600 ! waylandsink

Decode and play H265 video files (with audio):

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_30fps_h265.mp4 typefind=true !

video/quicktime ! aiurdemux name=demux demux. ! queue max-size-buffers=0

max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=1024,

height=600 ! waylandsink demux. ! queue max-size-buffers=0 max-size-time=0

! decodebin ! audioconvert ! audioresample ! pulsesink

△ Pictured is a screenshot from a scenario audio file

◾ VP8 decoding

Decode and play VP8 video files:

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_30fps_vp8.webm typefind=true !

video/x-matroska ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d !

video/x-raw, format=RGB16,width=1024, height=600 ! waylandsink

Decode and play VP8 video files (with audio):

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_30fps_vp8.webm typefind=true !

video/x-matroska ! aiurdemux name=demux demux. ! queue max-size-buffers=0

max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16,width=1024, height=600 ! waylandsink demux. ! queue max-size-buffers=0 max-size-time=0 ! decodebin ! audioconvert ! audioresample ! pulsesink

△ Pictured is a screenshot from a scenario audio file

◾ VP9 decoding

Decode and play VP9 video files:

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_30fps_vp9.webm typefind=true !

video/x-matroska ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d !

video/x-raw, format=RGB16,width=1024, height=600 ! waylandsink

Decode and play VP9 video files (with audio):

$ gst-launch-1.0 filesrc location=/home/forlinx/video/1080p_30fps_vp9.webm typefind=true !

video/x-matroska ! aiurdemux name=demux demux. ! queue max-size-buffers=0

max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16,width=1024,

height=600 ! waylandsink demux. ! queue max-size-buffers=0 max-size-time=0

! decodebin ! audioconvert ! audioresample ! pulsesink

OKMX8MM-C development board is unique in the audio-visual experience, with high-performance audio and video processing capabilities, as well as 7.1-channel sound output and ring-wheat input for hi-fi music systems and speech recognition applications.