====== VIM 5 HDMI Input for Linux ======
This documentation is only for Linux system.
===== Hardware Connection =====
* Connect your VIM 5 HDMI Out to an HDMI Display
* Connect your HDMI OUT cable to VIM 5 HDMI IN port
You must connect your VIM 5 to a workablbe HDMI screen or the HDMI IN will not working.
===== Preview =====
Execute the HDMI Input demo command ''sudo hdmiin-demo''
If everything is OK you will see the HDMI Input source on your display.
```shell
hdmiin_preview_setup # Setup
sudo hdmiin-demo # Preview
```
//Note: You can press ''ESC'' key to exit.//
===== Capture the HDMI IN Frames =====
You can use gstreamer to capture the HDMI IN frames. Here is en example to capture the HDMI IN frames
and encoding them to ''H264'' format and mux to ''MP4'' format store in file ''/tmp/test71.mp4''.
```shell
hdmiin_capture_setup # Setup
gst-launch-1.0 -vvv v4l2src device=/dev/video71 io-mode=dmabuf num-buffers=600 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=interleaved ! amlvenc ! h264parse ! qtmux ! filesink location=test_71.mp4 # Capture frames
```
You can also use gstreamer plugin ''glimagesink'' to preview the HDMI IN frames on the Gnome desktop.
```shell
hdmiin_capture_setup # Setup
gst-launch-1.0 -vvv v4l2src device=/dev/video71 io-mode=dmabuf num-buffers=600 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=interleaved ! glimagesink # Capture frames
```
//Note: You can press ''ESC'' key to exit.//
===== Setup HDMI IN audio =====
Enable audio:
```bash
hdmiin_audio enable
```
//Note: Once the HDMI IN audio is enabled, the system audio will not working anymore, but you can recovery the system audio by disabling the HDMI IN audio.//
Disable audio:
```bash
hdmiin_audio disable
```