2008 CM4 HDMI IN mini EN
Keywords
Raspberry Pi, CM4 Core board, RPiOS, Video Capture, HDMI, RTMP Streaming, Live Stream
I. Introduction
The CM4 HDMI Video Capture Card is designed based on the Raspberry Pi CM4 core board, offering a cost-effective solution for users with video capture needs. It supports all versions of the Raspberry Pi CM4 core board.
Over the past few years, the live streaming and online course markets have flourished, with both applications requiring high-definition streaming and video recording.
Some online courses and videos can only be viewed online, in which case recording devices can be used for transcription. Traditional PC solutions or capture card setups, while powerful, come with high costs and significant power consumption. To meet the mainstream market demand for 1080P resolution, we have launched a video capture card product based on the Raspberry Pi platform. It captures video signals via an onboard USB video capture chip, then uses the Raspberry Pi for encoding and storage. This solution enables real-time 1080P 30fps video preview as well as 1080P 30fps video capture and saving. Works with various USB-C/Lightning to HDMI converter cables to capture video resources from any platform.
For live streaming, in certain scenarios such as nighttime broadcasts and high-definition streaming, professional DSLRs/mirrorless cameras are often used as the signal source. In such cases, a conversion device is required to transmit the high-definition HDMI output from the professional DSLR/mirrorless camera for streaming. Our CM4_HDMI_IN video capture device can stream the input HDMI signal.
For the video recording function, we use VLC and Guvcview.
For the live streaming feature, we use the OBS streaming software.
Note: Live streaming involves platform accounts, and customers are required to register and apply for these themselves. Our company does not provide technical support for this matter.
II. Hardware Spec
1) Power Supply: 5V3A USB Type-C port (also serves as the flashing port for flashing the eMMC-equipped CM4 core board).
2) 1*Gigabit Ethernet port.
3) 1*standard HDMI output, supports 4K resolution.
4) 1*standard HDMI input, supports 1080p resolution.
5) 1*Record button.
6) 3*USB 2.0 Host ports, including 2*USB-A ports and 1*1.25mm-4PIN port.
7) 1*TF card slot, only used for flashing Raspberry Pi CM4 core boards without eMMC.
8) 1*BOOT jumper for flashing the Raspberry Pi CM4 core board with eMMC.
9) 1*3.3V fan power connector, 2.54mm-2P.
10) Lead out 40-pin GPIO headers, fully compatible with Raspberry Pi 4B's 40-pin GPIO.
11) Size: 85*70mm, the board material is UL-certified and RoHS-compliant, with a flammability rating of 94V-0.
12) Full aluminum alloy casing.
III. Flash OS
We use the Raspberry Pi OS, the system version is 2024-10-22-raspios-bookworm-arm64.img.xz
You can download it in:
https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
For the core board with eMMC, the OS is flashed onto the eMMC. If the core board does not have eMMC, the OS is flashed onto the TF card.
Using a core board with eMMC, perform the following hardware operations: Short the BOOT pin on the expansion board with a jumper cap and connect the USB-C port to a computer.
After the flashing process is completed, remove the jumper cap and power on again to start the OS.
For the flashing method, please refer to:
IV. Video Capture with Raspberry Pi OS
4.1 Preparation
Execute lsusb
in the terminal and verify that the video device (highlighted in red) is detected:
Execute ls /dev/video*
and confirm that /dev/video0
is listed:
With the video0 device in place, we can proceed with the subsequent operations of video capture and live streaming.
The video capture card has two HDMI interfaces. The HDMI IN port is the video input port, connect video input source (capture source). The HDMI OUT port is the video output port, connect to a monitor and display the OA running on the CM4.
4.2 Use VLC for video capture
The Raspberry Pi OS has VLC pre-installed by default. You can find the VLC under "Raspberry Pi logo in the top-left corner - Sound & Video":
Click icon to open the software:
Click "Tools - Preferences", then go to the Video tab and set the Output under Display to "OpenGL for Embedded Systems 2 video output":
After saving, you can view the input source.
Click "Media - Open Capture Device...", then in the Capture Device tab, configure the audio and video devices as shown in the image below:
Once configured, click the "Play" button to see the live feed from the input source:
If you need to capture video, after completing the settings in the Capture Device tab, click the arrow next to the "Play" button, then click "Convert":
In the pop-up window, under "Settings" > "Profile", it is recommended to select "Video - H.264 + MP3 (MP4)," though you can also choose other video formats based on your needs:
Then click "Browse", choose the destination folder for the captured video, and click "Save":
Click "Start" to begin video capture:
Note: Input source image cannot be viewed while capturing video.
We recorded a 3m57s video, with the specific video parameters as follows:
4.3 Use Guvcview for video capture
The Guvcview needs to be installed. Enter the following execute the Raspberry Pi terminal:
sudo apt install guvcview
After installation, you can find the Guvcview under the "Raspberry Pi logo in the top-left corner - Sound & Video." Click to open the software, which by default uses /dev/video0 as the input source and directly displays the image from the input source:
Click on the "Video Controls" tab to configure various video parameters, with the maximum resolution supported being 1920*1080:
In the "Audio Controls" tab, you can configure various audio parameters:
After completing the settings, click the "Cap. Video" button in the button bar to capture the video, while the video window can still continue to display the images from the input source.
The software automatically saves the video in the home directory. Once recording is done, click "Stop Video" and wait briefly (until it changes to "Cap. Video") for the save to complete:
We recorded a 4m12s video, with the specific video parameters as follows:
V. Live video streaming on Raspberry Pi OS
5.1 Install the video streaming software OBS
5.1.1 Install OBS
We use OBS as the video streaming software. The installation command is:
sudo apt update
sudo apt install libfdk-aac2 libfdk-aac-dev
sudo apt install obs-studio
After installation, directly clicking the icon to launch OBS will result in a graphics card driver error:
We need to execute the following commands in the terminal to launch OBS.
MESA_GL_VERSION_OVERRIDE=3.3 obs
5.1.2 Launch OBS with a script
Obviously, it's very inconvenient to do this every time. We can use a script to launch it directly (the "mcuzone" directory in the following command refers to the user's home directory, please adjust it according to the actual path):
sudo nano /home/mcuzone/obs.sh
Add the following to this file:
MESA_GL_VERSION_OVERRIDE=3.3 obs
Save and exit, then give the file the necessary permissions.
sudo chmod +x /home/mcuzone/obs.sh
So we can start the OBS software by clicking on this obs.sh.
5.1.3 Click the icon to launch OBS
If you want to directly click the icon to launch OBS, please follow the steps below.
Click on "Raspberry Pi icon in the top-left corner of the desktop - Preferences - Main Menu Editor - Sound & Video".
Double-click on "OBS Studio", and in the pop-up window, enter the following in the "Command" box:
/home/mcuzone/obs.sh
Save and exit, then you can launch OBS by clicking the icon.
5.1.4 Start OBS automatically on boot
To enable OBS to launch automatically at OS boot, make the following adjustments:
sudo mkdir /home/mcuzone/.config/autostart
sudo nano /home/mcuzone/.config/autostart/obs.desktop
Add the following content to this obs.desktop file:
[Desktop Entry]
Type=Application
Exec=/home/mcuzone/obs.sh
Save and exit, then restart the OS, and OBS will automatically launch upon entering the desktop.
5.2 Obtain the streaming parameters
5.2.1 Obtain Bilibili streaming parameters
Please refer to the following link:
https://www.bilibili.com/opus/688919050706747398
Please refer only to the first section "b站设置". The OBS setup on the Raspberry Pi will be explained in detail in the next section.
Through the settings, we obtained two parameters: the server address and the streaming key.
5.2.2 Obtain Weibo streaming parameters
Please refer to the following link:
https://weibo.com/l/wblive/act/k2mw80kz3kw0
Through the settings, we obtained two parameters: the server address and the streaming key.
5.3 The streaming settings and video live stream in OBS
5.3.1 Streaming Settings
Launch OBS. Taking a Bilibili live stream as an example, click "File - Settings - Stream", select "Custom..." under "Service", fill in the server address in the "Server" field, and enter the stream key in the "Stream Key" field:
Then click "OK" to complete the setup.
5.3.2 Live stream source settings
Click the "+" under "Sources", then click "Video Capture Device (V4L2)":
Click "OK" directly:
Save after configuring as shown below:
Click the "+" under "Sources", then click "Audio Input Capture (PulseAudio)":
Click "OK" directly:
Save after configuring as shown below:
After the setup is complete, we can see the live stream image and audio volume levels on the main interface:
5.3.3 Start streaming
Click "Start Streaming" under "Controls" to begin the livestream. Taking Bilibili as an example, we can watch the livestream through the streaming URL provided by Bilibili.
If you need to record live video on the Raspberry Pi side, you can click "Start Recording" under "Controls" to begin recording. The video window will continue to display the input source's image during the process. Once recording finishes, the software will save the video in the main directory.
We recorded a 1m49s video, with the specific video parameters as follows:
Contact Us
Email: mcuzone@vip.qq.com
Tel: +86(0)13957118045
If there are any omissions, errors, or infringements on this page, please contact us through the above methods. Thank you!
Copyright 2004-2025 Wildchip