VIM4 HDMI In to ffmpeg/gstreamer h.265

Here is a guide about gstreamer hardware decoding based on latest image 220620, you can OOWOW to install it, here are the steps.

  • Install weston & gstreamer
$ sudo apt update
$ sudo apt install weston gstreamer1.0-plugins-bad
  • Reboot and login with weston

You need to choose weston im the login prompt not ubuntu.

  • Setup parameters
$ echo 1 | sudo tee /sys/module/amvdec_ports/parameters/multiplanar
$ echo 1 | sudo tee /sys/module/amvdec_ports/parameters/bypass_vpp
$ echo 0 | sudo tee /sys/module/amvdec_ports/parameters/enable_drm_mode
  • Open the terminal and execute the gstreamer pipe below
$ gst-launch-1.0 playbin uri=file:///home/khadas/bbb_sunflower_1080p_60fps_normal.mp4 video-sink=waylandsink

or

$ 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=4 ! video/x-raw,format=NV12 ! waylandsink

NOTE1: If you got a black screen, please move the mouse to top panel and move back you will see the video.

NOTE2: If you want to stop the video, you have to use uart console or ssh to kill the gst process.

$ killall -9 gst-launch-1.0