This is an old revision of the document!
This page introduces how to use the hardware decoding on VIM4.
Only supoport Amlgoic 5.4 Kernel.
Here is an example to decode H264 file to NV12 format file.
gst-launch-1.0 filesrc location=/home/khadas/bbb_sunflower_1080p_60fps_normal.mp4 ! qtdemux name=d d.video_0 ! h264parse ! v4l2h264dec capture-io-mode=0 ! video/x-raw,format=NV12 ! filesink location=/home/khadas/h264dec.nv12
Another example to decode video from USB camera:
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=mmap num-buffers=300 ! image/jpeg,width=1920,height=1080,framerate=30/1 ! jpegdec ! filesink location=test_0.nv12
Here is an example to decode H264 file to NV12 format file.
gst-launch-1.0 filesrc location=/home/khadas/bbb_sunflower_1080p_60fps_normal.mp4 ! qtdemux name=d d.video_0 ! h264parse ! v4l2h264dec capture-io-mode=0 ! video/x-raw,format=NV12 ! filesink location=/home/khadas/h264dec.nv12