http://wiki.lindeni.org/api.php?action=feedcontributions&user=Michael&feedformat=atomLindenis Wiki - User contributions [en]2024-03-28T18:08:25ZUser contributionsMediaWiki 1.30.0http://wiki.lindeni.org/index.php?title=Lindenis_V536&diff=777Lindenis V5362020-02-20T14:29:38Z<p>Michael: /* Camera */</p>
<hr />
<div>== Key Features ==<br />
=== Processor core ===<br />
*Dual-Core Cortex A7@1.2GHz<br />
*Neon acceleration, integrated FPU<br />
<br />
=== Video Encoding/Decoding Performance ===<br />
*H.264 BP/MP/HP, H.265 Main Profile encoding<br />
*I/P/Dual P frame H.264/H.265 encoding<br />
*MJPEG/JPEG baseline encoding<br />
*Real-time multi-stream H.264/H.265 encoding capability:<br />
**- 3840x2160@30fps+720p@30fps encoding<br />
**- 3840x2160@30fps decoding<br />
*Maximum 8192x8192 resolution for JPEG encoding/decoding<br />
*CBR, VBR modes<br />
*Encoding of eight ROIs<br />
<br />
=== Graphics Processing ===<br />
*Supports Lens distortion correction, fisheye and wide angle correction<br />
*Supports 90°、180°、270° picture rotation<br />
<br />
=== Professional Image Effects ===<br />
*Maximum performance is 4224x3168@30fps<br />
*Adjustable 3A functions (AE, AWB and AF)<br />
*Supports 2F WDR and Local Tone mapping,supporting highlight suppression and backlight compensation<br />
*Supports bad pixel correction, Lens shading correction<br />
*Supports multi-level 3D denoising, remove motion smear and color noise<br />
*Supports color adjustment, color enhancement<br />
*Supports image dynamic contrast enhance and sharpness enhance<br />
*Supports 4 channels of scaling output from 1/8x to 1x<br />
*OSD overlaying of eight regions before encoding<br />
*Supports image mirroring and flipping<br />
<br />
=== Various interfaces ===<br />
*Supports MIPI-CSI2\HiSPi\Sub-LVDS<br />
*Supports BT1120 input/output<br />
*Supports Line-in/Line-out<br />
*Supports Dual-channel differential MIC inputs <br />
*Supports WiFi 802.11ac / BT4.2 (option)<br />
<br />
=== Software Support ===<br />
*Linux-4.9<br />
<br />
== Target Applications ==<br />
*SDV<br />
*Smart IPC<br />
*Smart Camera<br />
Or you can use it to build:<br />
*A computer<br />
*A streaming server<br />
<br />
== Accessories Step-by-Step Guides ==<br />
<br />
=== Power Supply ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/Power-Supply-Brief.pdf 5V 2A Power Supply]<br />
<br />
=== HDMI Cable ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/HDMI-Cable-Brief.pdf 4K HDMI Cable]<br />
<br />
=== Camera module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/Camera-Module-Brief.pdf 4K Camera Module brief]<br />
<br />
=== LCD ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/LCD-with-CTP-Brief.pdf 5" 720P LCD with CTP brief]<br />
<br />
=== Flash module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/eMMC-Module-Brief.pdf 8GB eMMC Module brief]<br />
<br />
=== WiFi and Bluetooth module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/WiFi-Module-Brief.pdf WiFi 802.11ac / BT4.2 Module brief]<br />
<br />
== Hardware Specification ==<br />
<br />
=== Board Features ===<br />
<br />
==== Video Out ====<br />
<br />
* HDMI 1.4 Type A, up to 4K@30FPS<br />
* MIPI-DSI, 4 lanes, up to 1080P<br />
* LCD interface<br />
<br />
==== Video In ====<br />
<br />
* 1 x MIPI-CSI2 - Camera interface, 4 lanes per channel<br />
<br />
==== Audio ====<br />
* 3.5mm Line in / out<br />
* 1 x mic<br />
* 1 x dmic<br />
<br />
==== Network ====<br />
* 10/100/1000Mbps Ethernet<br />
* WiFi with Bluetooth (optional)<br />
<br />
==== Storage ====<br />
* MicroSD Card bootable, support SDHC and SDXC, storage up to 256GB<br />
<br />
==== Expansion Ports ====<br />
* Board to Board connector - Flash module interface<br />
* Wi-Fi/BT Module Header - SDIO 3.0 and UART, pitch 2.0mm<br />
* 2x10 pins "Power Supply" GPIO Header: vbat, aldo1, bldo1, aldo3<br />
* 4 pins GPIO Header: TWI1<br />
* 2x7 pins "I2S" GPIO Header<br />
* 3 pins GPIO Header: PH4, PH10, GND<br />
* 3 pins GPIO Header: 1xADC<br />
* 4 pins GPIO Header: S-TWI<br />
* VBAT: Battery connector<br />
* Storage: Bootable MicroSD card<br />
* Video out: HDMI 1.4, 4 lanes MIPI-DSI<br />
* Video in: 1 x DVP<br />
* Audio: 3.5mm Line in / out, 1 x mic<br />
* Network: 10/100/1000Mbps Ethernet<br />
* USB: 1 x Micro USB, 2 x USB 2.0<br />
<br />
=== Board Information ===<br />
* Board Dimensions: 130mm x 85mm<br />
* Input Power: 5V@2A micro USB connector, 3.7V Li-Ion battery connector<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SOM_Schematic.pdf Lindenis V536 SOM Schematic]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SOM_PCB_Location_Map.pdf Lindenis V536 SOM PCB Place Map]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_Full_Function_Board_Schematic.pdf Lindenis V536 SBC Full-Function Board Schematic]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SBC_mulit-function_pins_guide.pdf Lindenis V536 SBC mulit-function pins guide] | [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_开发板管脚复用说明.pdf 中文]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_Full_Function_Board_PCB_Location_Map.pdf Lindenis V536 SBC Full-Function Board PCB Place Map]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/src Lindenis V536 SBC Full-Function Board PCB Source Files]<br />
** [https://pan.baidu.com/s/1jiMNIYvwvm3Y6gUuFZxKxg Clik here to get the documents package in Baidu NetDisk(access code:5i5k)]<br />
<br />
== Datasheet ==<br />
* Allwinner V536 SOC Brief [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V536-Chinese-Brief.pdf 中文] | [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V536-English-Brief.pdf English]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V5x6_Professional_Camera_SoC_Datasheet_V1.2.pdf Allwinner V536 SOC datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/OP03-JS1158%20FORESEE_eMMC_NCEMASD9-08G%20SPEC%20A0%2020150701.pdf Foresee eMMC Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/AP6255%20IND%20datasheet_V1.1_12042017.pdf AP6255 Module Spec Sheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/RTL8211F-CG-RealtekMicroelectronics.pdf Ethernet PHY Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/LX50HDI4002-V0.pdf LCD Module Specification]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/GT911%20Capacitive%20Touch%20Controller%20Datasheet.pdf GOODiX GT911 5-Point Capacitive Touch Controller Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/GL850G%20Datasheet_128.pdf USB 2.0 Hub Controller]<br />
<br />
== SDK ==<br />
<br />
=== Overview ===<br />
<br />
==== Features ====<br />
*Linux kernel 4.9 (official version)<br />
* U-Boot 2014.07<br />
* ARM GCC based cross toolchain<br />
* Integrated build system<br />
<br />
==== Main Components ====<br />
==== Layout ====<br />
<pre><br />
├── build<br />
├── config<br />
├── Config.in<br />
├── dl<br />
├── lichee<br />
├── logs<br />
├── Makefile<br />
├── package<br />
├── prebuilt<br />
├── rules.mk<br />
├── scripts<br />
├── softwinner<br />
├── target<br />
├── toolchain<br />
└── tools<br />
</pre><br />
<br />
=== Download and Build ===<br />
==== Prebuilt Image ====<br />
For fast begin, you can download the [[http://files.lindeni.org/lindenis-v536/Images prebuilt image] here.<br><br />
[https://pan.baidu.com/s/1WZ1uSpZPoVP2e4P8xXkbbA 国内开发者请在此下载]提取码:4p3h <br />
<br />
==== System requirements ====<br />
Listed below are the recommended requirements for downloading and building the SDK:<br />
* CPU: x86_64 or better family processor<br />
* Memory: 8GB or higher<br />
* Disk: 20GB free hard disk space, if you build it in a Virtual machine, I recommand you allocate a 30G virtual hard disk.<br />
** The Whole SDK is about 15G.<br />
* OS: Ubuntu 14.04 (tested) or higher<br />
* Network: internet connection<br />
<br />
==== Lazy Start ====<br />
Here are VMware station 14 image files which include the whole compiled SDK. And the SDK remote repositoreies are on gitee (not github).<br />
<br><br />
<b>[https://pan.baidu.com/s/1y-bSgRf87lp_qjJgeVPe5w Click here to get it]</b> (access code: tq4x)<br />
<br><br />
The password of the Ubuntu 14.04 in the VMware is "lindenis". Enjoy it !<br />
<br />
==== Linux host setup ====<br />
<br />
Ubuntu 14.04<br />
<br />
''HINT: later version should also work.''<br />
<br />
'''Install prerequisites'''<br />
<br />
<pre><br />
$ sudo apt-get update<br />
$ sudo apt-get install build-essential libncurses5-dev zlib1g-dev gawk git git-core ccache gettext libssl-dev xsltproc gperf subversion <br />
$ sudo dpkg --add-architecture i386<br />
$ sudo apt-get update<br />
$ sudo apt-get install lib32z1 lib32ncurses5 libc6:i386 libstdc++6:i386<br />
</pre><br />
<br />
'''Sudo without password'''<br />
<br />
<pre><br />
$ sudo visudo<br />
</pre><br />
<br />
Add this line at the end (change “tom” to your username):<br />
<pre>tom ALL=(ALL) NOPASSWD: ALL</pre><br />
Ctrl-X to leave, save your changes, and you're done!<br />
<br />
==== Downloading ====<br />
The SDK is available on [https://github.com/lindenis-org github]. For Chinese developer, it is available on [https://search.gitee.com/?skin=rec&type=repository&q=lindenis gitee] too.<br />
<br />
We use Repo manage Git repositories. Clone Repo from [https://android.googlesource.com/tools/repo android Git repositories] or other mirrors and install it.<br />
<br>Chinese developers can install Repo follow these steps:<br />
<pre><br />
$ git clone http://mirrors.ustc.edu.cn/aosp/git-repo.git ~/.bin/repo<br />
$ echo "export PATH=~/.bin/repo:$PATH" >> ~/.bashrc<br />
$ source ~/.bashrc<br />
</pre><br />
<br />
Becase there are some big files in the SDK, please run the following command before you start the downloading.<br />
<pre><br />
$ git config --global http.postBuffer 524288000<br />
</pre> <br />
Then run this to check:<br />
<pre><br />
$ git config --list<br />
</pre> <br />
<br />
For Lindenis V536 SBC, download the SDK on Github via:(此为github的下载方式,国内下载较慢,请使用国内源的方式下载,见下文)<br />
<pre><br />
$ mkdir lindenis-v536<br />
$ cd lindenis-v536<br />
$ repo init -u https://github.com/lindenis-org/manifest.git -b v536 -m lindenis-v536.xml<br />
$ repo sync<br />
</pre><br />
<br />
We recommend the Chinese developer download the SDK source code on gitee via:<br />
<br><br />
国内的开发者我们推荐使用国内的源来进行源代码下载:<br />
<pre><br />
$ mkdir lindenis-v536<br />
$ cd lindenis-v536<br />
$ repo init -u https://gitee.com/lindenis/manifest.git -b master -m lindenis-v536.xml<br />
$ repo sync<br />
</pre><br />
<br />
And then download these two files from Baidu NetDisk, and then copy them into the target directory follow below steps:<br />
<br><br />
下载源码后,请在百度云上把相关的依赖包下载下来,并按照以下方式放入指定SDK目录中:<br />
<br><br />
[https://pan.baidu.com/s/191Acv_sH-0ncrnagZ8ksQw dl.tar.gz] (提取码: 575x)<br />
<pre><br />
$ cp dl.tar.gz lindenis-v536<br />
$ tar xzvf dl.tar.gz dl/<br />
</pre><br />
<br />
[https://pan.baidu.com/s/1kdbc8LbxPxlQLj-ZQU_Gqg libs.tar.xz] (提取码: ljvj)<br />
<pre><br />
$ cp libs.tar.xz lindenis-v536/package/cortana/cortana-sdk<br />
</pre><br />
<br />
The Download time depends on your network connection speed. After finish the download, you should get below directories and files:<br />
<pre><br />
build config Config.in device dl lichee Makefile package prebuilt rules.mk scripts softwinner target toolchain tools<br />
</pre><br />
<br />
Start a branch for local workspace:<br />
<pre><br />
$ repo start lindenis-v536 --all<br />
</pre><br />
<br />
==== Building ====<br />
===== Setup env =====<br />
*For Lindenis V536 SBC:<br />
<pre><br />
$ source build/envsetup.sh<br />
</pre><br />
<br />
<pre><br />
$ lunch<br />
</pre><br />
<br />
Then you will see the follwing menu, and enter the number to select the target case, and enter:<br />
<pre><br />
You're building on Linux<br />
<br />
Lunch menu... pick a combo:<br />
1. v536_Lindenis_SBC-tina<br />
<br />
Which would you like? [Default v536_Lindenis_SBC]:1<br />
</pre><br />
<br />
===== Build source =====<br />
* Build kernel and rootfs<br />
If you are the first time downloaded the SDK and have not built the SDK before, run the below two commands, then exit and save the configuration at first.<br />
<pre><br />
$ make menuconfig<br />
</pre><br />
<pre><br />
$ make kernel_menuconfig<br />
</pre><br />
Then make it and wait ...<br />
<pre><br />
$ make -j8 V=s<br />
</pre><br />
<br />
===== Build image =====<br />
<pre><br />
$ pack<br />
</pre><br />
<br />
==== Installation ====<br />
'''[http://files.lindeni.org/lindenis-v536/Tools/PhoenixSuit.7z PhoenixSuit]'''<br />
* Download the PhoenixSuit.7z and extract to a local folder (note: Windows only).<br />
* Open the PhoenixSuit.exe.<br />
[[File:PSM.JPG|500px]]<br />
* Click the "firmware" button.<br />
[[File:Firmware.png|500px]]<br />
* Click the "image" button to select the image file.<br />
[[File:selectImage.png|500px]]<br />
* Now the PC tool is ready. Just '''keep pressing''' the "fel" key on the SBC.<br />
[[File:FELKEY.jpg|500px]]<br />
* After connected the SBC to PC via a USB cable, release the key, and the PhoenixSuit will enter the burn model.<br />
[[File:BurnModel.JPG|500px]]<br />
* If you want to keep the user data, please click "No". Click "Yes" will clean all datas in eMMC.Then will begin to download the image into eMMC.<br />
* If you can not start to download, just plug-out the USB cable and try again.<br />
[[File:download.JPG|500px]]<br />
* Wait until it finish downloading.<br />
[[File:Ok.JPG|500px]]<br />
<br />
== OS ==<br />
=== Overview ===<br />
Lindenis Video OS is the recommended operating system for normal use on Lindenis V536 series boards. Lindenis Video OS is maintained by [http://www.lindeni.com/ Lindenis Tech. Ltd.]. The SDK is hosted on [https://github.com/lindenis-org GitHub].<br />
===== Applications =====<br />
[[File:LindenisVideoOS.png|500px|thumb|Lindenis Video OS Architecture]]<br />
* Lindlive: a low-laternce A/V streaming application powered by Lindenis.<br />
* Lindplayer: a meida player application powered Lindenis.<br />
* Lindcamera: a camera application (supported preview, snapshot and recording) powered by Lindenis. <br />
* ... ...<br />
<br />
===== Framewrok =====<br />
<br />
* FFindeni: a multimedia framework specialized for low-latency A/V processing built by Lindenis. <br />
* CedarX: a Allwinner official multimedia decoding framework.<br />
* [http://www.minigui.org/ MiniGUI]: a tiny and efficiency open source GUI framework.<br />
* ... ...<br />
<br />
===== Libraries =====<br />
<br />
* Runtime Libraries: the system basic libraries like libc and so on.<br />
* Libavwrapper: a Lindenis-built library abstracted the hardware operation of the A/V processing.<br />
* [http://ffmpeg.org/ FFmpeg]: an open source software library for recording, converting and streaming audio and video.<br />
* [http://live555.com/ Live555]: an open source software library for streaming audio and video.<br />
* ... ...<br />
<br />
===== Linux Kernel =====<br />
<br />
* Official version: 4.9<br />
<br />
=== Reference Documents ===<br />
[http://files.lindeni.org/lindenis-v536/Documents/AW Allwinner Official Reference Documents]<br />
<br />
=== System Setup ===<br />
<br />
===== Uart =====<br />
* By default, the ttyS3 is assigned to the Linux console. The UART transmit pin called "TX" and receive pin called "RX" are in the J12 pin group, whose label is DEBUG. And the bit rate is 115200 bps.See below red rectangle.<br />
[[File:UART.jpg|500px]]<br />
<br />
===== Camera =====<br />
The camera supports the imx317 module as default. If you need to change to imx307, you can follow the steps below:<br />
*1.modify device/config/chips/v536/configs/Lindenis_SBC/sys_config.fex<br />
<br />
find this:<br />
<pre><br />
sensor0_mname = "imx317_mipi"<br />
</pre><br />
change to:<br />
<pre><br />
sensor0_mname = "imx307_mipi"<br />
</pre><br />
*2. make menuconfig selection<br />
<pre><br />
Allwinner ---><br />
eyesee-mpp ---><br />
-*-eyesee-mpp-middleware ............... eyesee-mpp-middleware for Tina Linux<br />
select sensor (use sensor imx307) ---><br />
() use sensor imx317<br />
(X) use sensor imx307<br />
() use sensor imx278<br />
() use sensor imx258<br />
() use sensor imx386<br />
() use sensor sc2232<br />
</pre><br />
*3. do "make" and then flash the firmware.<br />
<br />
===== ISP Tuning =====<br />
<br />
'''Allwinner V536 [http://files.lindeni.org/lindenis-v536/Tools/ISP_Tools ISP Tuning Tool]''' | [https://pan.baidu.com/s/1Fpd9cQYXshiDqKzZEw4e6A 国内]提取码:c0u8<br />
* Download the HawkviewTools-V3.0.2.7z and extract to a local folder (note: Windows only).<br />
* Download the awTuningApp, push it into the board through ADB or SSH and then run it. <br />
* Please refer to the documents in '''docs''' folder for usage.<br />
<br />
===== Display =====<br />
* Because of the limitation that there is one display engine module in V536, Lindenis-V536 SBC can not support dual-display.<br />
<br />
* The default display device of the SDK and the prebuilt image is HDMI(1080p).<br />
<br />
* If you have download the prebuilt image, and burn it into eMMC, you can switch the display device follow these steps:<br />
<br />
'''Connect serial to control the board'''<br />
<br />
* Firstly, you should connect the SBC debug UART to computer via a serial-USB cable so that you can send commands to the board through a PC serial software like Putty.<br />
<br />
* After you connected successfully, you will see the log show on the PC serial software like this:<br />
<br />
[[File:SBC_BOOT.JPG|frameless]]<br />
<br />
'''Enter U-boot command mode'''<br />
<br />
* Power on and press any keyboard key within 1s when you see the message below, then you can enter u-boot command mode.<br />
<br />
* Under this mode, you can modify the kernel devices tree by FDT tools in u-boot.<br />
<br />
[[File:EnterKey.jpg|frameless]]<br />
<br />
'''Change display device configuration with FDT tool'''<br />
<br />
* Input the follow command to switch display device between LCD and HDMI (1080p):<br />
<br />
'''LCD:'''<br />
<pre><br />
fdt set disp screen0_output_type <0x01>;<br />
fdt set disp screen0_output_mode <0x04>;<br />
fdt save;<br />
reset;<br />
</pre><br />
<br />
'''HDMI (1080p):'''<br />
<br />
<pre><br />
fdt set disp screen0_output_type <0x03>;<br />
fdt set disp screen0_output_mode <0x0a>;<br />
fdt save;<br />
reset;<br />
</pre><br />
* You can also select different display device via configuration in sys_config.fex<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;disp init configuration<br />
;<br />
;disp_mode (0:screen0<screen0,fb0>)<br />
;screenx_output_type (0:none; 1:lcd; 2:tv; 3:hdmi;5:vdpo)<br />
;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)<br />
; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)<br />
;----------------------------------------------------------------------------------<br />
[disp]<br />
disp_init_enable = 1<br />
disp_mode = 0<br />
<br />
screen0_output_type = 3<br />
screen0_output_mode = 10<br />
<br />
</pre><br />
<br />
===== TouchPanel =====<br />
* After you connected the CTP panel to the board, insmod its driver like this:<br />
<pre><br />
insmod /lib/modules/4.9.118/gt9xx_ts.ko<br />
</pre><br />
* sys_config.fex should config as follow:<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;capacitor tp configuration<br />
;external int function<br />
;wakeup output function<br />
;notice --- tp_int_port & tp_io_port use the same port<br />
;----------------------------------------------------------------------------------<br />
[ctp]<br />
ctp_used = 1<br />
ctp_name = "gt911_1060"<br />
ctp_twi_id = 1<br />
ctp_twi_addr = 0x5d<br />
ctp_screen_max_x = 1280<br />
ctp_screen_max_y = 720<br />
ctp_revert_x_flag = 1<br />
ctp_revert_y_flag = 1<br />
ctp_exchange_x_y_flag = 0<br />
<br />
ctp_int_port = port:PL06<6><default><default><default><br />
ctp_wakeup = port:PL07<1><default><default><1><br />
</pre><br />
<br />
===== Wifi =====<br />
*sys_config.fex should config as follow:<br />
<pre><br />
[wlan]<br />
wlan_used = 1<br />
wlan_busnum = 1<br />
;wlan_usbnum = 3<br />
wlan_power = "vcc33-wifi"<br />
wlan_io_regulator = "vcc-pg"<br />
;wlan_en = port:PG11<1><default><default><0><br />
wlan_regon = port:PG11<1><default><default><0><br />
wlan_hostwake = port:PL05<6><default><default><0><br />
</pre><br />
*make sure CONFIG_BCMDHD is configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_BCMDHD = m<br />
</pre><br />
*make sure PACKAGE_ap6255-firmware is configured when make menuconfig<br />
<pre><br />
PACKAGE_ap6255-firmware = y<br />
</pre><br />
*insmod driver as follow:<br />
<pre><br />
insmod /lib/modules/4.9.118/bcmdhd.ko<br />
</pre><br />
*Then you can use ifconfig and wpa_supplicant tools connect network<br />
<br />
===== Bluetooth =====<br />
*sys_config.fex should config as follow:<br />
<pre><br />
[bt_para]<br />
bt_used = 1<br />
bt_power = "vcc33-wifi"<br />
bt_io_regulator = "vcc-pg"<br />
bt_rst_n = port:PG10<1><default><default><0><br />
</pre><br />
*You can take the follow shell cmd to start bt<br />
<pre><br />
echo 0 > /sys/class/rfkill/rfkill0/state<br />
sleep 2<br />
echo 1 > /sys/class/rfkill/rfkill0/state<br />
sleep 2<br />
brcm_patchram_plus --tosleep=200000 --no2bytes --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 \<br />
--baudrate 115200 --patchram /lib/firmware/BCM4345C0.hcd /dev/ttyS1 &<br />
</pre><br />
*When the bt device is started, you can use hciconfig tools to do someting you want<br />
*(if hciconfig is not install, you should add it when make menuconfig)<br />
<br />
===== Ethernet =====<br />
*sys_config.fex should configured as follow:<br />
<pre><br />
[gmac0]<br />
gmac0_used = 1<br />
phy-mode = "rgmii"<br />
gmac_rxd3 = port:PE00<3><default><default><default><br />
gmac_rxd2 = port:PE01<3><default><default><default><br />
gmac_rxd1 = port:PE02<3><default><default><default><br />
gmac_rxd0 = port:PE03<3><default><default><default><br />
gmac_rxck = port:PE04<3><default><default><default><br />
gmac_rxctl = port:PE05<3><default><default><default><br />
gmac_clkin = port:PE06<3><default><default><default><br />
gmac_txd3 = port:PE07<3><default><3><default><br />
gmac_txd2 = port:PE08<3><default><3><default><br />
gmac_txd1 = port:PE09<3><default><3><default><br />
gmac_txd0 = port:PE10<3><default><3><default><br />
gmac_txck = port:PE11<3><default><3><default><br />
gmac_txctl = port:PE12<3><default><3><default><br />
gmac_mdc = port:PE13<3><default><3><default><br />
gmac_mdio = port:PE14<3><default><3><default><br />
gmac_ephy25m = port:PE15<3><default><default><default><br />
phy-rst = port:PE21<1><default><default><0><br />
gmac-power0 = "vcc-ephy"<br />
gmac-power1 = ""<br />
gmac-power2 = ""<br />
tx-delay = 7<br />
rx-delay = 31<br />
use_ephy25m = 1<br />
</pre><br />
*make sure CONFIG_SUNXI_GMAC is configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_SUNXI_GMAC = y<br />
</pre><br />
<br />
===== Keypad =====<br />
* The Keypad on the board is an GPADC keypad. The GPADC driver detect the different voltage of the keys and report the key value to user space via Linux standard Input Subsystem.<br><br />
* Here is the parameters show in the sys_config.fex:<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;resistance gpadc configuration<br />
:gpadc_used : Enable the GPADC<br />
;channel_num: Maxinum number of channels supported on the platform.<br />
;channel_select: channel enable setection. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08<br />
;channel_data_select: channel data enable. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_compare_select: compare function enable channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_cld_select: compare function low data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_chd_select: compare function hig data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;----------------------------------------------------------------------------------<br />
[gpadc]<br />
gpadc_used = 1<br />
channel_num = 1<br />
channel_select = 0x01<br />
channel_data_select = 0<br />
channel_compare_select = 0x01<br />
channel_cld_select = 0x01<br />
channel_chd_select = 0x01<br />
channel0_compare_lowdata = 1700000<br />
channel0_compare_higdata = 1200000<br />
key_cnt = 5<br />
key0_vol = 116<br />
key0_val = 115<br />
key1_vol = 233<br />
key1_val = 114<br />
key2_vol = 357<br />
key2_val = 139<br />
key3_vol = 473<br />
key3_val = 28<br />
key4_vol = 586<br />
key4_val = 102<br />
</pre><br />
<br />
===== Audio =====<br />
====== audiocodec ======<br />
*sys_config.fex should configured as follow:<br />
<pre><br />
[sndcodec]<br />
sndcodec_used = 0x1<br />
<br />
[i2s]<br />
i2s_used = 0x1<br />
<br />
[codec]<br />
codec_used = 0x1<br />
lineoutvol = 0x1f<br />
maingain = 0x4<br />
headsetmicgain = 0x4<br />
adcagc_cfg = 0x0<br />
adcdrc_cfg = 0x0<br />
adchpf_cfg = 0x0<br />
dacdrc_cfg = 0x0<br />
dachpf_cfg = 0x0<br />
pa_ctl_level = 0x1<br />
pa_msleep_time = 0xa0<br />
gpio-spk = port:PH10<1><1><default><default><br />
</pre><br />
<br />
====== i2s ======<br />
*sys_config.fex should configured as follow, and the param should configured accord your device need:<br />
:'''if you i2s1 is used'''<br />
<pre><br />
[snddaudo0]<br />
snddaudio0_used = 1<br />
<br />
[daudio0]<br />
daudio0_used = 1<br />
daudio_master = 4<br />
audio_format = 4<br />
signal_inversion = 1<br />
slot_width_select = 32<br />
pcm_lrck_period = 128<br />
msb_lsb_first = 0<br />
sign_extend = 0<br />
frametype = 0<br />
mclk_div = 1<br />
tdm_config = 0<br />
tx_data_mode = 0<br />
rx_data_mode = 0<br />
</pre><br />
<br />
:'''if you i2s2 is used'''<br />
<pre><br />
[snddaudo2]<br />
snddaudio2_used = 1<br />
<br />
[daudio2]<br />
daudio2_used = 1<br />
daudio_master = 4<br />
audio_format = 1<br />
signal_inversion = 1<br />
slot_width_select = 32<br />
pcm_lrck_period = 32<br />
msb_lsb_first = 0<br />
sign_extend = 0<br />
frametype = 0<br />
mclk_div = 0<br />
tdm_config = 1<br />
tx_data_mode = 0<br />
rx_data_mode = 0<br />
</pre><br />
*make sure CONFIG_SND_SUNXI_SOC_SUNXI_DAUDIO configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_SND_SUNXI_SOC_SUNXI_DAUDIO = y<br />
</pre><br />
<br />
=== Application Demo ===<br />
The application demos powered by Lindenis.<b>[http://files.lindeni.org/lindenis-v536/Demo/ Click here to download the demos]</b><br />
<br />
===== Lindlive =====<br />
lindlive is a high performance low latency live streaming library.<br />
lindlive integrate some useful function modules, such as audio/video capture, encoding and streaming protocol.<br />
So developers can easily implement a live streaming server based on lindenis board.<br />
<br />
There are two samples app using lindlive, one is sample_mppsrc_2_livesink and the other is sample_mppsrc_2_ffsink.<br />
The sample source code is located in SDK.<br />
<br />
!!! It is strongly recommended to use lindplayer with '-live' as the client of the lindlive.<br />
It will be lower latency.<br />
<br />
usage:<br />
sample_mppsrc_2_livesink -i [ip] -p [port] -n [name]<br />
-i [ip] is the ip address of the server. If it is not set, the 'ip' default is local ethernet or wifi ip address.<br />
-p [port] is the port of the server. If it is not set, the 'port' default is rtsp port 8554.<br />
-n [name] is the name of live streaming. If it is not set, the 'name' default is 'live'.<br />
All of the arguments are optional.<br />
If sample_mppsrc_2_livesink is correctly running, the server url is 'rtsp://[ip]:[port]/[name]'<br />
Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.<br />
<br />
sample_mppsrc_2_ffsink -t [type] -u [url]<br />
-t [type]: the muxer type, can be 'mpegts/mp4/rtp/rtp_mpegts/rtsp/rtmp'<br />
-u [url] : sink to url, like: '/tmp/out.mp4' or 'rtp://192.168.1.100:12345'<br />
Example 1: sink as a live streaming.<br />
sample_mppsrc_2_ffsink -t rtp_mpegts -u rtp://192.168.3.118:12345<br />
sample_mppsrc_2_ffsink -t rtp -u rtp://192.168.3.118:12342/test<br />
Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.<br />
Example 2: save as a local file.<br />
sample_mppsrc_2_ffsink -t mp4 -u /tmp/out.mp4<br />
sample_mppsrc_2_ffsink -t mpegts -u /tmp/out.ts<br />
<br />
===== Lindplayer =====<br />
lindplayer is a high performance media player that can run on lindenis board. <br />
It supports upto 4K@30fps H.264/H.265 video decoder.<br />
It can play a local media file or a media stream from internet.<br />
<br />
usage:<br />
lindplayer -u [url] <options><br />
-u [url] is the media path to be played.<br />
<options> use -live to indicate this is a live streaming.<br />
such as:<br />
lindplayer -u ./movie.ts<br />
or lindplayer -u http://192.168.1.102/test<br />
or lindplayer -u rtsp://192.168.1.102/test -live<br />
<br />
===== Lindcamera =====</div>Michaelhttp://wiki.lindeni.org/index.php?title=Lindenis_V536&diff=776Lindenis V5362020-02-20T14:28:46Z<p>Michael: /* Camera */</p>
<hr />
<div>== Key Features ==<br />
=== Processor core ===<br />
*Dual-Core Cortex A7@1.2GHz<br />
*Neon acceleration, integrated FPU<br />
<br />
=== Video Encoding/Decoding Performance ===<br />
*H.264 BP/MP/HP, H.265 Main Profile encoding<br />
*I/P/Dual P frame H.264/H.265 encoding<br />
*MJPEG/JPEG baseline encoding<br />
*Real-time multi-stream H.264/H.265 encoding capability:<br />
**- 3840x2160@30fps+720p@30fps encoding<br />
**- 3840x2160@30fps decoding<br />
*Maximum 8192x8192 resolution for JPEG encoding/decoding<br />
*CBR, VBR modes<br />
*Encoding of eight ROIs<br />
<br />
=== Graphics Processing ===<br />
*Supports Lens distortion correction, fisheye and wide angle correction<br />
*Supports 90°、180°、270° picture rotation<br />
<br />
=== Professional Image Effects ===<br />
*Maximum performance is 4224x3168@30fps<br />
*Adjustable 3A functions (AE, AWB and AF)<br />
*Supports 2F WDR and Local Tone mapping,supporting highlight suppression and backlight compensation<br />
*Supports bad pixel correction, Lens shading correction<br />
*Supports multi-level 3D denoising, remove motion smear and color noise<br />
*Supports color adjustment, color enhancement<br />
*Supports image dynamic contrast enhance and sharpness enhance<br />
*Supports 4 channels of scaling output from 1/8x to 1x<br />
*OSD overlaying of eight regions before encoding<br />
*Supports image mirroring and flipping<br />
<br />
=== Various interfaces ===<br />
*Supports MIPI-CSI2\HiSPi\Sub-LVDS<br />
*Supports BT1120 input/output<br />
*Supports Line-in/Line-out<br />
*Supports Dual-channel differential MIC inputs <br />
*Supports WiFi 802.11ac / BT4.2 (option)<br />
<br />
=== Software Support ===<br />
*Linux-4.9<br />
<br />
== Target Applications ==<br />
*SDV<br />
*Smart IPC<br />
*Smart Camera<br />
Or you can use it to build:<br />
*A computer<br />
*A streaming server<br />
<br />
== Accessories Step-by-Step Guides ==<br />
<br />
=== Power Supply ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/Power-Supply-Brief.pdf 5V 2A Power Supply]<br />
<br />
=== HDMI Cable ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/HDMI-Cable-Brief.pdf 4K HDMI Cable]<br />
<br />
=== Camera module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/Camera-Module-Brief.pdf 4K Camera Module brief]<br />
<br />
=== LCD ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/LCD-with-CTP-Brief.pdf 5" 720P LCD with CTP brief]<br />
<br />
=== Flash module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/eMMC-Module-Brief.pdf 8GB eMMC Module brief]<br />
<br />
=== WiFi and Bluetooth module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/WiFi-Module-Brief.pdf WiFi 802.11ac / BT4.2 Module brief]<br />
<br />
== Hardware Specification ==<br />
<br />
=== Board Features ===<br />
<br />
==== Video Out ====<br />
<br />
* HDMI 1.4 Type A, up to 4K@30FPS<br />
* MIPI-DSI, 4 lanes, up to 1080P<br />
* LCD interface<br />
<br />
==== Video In ====<br />
<br />
* 1 x MIPI-CSI2 - Camera interface, 4 lanes per channel<br />
<br />
==== Audio ====<br />
* 3.5mm Line in / out<br />
* 1 x mic<br />
* 1 x dmic<br />
<br />
==== Network ====<br />
* 10/100/1000Mbps Ethernet<br />
* WiFi with Bluetooth (optional)<br />
<br />
==== Storage ====<br />
* MicroSD Card bootable, support SDHC and SDXC, storage up to 256GB<br />
<br />
==== Expansion Ports ====<br />
* Board to Board connector - Flash module interface<br />
* Wi-Fi/BT Module Header - SDIO 3.0 and UART, pitch 2.0mm<br />
* 2x10 pins "Power Supply" GPIO Header: vbat, aldo1, bldo1, aldo3<br />
* 4 pins GPIO Header: TWI1<br />
* 2x7 pins "I2S" GPIO Header<br />
* 3 pins GPIO Header: PH4, PH10, GND<br />
* 3 pins GPIO Header: 1xADC<br />
* 4 pins GPIO Header: S-TWI<br />
* VBAT: Battery connector<br />
* Storage: Bootable MicroSD card<br />
* Video out: HDMI 1.4, 4 lanes MIPI-DSI<br />
* Video in: 1 x DVP<br />
* Audio: 3.5mm Line in / out, 1 x mic<br />
* Network: 10/100/1000Mbps Ethernet<br />
* USB: 1 x Micro USB, 2 x USB 2.0<br />
<br />
=== Board Information ===<br />
* Board Dimensions: 130mm x 85mm<br />
* Input Power: 5V@2A micro USB connector, 3.7V Li-Ion battery connector<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SOM_Schematic.pdf Lindenis V536 SOM Schematic]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SOM_PCB_Location_Map.pdf Lindenis V536 SOM PCB Place Map]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_Full_Function_Board_Schematic.pdf Lindenis V536 SBC Full-Function Board Schematic]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SBC_mulit-function_pins_guide.pdf Lindenis V536 SBC mulit-function pins guide] | [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_开发板管脚复用说明.pdf 中文]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_Full_Function_Board_PCB_Location_Map.pdf Lindenis V536 SBC Full-Function Board PCB Place Map]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/src Lindenis V536 SBC Full-Function Board PCB Source Files]<br />
** [https://pan.baidu.com/s/1jiMNIYvwvm3Y6gUuFZxKxg Clik here to get the documents package in Baidu NetDisk(access code:5i5k)]<br />
<br />
== Datasheet ==<br />
* Allwinner V536 SOC Brief [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V536-Chinese-Brief.pdf 中文] | [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V536-English-Brief.pdf English]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V5x6_Professional_Camera_SoC_Datasheet_V1.2.pdf Allwinner V536 SOC datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/OP03-JS1158%20FORESEE_eMMC_NCEMASD9-08G%20SPEC%20A0%2020150701.pdf Foresee eMMC Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/AP6255%20IND%20datasheet_V1.1_12042017.pdf AP6255 Module Spec Sheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/RTL8211F-CG-RealtekMicroelectronics.pdf Ethernet PHY Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/LX50HDI4002-V0.pdf LCD Module Specification]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/GT911%20Capacitive%20Touch%20Controller%20Datasheet.pdf GOODiX GT911 5-Point Capacitive Touch Controller Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/GL850G%20Datasheet_128.pdf USB 2.0 Hub Controller]<br />
<br />
== SDK ==<br />
<br />
=== Overview ===<br />
<br />
==== Features ====<br />
*Linux kernel 4.9 (official version)<br />
* U-Boot 2014.07<br />
* ARM GCC based cross toolchain<br />
* Integrated build system<br />
<br />
==== Main Components ====<br />
==== Layout ====<br />
<pre><br />
├── build<br />
├── config<br />
├── Config.in<br />
├── dl<br />
├── lichee<br />
├── logs<br />
├── Makefile<br />
├── package<br />
├── prebuilt<br />
├── rules.mk<br />
├── scripts<br />
├── softwinner<br />
├── target<br />
├── toolchain<br />
└── tools<br />
</pre><br />
<br />
=== Download and Build ===<br />
==== Prebuilt Image ====<br />
For fast begin, you can download the [[http://files.lindeni.org/lindenis-v536/Images prebuilt image] here.<br><br />
[https://pan.baidu.com/s/1WZ1uSpZPoVP2e4P8xXkbbA 国内开发者请在此下载]提取码:4p3h <br />
<br />
==== System requirements ====<br />
Listed below are the recommended requirements for downloading and building the SDK:<br />
* CPU: x86_64 or better family processor<br />
* Memory: 8GB or higher<br />
* Disk: 20GB free hard disk space, if you build it in a Virtual machine, I recommand you allocate a 30G virtual hard disk.<br />
** The Whole SDK is about 15G.<br />
* OS: Ubuntu 14.04 (tested) or higher<br />
* Network: internet connection<br />
<br />
==== Lazy Start ====<br />
Here are VMware station 14 image files which include the whole compiled SDK. And the SDK remote repositoreies are on gitee (not github).<br />
<br><br />
<b>[https://pan.baidu.com/s/1y-bSgRf87lp_qjJgeVPe5w Click here to get it]</b> (access code: tq4x)<br />
<br><br />
The password of the Ubuntu 14.04 in the VMware is "lindenis". Enjoy it !<br />
<br />
==== Linux host setup ====<br />
<br />
Ubuntu 14.04<br />
<br />
''HINT: later version should also work.''<br />
<br />
'''Install prerequisites'''<br />
<br />
<pre><br />
$ sudo apt-get update<br />
$ sudo apt-get install build-essential libncurses5-dev zlib1g-dev gawk git git-core ccache gettext libssl-dev xsltproc gperf subversion <br />
$ sudo dpkg --add-architecture i386<br />
$ sudo apt-get update<br />
$ sudo apt-get install lib32z1 lib32ncurses5 libc6:i386 libstdc++6:i386<br />
</pre><br />
<br />
'''Sudo without password'''<br />
<br />
<pre><br />
$ sudo visudo<br />
</pre><br />
<br />
Add this line at the end (change “tom” to your username):<br />
<pre>tom ALL=(ALL) NOPASSWD: ALL</pre><br />
Ctrl-X to leave, save your changes, and you're done!<br />
<br />
==== Downloading ====<br />
The SDK is available on [https://github.com/lindenis-org github]. For Chinese developer, it is available on [https://search.gitee.com/?skin=rec&type=repository&q=lindenis gitee] too.<br />
<br />
We use Repo manage Git repositories. Clone Repo from [https://android.googlesource.com/tools/repo android Git repositories] or other mirrors and install it.<br />
<br>Chinese developers can install Repo follow these steps:<br />
<pre><br />
$ git clone http://mirrors.ustc.edu.cn/aosp/git-repo.git ~/.bin/repo<br />
$ echo "export PATH=~/.bin/repo:$PATH" >> ~/.bashrc<br />
$ source ~/.bashrc<br />
</pre><br />
<br />
Becase there are some big files in the SDK, please run the following command before you start the downloading.<br />
<pre><br />
$ git config --global http.postBuffer 524288000<br />
</pre> <br />
Then run this to check:<br />
<pre><br />
$ git config --list<br />
</pre> <br />
<br />
For Lindenis V536 SBC, download the SDK on Github via:(此为github的下载方式,国内下载较慢,请使用国内源的方式下载,见下文)<br />
<pre><br />
$ mkdir lindenis-v536<br />
$ cd lindenis-v536<br />
$ repo init -u https://github.com/lindenis-org/manifest.git -b v536 -m lindenis-v536.xml<br />
$ repo sync<br />
</pre><br />
<br />
We recommend the Chinese developer download the SDK source code on gitee via:<br />
<br><br />
国内的开发者我们推荐使用国内的源来进行源代码下载:<br />
<pre><br />
$ mkdir lindenis-v536<br />
$ cd lindenis-v536<br />
$ repo init -u https://gitee.com/lindenis/manifest.git -b master -m lindenis-v536.xml<br />
$ repo sync<br />
</pre><br />
<br />
And then download these two files from Baidu NetDisk, and then copy them into the target directory follow below steps:<br />
<br><br />
下载源码后,请在百度云上把相关的依赖包下载下来,并按照以下方式放入指定SDK目录中:<br />
<br><br />
[https://pan.baidu.com/s/191Acv_sH-0ncrnagZ8ksQw dl.tar.gz] (提取码: 575x)<br />
<pre><br />
$ cp dl.tar.gz lindenis-v536<br />
$ tar xzvf dl.tar.gz dl/<br />
</pre><br />
<br />
[https://pan.baidu.com/s/1kdbc8LbxPxlQLj-ZQU_Gqg libs.tar.xz] (提取码: ljvj)<br />
<pre><br />
$ cp libs.tar.xz lindenis-v536/package/cortana/cortana-sdk<br />
</pre><br />
<br />
The Download time depends on your network connection speed. After finish the download, you should get below directories and files:<br />
<pre><br />
build config Config.in device dl lichee Makefile package prebuilt rules.mk scripts softwinner target toolchain tools<br />
</pre><br />
<br />
Start a branch for local workspace:<br />
<pre><br />
$ repo start lindenis-v536 --all<br />
</pre><br />
<br />
==== Building ====<br />
===== Setup env =====<br />
*For Lindenis V536 SBC:<br />
<pre><br />
$ source build/envsetup.sh<br />
</pre><br />
<br />
<pre><br />
$ lunch<br />
</pre><br />
<br />
Then you will see the follwing menu, and enter the number to select the target case, and enter:<br />
<pre><br />
You're building on Linux<br />
<br />
Lunch menu... pick a combo:<br />
1. v536_Lindenis_SBC-tina<br />
<br />
Which would you like? [Default v536_Lindenis_SBC]:1<br />
</pre><br />
<br />
===== Build source =====<br />
* Build kernel and rootfs<br />
If you are the first time downloaded the SDK and have not built the SDK before, run the below two commands, then exit and save the configuration at first.<br />
<pre><br />
$ make menuconfig<br />
</pre><br />
<pre><br />
$ make kernel_menuconfig<br />
</pre><br />
Then make it and wait ...<br />
<pre><br />
$ make -j8 V=s<br />
</pre><br />
<br />
===== Build image =====<br />
<pre><br />
$ pack<br />
</pre><br />
<br />
==== Installation ====<br />
'''[http://files.lindeni.org/lindenis-v536/Tools/PhoenixSuit.7z PhoenixSuit]'''<br />
* Download the PhoenixSuit.7z and extract to a local folder (note: Windows only).<br />
* Open the PhoenixSuit.exe.<br />
[[File:PSM.JPG|500px]]<br />
* Click the "firmware" button.<br />
[[File:Firmware.png|500px]]<br />
* Click the "image" button to select the image file.<br />
[[File:selectImage.png|500px]]<br />
* Now the PC tool is ready. Just '''keep pressing''' the "fel" key on the SBC.<br />
[[File:FELKEY.jpg|500px]]<br />
* After connected the SBC to PC via a USB cable, release the key, and the PhoenixSuit will enter the burn model.<br />
[[File:BurnModel.JPG|500px]]<br />
* If you want to keep the user data, please click "No". Click "Yes" will clean all datas in eMMC.Then will begin to download the image into eMMC.<br />
* If you can not start to download, just plug-out the USB cable and try again.<br />
[[File:download.JPG|500px]]<br />
* Wait until it finish downloading.<br />
[[File:Ok.JPG|500px]]<br />
<br />
== OS ==<br />
=== Overview ===<br />
Lindenis Video OS is the recommended operating system for normal use on Lindenis V536 series boards. Lindenis Video OS is maintained by [http://www.lindeni.com/ Lindenis Tech. Ltd.]. The SDK is hosted on [https://github.com/lindenis-org GitHub].<br />
===== Applications =====<br />
[[File:LindenisVideoOS.png|500px|thumb|Lindenis Video OS Architecture]]<br />
* Lindlive: a low-laternce A/V streaming application powered by Lindenis.<br />
* Lindplayer: a meida player application powered Lindenis.<br />
* Lindcamera: a camera application (supported preview, snapshot and recording) powered by Lindenis. <br />
* ... ...<br />
<br />
===== Framewrok =====<br />
<br />
* FFindeni: a multimedia framework specialized for low-latency A/V processing built by Lindenis. <br />
* CedarX: a Allwinner official multimedia decoding framework.<br />
* [http://www.minigui.org/ MiniGUI]: a tiny and efficiency open source GUI framework.<br />
* ... ...<br />
<br />
===== Libraries =====<br />
<br />
* Runtime Libraries: the system basic libraries like libc and so on.<br />
* Libavwrapper: a Lindenis-built library abstracted the hardware operation of the A/V processing.<br />
* [http://ffmpeg.org/ FFmpeg]: an open source software library for recording, converting and streaming audio and video.<br />
* [http://live555.com/ Live555]: an open source software library for streaming audio and video.<br />
* ... ...<br />
<br />
===== Linux Kernel =====<br />
<br />
* Official version: 4.9<br />
<br />
=== Reference Documents ===<br />
[http://files.lindeni.org/lindenis-v536/Documents/AW Allwinner Official Reference Documents]<br />
<br />
=== System Setup ===<br />
<br />
===== Uart =====<br />
* By default, the ttyS3 is assigned to the Linux console. The UART transmit pin called "TX" and receive pin called "RX" are in the J12 pin group, whose label is DEBUG. And the bit rate is 115200 bps.See below red rectangle.<br />
[[File:UART.jpg|500px]]<br />
<br />
===== Camera =====<br />
The camera supports the imx317 module as default. If you need to change to imx307, you can follow the steps below:<br />
*1.modify device/config/chips/v536/configs/Lindenis_SBC/sys_config.fex<br />
<br />
find this:<br />
<pre><br />
sensor0_mname = "imx317_mipi"<br />
</pre><br />
change to:<br />
<pre><br />
sensor0_mname = "imx307_mipi"<br />
</pre><br />
*2. make menuconfig selection<br />
<pre><br />
Allwinner ---><br />
eyesee-mpp ---><br />
-*-eyesee-mpp-middleware ............... eyesee-mpp-middleware for Tina Linux<br />
select sensor (use sensor imx307) ---><br />
() use sensor imx317<br />
(X) use sensor imx307<br />
() use sensor imx278<br />
() use sensor imx258<br />
() use sensor imx386<br />
() use sensor sc2232<br />
</pre><br />
*3. do "make" and then flash the firmware.<br />
<br />
===== ISP Tuning =====<br />
<br />
'''Allwinner V536 [http://files.lindeni.org/lindenis-v536/Tools/ISP_Tools ISP Tuning Tool]''' | [https://pan.baidu.com/s/1Fpd9cQYXshiDqKzZEw4e6A 国内]提取码:c0u8<br />
* Download the HawkviewTools-V3.0.2.7z and extract to a local folder (note: Windows only).<br />
* Download the awTuningApp, push it into the board through ADB or SSH and then run it. <br />
* Please refer to the documents in '''docs''' folder for usage.<br />
<br />
===== Display =====<br />
* Because of the limitation that there is one display engine module in V536, Lindenis-V536 SBC can not support dual-display.<br />
<br />
* The default display device of the SDK and the prebuilt image is HDMI(1080p).<br />
<br />
* If you have download the prebuilt image, and burn it into eMMC, you can switch the display device follow these steps:<br />
<br />
'''Connect serial to control the board'''<br />
<br />
* Firstly, you should connect the SBC debug UART to computer via a serial-USB cable so that you can send commands to the board through a PC serial software like Putty.<br />
<br />
* After you connected successfully, you will see the log show on the PC serial software like this:<br />
<br />
[[File:SBC_BOOT.JPG|frameless]]<br />
<br />
'''Enter U-boot command mode'''<br />
<br />
* Power on and press any keyboard key within 1s when you see the message below, then you can enter u-boot command mode.<br />
<br />
* Under this mode, you can modify the kernel devices tree by FDT tools in u-boot.<br />
<br />
[[File:EnterKey.jpg|frameless]]<br />
<br />
'''Change display device configuration with FDT tool'''<br />
<br />
* Input the follow command to switch display device between LCD and HDMI (1080p):<br />
<br />
'''LCD:'''<br />
<pre><br />
fdt set disp screen0_output_type <0x01>;<br />
fdt set disp screen0_output_mode <0x04>;<br />
fdt save;<br />
reset;<br />
</pre><br />
<br />
'''HDMI (1080p):'''<br />
<br />
<pre><br />
fdt set disp screen0_output_type <0x03>;<br />
fdt set disp screen0_output_mode <0x0a>;<br />
fdt save;<br />
reset;<br />
</pre><br />
* You can also select different display device via configuration in sys_config.fex<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;disp init configuration<br />
;<br />
;disp_mode (0:screen0<screen0,fb0>)<br />
;screenx_output_type (0:none; 1:lcd; 2:tv; 3:hdmi;5:vdpo)<br />
;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)<br />
; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)<br />
;----------------------------------------------------------------------------------<br />
[disp]<br />
disp_init_enable = 1<br />
disp_mode = 0<br />
<br />
screen0_output_type = 3<br />
screen0_output_mode = 10<br />
<br />
</pre><br />
<br />
===== TouchPanel =====<br />
* After you connected the CTP panel to the board, insmod its driver like this:<br />
<pre><br />
insmod /lib/modules/4.9.118/gt9xx_ts.ko<br />
</pre><br />
* sys_config.fex should config as follow:<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;capacitor tp configuration<br />
;external int function<br />
;wakeup output function<br />
;notice --- tp_int_port & tp_io_port use the same port<br />
;----------------------------------------------------------------------------------<br />
[ctp]<br />
ctp_used = 1<br />
ctp_name = "gt911_1060"<br />
ctp_twi_id = 1<br />
ctp_twi_addr = 0x5d<br />
ctp_screen_max_x = 1280<br />
ctp_screen_max_y = 720<br />
ctp_revert_x_flag = 1<br />
ctp_revert_y_flag = 1<br />
ctp_exchange_x_y_flag = 0<br />
<br />
ctp_int_port = port:PL06<6><default><default><default><br />
ctp_wakeup = port:PL07<1><default><default><1><br />
</pre><br />
<br />
===== Wifi =====<br />
*sys_config.fex should config as follow:<br />
<pre><br />
[wlan]<br />
wlan_used = 1<br />
wlan_busnum = 1<br />
;wlan_usbnum = 3<br />
wlan_power = "vcc33-wifi"<br />
wlan_io_regulator = "vcc-pg"<br />
;wlan_en = port:PG11<1><default><default><0><br />
wlan_regon = port:PG11<1><default><default><0><br />
wlan_hostwake = port:PL05<6><default><default><0><br />
</pre><br />
*make sure CONFIG_BCMDHD is configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_BCMDHD = m<br />
</pre><br />
*make sure PACKAGE_ap6255-firmware is configured when make menuconfig<br />
<pre><br />
PACKAGE_ap6255-firmware = y<br />
</pre><br />
*insmod driver as follow:<br />
<pre><br />
insmod /lib/modules/4.9.118/bcmdhd.ko<br />
</pre><br />
*Then you can use ifconfig and wpa_supplicant tools connect network<br />
<br />
===== Bluetooth =====<br />
*sys_config.fex should config as follow:<br />
<pre><br />
[bt_para]<br />
bt_used = 1<br />
bt_power = "vcc33-wifi"<br />
bt_io_regulator = "vcc-pg"<br />
bt_rst_n = port:PG10<1><default><default><0><br />
</pre><br />
*You can take the follow shell cmd to start bt<br />
<pre><br />
echo 0 > /sys/class/rfkill/rfkill0/state<br />
sleep 2<br />
echo 1 > /sys/class/rfkill/rfkill0/state<br />
sleep 2<br />
brcm_patchram_plus --tosleep=200000 --no2bytes --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 \<br />
--baudrate 115200 --patchram /lib/firmware/BCM4345C0.hcd /dev/ttyS1 &<br />
</pre><br />
*When the bt device is started, you can use hciconfig tools to do someting you want<br />
*(if hciconfig is not install, you should add it when make menuconfig)<br />
<br />
===== Ethernet =====<br />
*sys_config.fex should configured as follow:<br />
<pre><br />
[gmac0]<br />
gmac0_used = 1<br />
phy-mode = "rgmii"<br />
gmac_rxd3 = port:PE00<3><default><default><default><br />
gmac_rxd2 = port:PE01<3><default><default><default><br />
gmac_rxd1 = port:PE02<3><default><default><default><br />
gmac_rxd0 = port:PE03<3><default><default><default><br />
gmac_rxck = port:PE04<3><default><default><default><br />
gmac_rxctl = port:PE05<3><default><default><default><br />
gmac_clkin = port:PE06<3><default><default><default><br />
gmac_txd3 = port:PE07<3><default><3><default><br />
gmac_txd2 = port:PE08<3><default><3><default><br />
gmac_txd1 = port:PE09<3><default><3><default><br />
gmac_txd0 = port:PE10<3><default><3><default><br />
gmac_txck = port:PE11<3><default><3><default><br />
gmac_txctl = port:PE12<3><default><3><default><br />
gmac_mdc = port:PE13<3><default><3><default><br />
gmac_mdio = port:PE14<3><default><3><default><br />
gmac_ephy25m = port:PE15<3><default><default><default><br />
phy-rst = port:PE21<1><default><default><0><br />
gmac-power0 = "vcc-ephy"<br />
gmac-power1 = ""<br />
gmac-power2 = ""<br />
tx-delay = 7<br />
rx-delay = 31<br />
use_ephy25m = 1<br />
</pre><br />
*make sure CONFIG_SUNXI_GMAC is configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_SUNXI_GMAC = y<br />
</pre><br />
<br />
===== Keypad =====<br />
* The Keypad on the board is an GPADC keypad. The GPADC driver detect the different voltage of the keys and report the key value to user space via Linux standard Input Subsystem.<br><br />
* Here is the parameters show in the sys_config.fex:<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;resistance gpadc configuration<br />
:gpadc_used : Enable the GPADC<br />
;channel_num: Maxinum number of channels supported on the platform.<br />
;channel_select: channel enable setection. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08<br />
;channel_data_select: channel data enable. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_compare_select: compare function enable channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_cld_select: compare function low data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_chd_select: compare function hig data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;----------------------------------------------------------------------------------<br />
[gpadc]<br />
gpadc_used = 1<br />
channel_num = 1<br />
channel_select = 0x01<br />
channel_data_select = 0<br />
channel_compare_select = 0x01<br />
channel_cld_select = 0x01<br />
channel_chd_select = 0x01<br />
channel0_compare_lowdata = 1700000<br />
channel0_compare_higdata = 1200000<br />
key_cnt = 5<br />
key0_vol = 116<br />
key0_val = 115<br />
key1_vol = 233<br />
key1_val = 114<br />
key2_vol = 357<br />
key2_val = 139<br />
key3_vol = 473<br />
key3_val = 28<br />
key4_vol = 586<br />
key4_val = 102<br />
</pre><br />
<br />
===== Audio =====<br />
====== audiocodec ======<br />
*sys_config.fex should configured as follow:<br />
<pre><br />
[sndcodec]<br />
sndcodec_used = 0x1<br />
<br />
[i2s]<br />
i2s_used = 0x1<br />
<br />
[codec]<br />
codec_used = 0x1<br />
lineoutvol = 0x1f<br />
maingain = 0x4<br />
headsetmicgain = 0x4<br />
adcagc_cfg = 0x0<br />
adcdrc_cfg = 0x0<br />
adchpf_cfg = 0x0<br />
dacdrc_cfg = 0x0<br />
dachpf_cfg = 0x0<br />
pa_ctl_level = 0x1<br />
pa_msleep_time = 0xa0<br />
gpio-spk = port:PH10<1><1><default><default><br />
</pre><br />
<br />
====== i2s ======<br />
*sys_config.fex should configured as follow, and the param should configured accord your device need:<br />
:'''if you i2s1 is used'''<br />
<pre><br />
[snddaudo0]<br />
snddaudio0_used = 1<br />
<br />
[daudio0]<br />
daudio0_used = 1<br />
daudio_master = 4<br />
audio_format = 4<br />
signal_inversion = 1<br />
slot_width_select = 32<br />
pcm_lrck_period = 128<br />
msb_lsb_first = 0<br />
sign_extend = 0<br />
frametype = 0<br />
mclk_div = 1<br />
tdm_config = 0<br />
tx_data_mode = 0<br />
rx_data_mode = 0<br />
</pre><br />
<br />
:'''if you i2s2 is used'''<br />
<pre><br />
[snddaudo2]<br />
snddaudio2_used = 1<br />
<br />
[daudio2]<br />
daudio2_used = 1<br />
daudio_master = 4<br />
audio_format = 1<br />
signal_inversion = 1<br />
slot_width_select = 32<br />
pcm_lrck_period = 32<br />
msb_lsb_first = 0<br />
sign_extend = 0<br />
frametype = 0<br />
mclk_div = 0<br />
tdm_config = 1<br />
tx_data_mode = 0<br />
rx_data_mode = 0<br />
</pre><br />
*make sure CONFIG_SND_SUNXI_SOC_SUNXI_DAUDIO configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_SND_SUNXI_SOC_SUNXI_DAUDIO = y<br />
</pre><br />
<br />
=== Application Demo ===<br />
The application demos powered by Lindenis.<b>[http://files.lindeni.org/lindenis-v536/Demo/ Click here to download the demos]</b><br />
<br />
===== Lindlive =====<br />
lindlive is a high performance low latency live streaming library.<br />
lindlive integrate some useful function modules, such as audio/video capture, encoding and streaming protocol.<br />
So developers can easily implement a live streaming server based on lindenis board.<br />
<br />
There are two samples app using lindlive, one is sample_mppsrc_2_livesink and the other is sample_mppsrc_2_ffsink.<br />
The sample source code is located in SDK.<br />
<br />
!!! It is strongly recommended to use lindplayer with '-live' as the client of the lindlive.<br />
It will be lower latency.<br />
<br />
usage:<br />
sample_mppsrc_2_livesink -i [ip] -p [port] -n [name]<br />
-i [ip] is the ip address of the server. If it is not set, the 'ip' default is local ethernet or wifi ip address.<br />
-p [port] is the port of the server. If it is not set, the 'port' default is rtsp port 8554.<br />
-n [name] is the name of live streaming. If it is not set, the 'name' default is 'live'.<br />
All of the arguments are optional.<br />
If sample_mppsrc_2_livesink is correctly running, the server url is 'rtsp://[ip]:[port]/[name]'<br />
Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.<br />
<br />
sample_mppsrc_2_ffsink -t [type] -u [url]<br />
-t [type]: the muxer type, can be 'mpegts/mp4/rtp/rtp_mpegts/rtsp/rtmp'<br />
-u [url] : sink to url, like: '/tmp/out.mp4' or 'rtp://192.168.1.100:12345'<br />
Example 1: sink as a live streaming.<br />
sample_mppsrc_2_ffsink -t rtp_mpegts -u rtp://192.168.3.118:12345<br />
sample_mppsrc_2_ffsink -t rtp -u rtp://192.168.3.118:12342/test<br />
Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.<br />
Example 2: save as a local file.<br />
sample_mppsrc_2_ffsink -t mp4 -u /tmp/out.mp4<br />
sample_mppsrc_2_ffsink -t mpegts -u /tmp/out.ts<br />
<br />
===== Lindplayer =====<br />
lindplayer is a high performance media player that can run on lindenis board. <br />
It supports upto 4K@30fps H.264/H.265 video decoder.<br />
It can play a local media file or a media stream from internet.<br />
<br />
usage:<br />
lindplayer -u [url] <options><br />
-u [url] is the media path to be played.<br />
<options> use -live to indicate this is a live streaming.<br />
such as:<br />
lindplayer -u ./movie.ts<br />
or lindplayer -u http://192.168.1.102/test<br />
or lindplayer -u rtsp://192.168.1.102/test -live<br />
<br />
===== Lindcamera =====</div>Michaelhttp://wiki.lindeni.org/index.php?title=Lindenis_V536&diff=775Lindenis V5362020-02-20T14:25:12Z<p>Michael: /* Camera */</p>
<hr />
<div>== Key Features ==<br />
=== Processor core ===<br />
*Dual-Core Cortex A7@1.2GHz<br />
*Neon acceleration, integrated FPU<br />
<br />
=== Video Encoding/Decoding Performance ===<br />
*H.264 BP/MP/HP, H.265 Main Profile encoding<br />
*I/P/Dual P frame H.264/H.265 encoding<br />
*MJPEG/JPEG baseline encoding<br />
*Real-time multi-stream H.264/H.265 encoding capability:<br />
**- 3840x2160@30fps+720p@30fps encoding<br />
**- 3840x2160@30fps decoding<br />
*Maximum 8192x8192 resolution for JPEG encoding/decoding<br />
*CBR, VBR modes<br />
*Encoding of eight ROIs<br />
<br />
=== Graphics Processing ===<br />
*Supports Lens distortion correction, fisheye and wide angle correction<br />
*Supports 90°、180°、270° picture rotation<br />
<br />
=== Professional Image Effects ===<br />
*Maximum performance is 4224x3168@30fps<br />
*Adjustable 3A functions (AE, AWB and AF)<br />
*Supports 2F WDR and Local Tone mapping,supporting highlight suppression and backlight compensation<br />
*Supports bad pixel correction, Lens shading correction<br />
*Supports multi-level 3D denoising, remove motion smear and color noise<br />
*Supports color adjustment, color enhancement<br />
*Supports image dynamic contrast enhance and sharpness enhance<br />
*Supports 4 channels of scaling output from 1/8x to 1x<br />
*OSD overlaying of eight regions before encoding<br />
*Supports image mirroring and flipping<br />
<br />
=== Various interfaces ===<br />
*Supports MIPI-CSI2\HiSPi\Sub-LVDS<br />
*Supports BT1120 input/output<br />
*Supports Line-in/Line-out<br />
*Supports Dual-channel differential MIC inputs <br />
*Supports WiFi 802.11ac / BT4.2 (option)<br />
<br />
=== Software Support ===<br />
*Linux-4.9<br />
<br />
== Target Applications ==<br />
*SDV<br />
*Smart IPC<br />
*Smart Camera<br />
Or you can use it to build:<br />
*A computer<br />
*A streaming server<br />
<br />
== Accessories Step-by-Step Guides ==<br />
<br />
=== Power Supply ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/Power-Supply-Brief.pdf 5V 2A Power Supply]<br />
<br />
=== HDMI Cable ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/HDMI-Cable-Brief.pdf 4K HDMI Cable]<br />
<br />
=== Camera module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/Camera-Module-Brief.pdf 4K Camera Module brief]<br />
<br />
=== LCD ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/LCD-with-CTP-Brief.pdf 5" 720P LCD with CTP brief]<br />
<br />
=== Flash module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/eMMC-Module-Brief.pdf 8GB eMMC Module brief]<br />
<br />
=== WiFi and Bluetooth module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/WiFi-Module-Brief.pdf WiFi 802.11ac / BT4.2 Module brief]<br />
<br />
== Hardware Specification ==<br />
<br />
=== Board Features ===<br />
<br />
==== Video Out ====<br />
<br />
* HDMI 1.4 Type A, up to 4K@30FPS<br />
* MIPI-DSI, 4 lanes, up to 1080P<br />
* LCD interface<br />
<br />
==== Video In ====<br />
<br />
* 1 x MIPI-CSI2 - Camera interface, 4 lanes per channel<br />
<br />
==== Audio ====<br />
* 3.5mm Line in / out<br />
* 1 x mic<br />
* 1 x dmic<br />
<br />
==== Network ====<br />
* 10/100/1000Mbps Ethernet<br />
* WiFi with Bluetooth (optional)<br />
<br />
==== Storage ====<br />
* MicroSD Card bootable, support SDHC and SDXC, storage up to 256GB<br />
<br />
==== Expansion Ports ====<br />
* Board to Board connector - Flash module interface<br />
* Wi-Fi/BT Module Header - SDIO 3.0 and UART, pitch 2.0mm<br />
* 2x10 pins "Power Supply" GPIO Header: vbat, aldo1, bldo1, aldo3<br />
* 4 pins GPIO Header: TWI1<br />
* 2x7 pins "I2S" GPIO Header<br />
* 3 pins GPIO Header: PH4, PH10, GND<br />
* 3 pins GPIO Header: 1xADC<br />
* 4 pins GPIO Header: S-TWI<br />
* VBAT: Battery connector<br />
* Storage: Bootable MicroSD card<br />
* Video out: HDMI 1.4, 4 lanes MIPI-DSI<br />
* Video in: 1 x DVP<br />
* Audio: 3.5mm Line in / out, 1 x mic<br />
* Network: 10/100/1000Mbps Ethernet<br />
* USB: 1 x Micro USB, 2 x USB 2.0<br />
<br />
=== Board Information ===<br />
* Board Dimensions: 130mm x 85mm<br />
* Input Power: 5V@2A micro USB connector, 3.7V Li-Ion battery connector<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SOM_Schematic.pdf Lindenis V536 SOM Schematic]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SOM_PCB_Location_Map.pdf Lindenis V536 SOM PCB Place Map]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_Full_Function_Board_Schematic.pdf Lindenis V536 SBC Full-Function Board Schematic]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SBC_mulit-function_pins_guide.pdf Lindenis V536 SBC mulit-function pins guide] | [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_开发板管脚复用说明.pdf 中文]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_Full_Function_Board_PCB_Location_Map.pdf Lindenis V536 SBC Full-Function Board PCB Place Map]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/src Lindenis V536 SBC Full-Function Board PCB Source Files]<br />
** [https://pan.baidu.com/s/1jiMNIYvwvm3Y6gUuFZxKxg Clik here to get the documents package in Baidu NetDisk(access code:5i5k)]<br />
<br />
== Datasheet ==<br />
* Allwinner V536 SOC Brief [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V536-Chinese-Brief.pdf 中文] | [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V536-English-Brief.pdf English]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V5x6_Professional_Camera_SoC_Datasheet_V1.2.pdf Allwinner V536 SOC datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/OP03-JS1158%20FORESEE_eMMC_NCEMASD9-08G%20SPEC%20A0%2020150701.pdf Foresee eMMC Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/AP6255%20IND%20datasheet_V1.1_12042017.pdf AP6255 Module Spec Sheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/RTL8211F-CG-RealtekMicroelectronics.pdf Ethernet PHY Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/LX50HDI4002-V0.pdf LCD Module Specification]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/GT911%20Capacitive%20Touch%20Controller%20Datasheet.pdf GOODiX GT911 5-Point Capacitive Touch Controller Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/GL850G%20Datasheet_128.pdf USB 2.0 Hub Controller]<br />
<br />
== SDK ==<br />
<br />
=== Overview ===<br />
<br />
==== Features ====<br />
*Linux kernel 4.9 (official version)<br />
* U-Boot 2014.07<br />
* ARM GCC based cross toolchain<br />
* Integrated build system<br />
<br />
==== Main Components ====<br />
==== Layout ====<br />
<pre><br />
├── build<br />
├── config<br />
├── Config.in<br />
├── dl<br />
├── lichee<br />
├── logs<br />
├── Makefile<br />
├── package<br />
├── prebuilt<br />
├── rules.mk<br />
├── scripts<br />
├── softwinner<br />
├── target<br />
├── toolchain<br />
└── tools<br />
</pre><br />
<br />
=== Download and Build ===<br />
==== Prebuilt Image ====<br />
For fast begin, you can download the [[http://files.lindeni.org/lindenis-v536/Images prebuilt image] here.<br><br />
[https://pan.baidu.com/s/1WZ1uSpZPoVP2e4P8xXkbbA 国内开发者请在此下载]提取码:4p3h <br />
<br />
==== System requirements ====<br />
Listed below are the recommended requirements for downloading and building the SDK:<br />
* CPU: x86_64 or better family processor<br />
* Memory: 8GB or higher<br />
* Disk: 20GB free hard disk space, if you build it in a Virtual machine, I recommand you allocate a 30G virtual hard disk.<br />
** The Whole SDK is about 15G.<br />
* OS: Ubuntu 14.04 (tested) or higher<br />
* Network: internet connection<br />
<br />
==== Lazy Start ====<br />
Here are VMware station 14 image files which include the whole compiled SDK. And the SDK remote repositoreies are on gitee (not github).<br />
<br><br />
<b>[https://pan.baidu.com/s/1y-bSgRf87lp_qjJgeVPe5w Click here to get it]</b> (access code: tq4x)<br />
<br><br />
The password of the Ubuntu 14.04 in the VMware is "lindenis". Enjoy it !<br />
<br />
==== Linux host setup ====<br />
<br />
Ubuntu 14.04<br />
<br />
''HINT: later version should also work.''<br />
<br />
'''Install prerequisites'''<br />
<br />
<pre><br />
$ sudo apt-get update<br />
$ sudo apt-get install build-essential libncurses5-dev zlib1g-dev gawk git git-core ccache gettext libssl-dev xsltproc gperf subversion <br />
$ sudo dpkg --add-architecture i386<br />
$ sudo apt-get update<br />
$ sudo apt-get install lib32z1 lib32ncurses5 libc6:i386 libstdc++6:i386<br />
</pre><br />
<br />
'''Sudo without password'''<br />
<br />
<pre><br />
$ sudo visudo<br />
</pre><br />
<br />
Add this line at the end (change “tom” to your username):<br />
<pre>tom ALL=(ALL) NOPASSWD: ALL</pre><br />
Ctrl-X to leave, save your changes, and you're done!<br />
<br />
==== Downloading ====<br />
The SDK is available on [https://github.com/lindenis-org github]. For Chinese developer, it is available on [https://search.gitee.com/?skin=rec&type=repository&q=lindenis gitee] too.<br />
<br />
We use Repo manage Git repositories. Clone Repo from [https://android.googlesource.com/tools/repo android Git repositories] or other mirrors and install it.<br />
<br>Chinese developers can install Repo follow these steps:<br />
<pre><br />
$ git clone http://mirrors.ustc.edu.cn/aosp/git-repo.git ~/.bin/repo<br />
$ echo "export PATH=~/.bin/repo:$PATH" >> ~/.bashrc<br />
$ source ~/.bashrc<br />
</pre><br />
<br />
Becase there are some big files in the SDK, please run the following command before you start the downloading.<br />
<pre><br />
$ git config --global http.postBuffer 524288000<br />
</pre> <br />
Then run this to check:<br />
<pre><br />
$ git config --list<br />
</pre> <br />
<br />
For Lindenis V536 SBC, download the SDK on Github via:(此为github的下载方式,国内下载较慢,请使用国内源的方式下载,见下文)<br />
<pre><br />
$ mkdir lindenis-v536<br />
$ cd lindenis-v536<br />
$ repo init -u https://github.com/lindenis-org/manifest.git -b v536 -m lindenis-v536.xml<br />
$ repo sync<br />
</pre><br />
<br />
We recommend the Chinese developer download the SDK source code on gitee via:<br />
<br><br />
国内的开发者我们推荐使用国内的源来进行源代码下载:<br />
<pre><br />
$ mkdir lindenis-v536<br />
$ cd lindenis-v536<br />
$ repo init -u https://gitee.com/lindenis/manifest.git -b master -m lindenis-v536.xml<br />
$ repo sync<br />
</pre><br />
<br />
And then download these two files from Baidu NetDisk, and then copy them into the target directory follow below steps:<br />
<br><br />
下载源码后,请在百度云上把相关的依赖包下载下来,并按照以下方式放入指定SDK目录中:<br />
<br><br />
[https://pan.baidu.com/s/191Acv_sH-0ncrnagZ8ksQw dl.tar.gz] (提取码: 575x)<br />
<pre><br />
$ cp dl.tar.gz lindenis-v536<br />
$ tar xzvf dl.tar.gz dl/<br />
</pre><br />
<br />
[https://pan.baidu.com/s/1kdbc8LbxPxlQLj-ZQU_Gqg libs.tar.xz] (提取码: ljvj)<br />
<pre><br />
$ cp libs.tar.xz lindenis-v536/package/cortana/cortana-sdk<br />
</pre><br />
<br />
The Download time depends on your network connection speed. After finish the download, you should get below directories and files:<br />
<pre><br />
build config Config.in device dl lichee Makefile package prebuilt rules.mk scripts softwinner target toolchain tools<br />
</pre><br />
<br />
Start a branch for local workspace:<br />
<pre><br />
$ repo start lindenis-v536 --all<br />
</pre><br />
<br />
==== Building ====<br />
===== Setup env =====<br />
*For Lindenis V536 SBC:<br />
<pre><br />
$ source build/envsetup.sh<br />
</pre><br />
<br />
<pre><br />
$ lunch<br />
</pre><br />
<br />
Then you will see the follwing menu, and enter the number to select the target case, and enter:<br />
<pre><br />
You're building on Linux<br />
<br />
Lunch menu... pick a combo:<br />
1. v536_Lindenis_SBC-tina<br />
<br />
Which would you like? [Default v536_Lindenis_SBC]:1<br />
</pre><br />
<br />
===== Build source =====<br />
* Build kernel and rootfs<br />
If you are the first time downloaded the SDK and have not built the SDK before, run the below two commands, then exit and save the configuration at first.<br />
<pre><br />
$ make menuconfig<br />
</pre><br />
<pre><br />
$ make kernel_menuconfig<br />
</pre><br />
Then make it and wait ...<br />
<pre><br />
$ make -j8 V=s<br />
</pre><br />
<br />
===== Build image =====<br />
<pre><br />
$ pack<br />
</pre><br />
<br />
==== Installation ====<br />
'''[http://files.lindeni.org/lindenis-v536/Tools/PhoenixSuit.7z PhoenixSuit]'''<br />
* Download the PhoenixSuit.7z and extract to a local folder (note: Windows only).<br />
* Open the PhoenixSuit.exe.<br />
[[File:PSM.JPG|500px]]<br />
* Click the "firmware" button.<br />
[[File:Firmware.png|500px]]<br />
* Click the "image" button to select the image file.<br />
[[File:selectImage.png|500px]]<br />
* Now the PC tool is ready. Just '''keep pressing''' the "fel" key on the SBC.<br />
[[File:FELKEY.jpg|500px]]<br />
* After connected the SBC to PC via a USB cable, release the key, and the PhoenixSuit will enter the burn model.<br />
[[File:BurnModel.JPG|500px]]<br />
* If you want to keep the user data, please click "No". Click "Yes" will clean all datas in eMMC.Then will begin to download the image into eMMC.<br />
* If you can not start to download, just plug-out the USB cable and try again.<br />
[[File:download.JPG|500px]]<br />
* Wait until it finish downloading.<br />
[[File:Ok.JPG|500px]]<br />
<br />
== OS ==<br />
=== Overview ===<br />
Lindenis Video OS is the recommended operating system for normal use on Lindenis V536 series boards. Lindenis Video OS is maintained by [http://www.lindeni.com/ Lindenis Tech. Ltd.]. The SDK is hosted on [https://github.com/lindenis-org GitHub].<br />
===== Applications =====<br />
[[File:LindenisVideoOS.png|500px|thumb|Lindenis Video OS Architecture]]<br />
* Lindlive: a low-laternce A/V streaming application powered by Lindenis.<br />
* Lindplayer: a meida player application powered Lindenis.<br />
* Lindcamera: a camera application (supported preview, snapshot and recording) powered by Lindenis. <br />
* ... ...<br />
<br />
===== Framewrok =====<br />
<br />
* FFindeni: a multimedia framework specialized for low-latency A/V processing built by Lindenis. <br />
* CedarX: a Allwinner official multimedia decoding framework.<br />
* [http://www.minigui.org/ MiniGUI]: a tiny and efficiency open source GUI framework.<br />
* ... ...<br />
<br />
===== Libraries =====<br />
<br />
* Runtime Libraries: the system basic libraries like libc and so on.<br />
* Libavwrapper: a Lindenis-built library abstracted the hardware operation of the A/V processing.<br />
* [http://ffmpeg.org/ FFmpeg]: an open source software library for recording, converting and streaming audio and video.<br />
* [http://live555.com/ Live555]: an open source software library for streaming audio and video.<br />
* ... ...<br />
<br />
===== Linux Kernel =====<br />
<br />
* Official version: 4.9<br />
<br />
=== Reference Documents ===<br />
[http://files.lindeni.org/lindenis-v536/Documents/AW Allwinner Official Reference Documents]<br />
<br />
=== System Setup ===<br />
<br />
===== Uart =====<br />
* By default, the ttyS3 is assigned to the Linux console. The UART transmit pin called "TX" and receive pin called "RX" are in the J12 pin group, whose label is DEBUG. And the bit rate is 115200 bps.See below red rectangle.<br />
[[File:UART.jpg|500px]]<br />
<br />
===== Camera =====<br />
The camera supports the imx317 module as default. If you need to change to imx307, you can follow the steps below:<br />
*1.modify device/config/chips/v536/configs/Lindenis_SBC/sys_config.fex<br />
<br />
find this:<br />
<br />
sensor0_mname = "imx317_mipi"<br />
<br />
change to:<br />
<br />
sensor0_mname = "imx307_mipi"<br />
<br />
*2. make menuconfig selection<br />
<br />
Allwinner ---><br />
<br />
eyesee-mpp ---><br />
<br />
-*-eyesee-mpp-middleware ............... eyesee-mpp-middleware for Tina Linux<br />
<br />
select sensor (use sensor imx307) ---><br />
<br />
() use sensor imx317<br />
<br />
(X) use sensor imx307<br />
<br />
() use sensor imx278<br />
<br />
() use sensor imx258<br />
<br />
() use sensor imx386<br />
<br />
() use sensor sc2232<br />
<br />
*3. do "make" and then flash the firmware.<br />
<br />
===== ISP Tuning =====<br />
<br />
'''Allwinner V536 [http://files.lindeni.org/lindenis-v536/Tools/ISP_Tools ISP Tuning Tool]''' | [https://pan.baidu.com/s/1Fpd9cQYXshiDqKzZEw4e6A 国内]提取码:c0u8<br />
* Download the HawkviewTools-V3.0.2.7z and extract to a local folder (note: Windows only).<br />
* Download the awTuningApp, push it into the board through ADB or SSH and then run it. <br />
* Please refer to the documents in '''docs''' folder for usage.<br />
<br />
===== Display =====<br />
* Because of the limitation that there is one display engine module in V536, Lindenis-V536 SBC can not support dual-display.<br />
<br />
* The default display device of the SDK and the prebuilt image is HDMI(1080p).<br />
<br />
* If you have download the prebuilt image, and burn it into eMMC, you can switch the display device follow these steps:<br />
<br />
'''Connect serial to control the board'''<br />
<br />
* Firstly, you should connect the SBC debug UART to computer via a serial-USB cable so that you can send commands to the board through a PC serial software like Putty.<br />
<br />
* After you connected successfully, you will see the log show on the PC serial software like this:<br />
<br />
[[File:SBC_BOOT.JPG|frameless]]<br />
<br />
'''Enter U-boot command mode'''<br />
<br />
* Power on and press any keyboard key within 1s when you see the message below, then you can enter u-boot command mode.<br />
<br />
* Under this mode, you can modify the kernel devices tree by FDT tools in u-boot.<br />
<br />
[[File:EnterKey.jpg|frameless]]<br />
<br />
'''Change display device configuration with FDT tool'''<br />
<br />
* Input the follow command to switch display device between LCD and HDMI (1080p):<br />
<br />
'''LCD:'''<br />
<pre><br />
fdt set disp screen0_output_type <0x01>;<br />
fdt set disp screen0_output_mode <0x04>;<br />
fdt save;<br />
reset;<br />
</pre><br />
<br />
'''HDMI (1080p):'''<br />
<br />
<pre><br />
fdt set disp screen0_output_type <0x03>;<br />
fdt set disp screen0_output_mode <0x0a>;<br />
fdt save;<br />
reset;<br />
</pre><br />
* You can also select different display device via configuration in sys_config.fex<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;disp init configuration<br />
;<br />
;disp_mode (0:screen0<screen0,fb0>)<br />
;screenx_output_type (0:none; 1:lcd; 2:tv; 3:hdmi;5:vdpo)<br />
;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)<br />
; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)<br />
;----------------------------------------------------------------------------------<br />
[disp]<br />
disp_init_enable = 1<br />
disp_mode = 0<br />
<br />
screen0_output_type = 3<br />
screen0_output_mode = 10<br />
<br />
</pre><br />
<br />
===== TouchPanel =====<br />
* After you connected the CTP panel to the board, insmod its driver like this:<br />
<pre><br />
insmod /lib/modules/4.9.118/gt9xx_ts.ko<br />
</pre><br />
* sys_config.fex should config as follow:<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;capacitor tp configuration<br />
;external int function<br />
;wakeup output function<br />
;notice --- tp_int_port & tp_io_port use the same port<br />
;----------------------------------------------------------------------------------<br />
[ctp]<br />
ctp_used = 1<br />
ctp_name = "gt911_1060"<br />
ctp_twi_id = 1<br />
ctp_twi_addr = 0x5d<br />
ctp_screen_max_x = 1280<br />
ctp_screen_max_y = 720<br />
ctp_revert_x_flag = 1<br />
ctp_revert_y_flag = 1<br />
ctp_exchange_x_y_flag = 0<br />
<br />
ctp_int_port = port:PL06<6><default><default><default><br />
ctp_wakeup = port:PL07<1><default><default><1><br />
</pre><br />
<br />
===== Wifi =====<br />
*sys_config.fex should config as follow:<br />
<pre><br />
[wlan]<br />
wlan_used = 1<br />
wlan_busnum = 1<br />
;wlan_usbnum = 3<br />
wlan_power = "vcc33-wifi"<br />
wlan_io_regulator = "vcc-pg"<br />
;wlan_en = port:PG11<1><default><default><0><br />
wlan_regon = port:PG11<1><default><default><0><br />
wlan_hostwake = port:PL05<6><default><default><0><br />
</pre><br />
*make sure CONFIG_BCMDHD is configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_BCMDHD = m<br />
</pre><br />
*make sure PACKAGE_ap6255-firmware is configured when make menuconfig<br />
<pre><br />
PACKAGE_ap6255-firmware = y<br />
</pre><br />
*insmod driver as follow:<br />
<pre><br />
insmod /lib/modules/4.9.118/bcmdhd.ko<br />
</pre><br />
*Then you can use ifconfig and wpa_supplicant tools connect network<br />
<br />
===== Bluetooth =====<br />
*sys_config.fex should config as follow:<br />
<pre><br />
[bt_para]<br />
bt_used = 1<br />
bt_power = "vcc33-wifi"<br />
bt_io_regulator = "vcc-pg"<br />
bt_rst_n = port:PG10<1><default><default><0><br />
</pre><br />
*You can take the follow shell cmd to start bt<br />
<pre><br />
echo 0 > /sys/class/rfkill/rfkill0/state<br />
sleep 2<br />
echo 1 > /sys/class/rfkill/rfkill0/state<br />
sleep 2<br />
brcm_patchram_plus --tosleep=200000 --no2bytes --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 \<br />
--baudrate 115200 --patchram /lib/firmware/BCM4345C0.hcd /dev/ttyS1 &<br />
</pre><br />
*When the bt device is started, you can use hciconfig tools to do someting you want<br />
*(if hciconfig is not install, you should add it when make menuconfig)<br />
<br />
===== Ethernet =====<br />
*sys_config.fex should configured as follow:<br />
<pre><br />
[gmac0]<br />
gmac0_used = 1<br />
phy-mode = "rgmii"<br />
gmac_rxd3 = port:PE00<3><default><default><default><br />
gmac_rxd2 = port:PE01<3><default><default><default><br />
gmac_rxd1 = port:PE02<3><default><default><default><br />
gmac_rxd0 = port:PE03<3><default><default><default><br />
gmac_rxck = port:PE04<3><default><default><default><br />
gmac_rxctl = port:PE05<3><default><default><default><br />
gmac_clkin = port:PE06<3><default><default><default><br />
gmac_txd3 = port:PE07<3><default><3><default><br />
gmac_txd2 = port:PE08<3><default><3><default><br />
gmac_txd1 = port:PE09<3><default><3><default><br />
gmac_txd0 = port:PE10<3><default><3><default><br />
gmac_txck = port:PE11<3><default><3><default><br />
gmac_txctl = port:PE12<3><default><3><default><br />
gmac_mdc = port:PE13<3><default><3><default><br />
gmac_mdio = port:PE14<3><default><3><default><br />
gmac_ephy25m = port:PE15<3><default><default><default><br />
phy-rst = port:PE21<1><default><default><0><br />
gmac-power0 = "vcc-ephy"<br />
gmac-power1 = ""<br />
gmac-power2 = ""<br />
tx-delay = 7<br />
rx-delay = 31<br />
use_ephy25m = 1<br />
</pre><br />
*make sure CONFIG_SUNXI_GMAC is configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_SUNXI_GMAC = y<br />
</pre><br />
<br />
===== Keypad =====<br />
* The Keypad on the board is an GPADC keypad. The GPADC driver detect the different voltage of the keys and report the key value to user space via Linux standard Input Subsystem.<br><br />
* Here is the parameters show in the sys_config.fex:<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;resistance gpadc configuration<br />
:gpadc_used : Enable the GPADC<br />
;channel_num: Maxinum number of channels supported on the platform.<br />
;channel_select: channel enable setection. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08<br />
;channel_data_select: channel data enable. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_compare_select: compare function enable channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_cld_select: compare function low data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_chd_select: compare function hig data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;----------------------------------------------------------------------------------<br />
[gpadc]<br />
gpadc_used = 1<br />
channel_num = 1<br />
channel_select = 0x01<br />
channel_data_select = 0<br />
channel_compare_select = 0x01<br />
channel_cld_select = 0x01<br />
channel_chd_select = 0x01<br />
channel0_compare_lowdata = 1700000<br />
channel0_compare_higdata = 1200000<br />
key_cnt = 5<br />
key0_vol = 116<br />
key0_val = 115<br />
key1_vol = 233<br />
key1_val = 114<br />
key2_vol = 357<br />
key2_val = 139<br />
key3_vol = 473<br />
key3_val = 28<br />
key4_vol = 586<br />
key4_val = 102<br />
</pre><br />
<br />
===== Audio =====<br />
====== audiocodec ======<br />
*sys_config.fex should configured as follow:<br />
<pre><br />
[sndcodec]<br />
sndcodec_used = 0x1<br />
<br />
[i2s]<br />
i2s_used = 0x1<br />
<br />
[codec]<br />
codec_used = 0x1<br />
lineoutvol = 0x1f<br />
maingain = 0x4<br />
headsetmicgain = 0x4<br />
adcagc_cfg = 0x0<br />
adcdrc_cfg = 0x0<br />
adchpf_cfg = 0x0<br />
dacdrc_cfg = 0x0<br />
dachpf_cfg = 0x0<br />
pa_ctl_level = 0x1<br />
pa_msleep_time = 0xa0<br />
gpio-spk = port:PH10<1><1><default><default><br />
</pre><br />
<br />
====== i2s ======<br />
*sys_config.fex should configured as follow, and the param should configured accord your device need:<br />
:'''if you i2s1 is used'''<br />
<pre><br />
[snddaudo0]<br />
snddaudio0_used = 1<br />
<br />
[daudio0]<br />
daudio0_used = 1<br />
daudio_master = 4<br />
audio_format = 4<br />
signal_inversion = 1<br />
slot_width_select = 32<br />
pcm_lrck_period = 128<br />
msb_lsb_first = 0<br />
sign_extend = 0<br />
frametype = 0<br />
mclk_div = 1<br />
tdm_config = 0<br />
tx_data_mode = 0<br />
rx_data_mode = 0<br />
</pre><br />
<br />
:'''if you i2s2 is used'''<br />
<pre><br />
[snddaudo2]<br />
snddaudio2_used = 1<br />
<br />
[daudio2]<br />
daudio2_used = 1<br />
daudio_master = 4<br />
audio_format = 1<br />
signal_inversion = 1<br />
slot_width_select = 32<br />
pcm_lrck_period = 32<br />
msb_lsb_first = 0<br />
sign_extend = 0<br />
frametype = 0<br />
mclk_div = 0<br />
tdm_config = 1<br />
tx_data_mode = 0<br />
rx_data_mode = 0<br />
</pre><br />
*make sure CONFIG_SND_SUNXI_SOC_SUNXI_DAUDIO configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_SND_SUNXI_SOC_SUNXI_DAUDIO = y<br />
</pre><br />
<br />
=== Application Demo ===<br />
The application demos powered by Lindenis.<b>[http://files.lindeni.org/lindenis-v536/Demo/ Click here to download the demos]</b><br />
<br />
===== Lindlive =====<br />
lindlive is a high performance low latency live streaming library.<br />
lindlive integrate some useful function modules, such as audio/video capture, encoding and streaming protocol.<br />
So developers can easily implement a live streaming server based on lindenis board.<br />
<br />
There are two samples app using lindlive, one is sample_mppsrc_2_livesink and the other is sample_mppsrc_2_ffsink.<br />
The sample source code is located in SDK.<br />
<br />
!!! It is strongly recommended to use lindplayer with '-live' as the client of the lindlive.<br />
It will be lower latency.<br />
<br />
usage:<br />
sample_mppsrc_2_livesink -i [ip] -p [port] -n [name]<br />
-i [ip] is the ip address of the server. If it is not set, the 'ip' default is local ethernet or wifi ip address.<br />
-p [port] is the port of the server. If it is not set, the 'port' default is rtsp port 8554.<br />
-n [name] is the name of live streaming. If it is not set, the 'name' default is 'live'.<br />
All of the arguments are optional.<br />
If sample_mppsrc_2_livesink is correctly running, the server url is 'rtsp://[ip]:[port]/[name]'<br />
Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.<br />
<br />
sample_mppsrc_2_ffsink -t [type] -u [url]<br />
-t [type]: the muxer type, can be 'mpegts/mp4/rtp/rtp_mpegts/rtsp/rtmp'<br />
-u [url] : sink to url, like: '/tmp/out.mp4' or 'rtp://192.168.1.100:12345'<br />
Example 1: sink as a live streaming.<br />
sample_mppsrc_2_ffsink -t rtp_mpegts -u rtp://192.168.3.118:12345<br />
sample_mppsrc_2_ffsink -t rtp -u rtp://192.168.3.118:12342/test<br />
Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.<br />
Example 2: save as a local file.<br />
sample_mppsrc_2_ffsink -t mp4 -u /tmp/out.mp4<br />
sample_mppsrc_2_ffsink -t mpegts -u /tmp/out.ts<br />
<br />
===== Lindplayer =====<br />
lindplayer is a high performance media player that can run on lindenis board. <br />
It supports upto 4K@30fps H.264/H.265 video decoder.<br />
It can play a local media file or a media stream from internet.<br />
<br />
usage:<br />
lindplayer -u [url] <options><br />
-u [url] is the media path to be played.<br />
<options> use -live to indicate this is a live streaming.<br />
such as:<br />
lindplayer -u ./movie.ts<br />
or lindplayer -u http://192.168.1.102/test<br />
or lindplayer -u rtsp://192.168.1.102/test -live<br />
<br />
===== Lindcamera =====</div>Michaelhttp://wiki.lindeni.org/index.php?title=Lindenis_V536&diff=774Lindenis V5362020-02-20T14:19:49Z<p>Michael: /* Camera */</p>
<hr />
<div>== Key Features ==<br />
=== Processor core ===<br />
*Dual-Core Cortex A7@1.2GHz<br />
*Neon acceleration, integrated FPU<br />
<br />
=== Video Encoding/Decoding Performance ===<br />
*H.264 BP/MP/HP, H.265 Main Profile encoding<br />
*I/P/Dual P frame H.264/H.265 encoding<br />
*MJPEG/JPEG baseline encoding<br />
*Real-time multi-stream H.264/H.265 encoding capability:<br />
**- 3840x2160@30fps+720p@30fps encoding<br />
**- 3840x2160@30fps decoding<br />
*Maximum 8192x8192 resolution for JPEG encoding/decoding<br />
*CBR, VBR modes<br />
*Encoding of eight ROIs<br />
<br />
=== Graphics Processing ===<br />
*Supports Lens distortion correction, fisheye and wide angle correction<br />
*Supports 90°、180°、270° picture rotation<br />
<br />
=== Professional Image Effects ===<br />
*Maximum performance is 4224x3168@30fps<br />
*Adjustable 3A functions (AE, AWB and AF)<br />
*Supports 2F WDR and Local Tone mapping,supporting highlight suppression and backlight compensation<br />
*Supports bad pixel correction, Lens shading correction<br />
*Supports multi-level 3D denoising, remove motion smear and color noise<br />
*Supports color adjustment, color enhancement<br />
*Supports image dynamic contrast enhance and sharpness enhance<br />
*Supports 4 channels of scaling output from 1/8x to 1x<br />
*OSD overlaying of eight regions before encoding<br />
*Supports image mirroring and flipping<br />
<br />
=== Various interfaces ===<br />
*Supports MIPI-CSI2\HiSPi\Sub-LVDS<br />
*Supports BT1120 input/output<br />
*Supports Line-in/Line-out<br />
*Supports Dual-channel differential MIC inputs <br />
*Supports WiFi 802.11ac / BT4.2 (option)<br />
<br />
=== Software Support ===<br />
*Linux-4.9<br />
<br />
== Target Applications ==<br />
*SDV<br />
*Smart IPC<br />
*Smart Camera<br />
Or you can use it to build:<br />
*A computer<br />
*A streaming server<br />
<br />
== Accessories Step-by-Step Guides ==<br />
<br />
=== Power Supply ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/Power-Supply-Brief.pdf 5V 2A Power Supply]<br />
<br />
=== HDMI Cable ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/HDMI-Cable-Brief.pdf 4K HDMI Cable]<br />
<br />
=== Camera module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/Camera-Module-Brief.pdf 4K Camera Module brief]<br />
<br />
=== LCD ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/LCD-with-CTP-Brief.pdf 5" 720P LCD with CTP brief]<br />
<br />
=== Flash module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/eMMC-Module-Brief.pdf 8GB eMMC Module brief]<br />
<br />
=== WiFi and Bluetooth module ===<br />
<br />
* [http://files.lindeni.org/lindenis-v5/accessories/WiFi-Module-Brief.pdf WiFi 802.11ac / BT4.2 Module brief]<br />
<br />
== Hardware Specification ==<br />
<br />
=== Board Features ===<br />
<br />
==== Video Out ====<br />
<br />
* HDMI 1.4 Type A, up to 4K@30FPS<br />
* MIPI-DSI, 4 lanes, up to 1080P<br />
* LCD interface<br />
<br />
==== Video In ====<br />
<br />
* 1 x MIPI-CSI2 - Camera interface, 4 lanes per channel<br />
<br />
==== Audio ====<br />
* 3.5mm Line in / out<br />
* 1 x mic<br />
* 1 x dmic<br />
<br />
==== Network ====<br />
* 10/100/1000Mbps Ethernet<br />
* WiFi with Bluetooth (optional)<br />
<br />
==== Storage ====<br />
* MicroSD Card bootable, support SDHC and SDXC, storage up to 256GB<br />
<br />
==== Expansion Ports ====<br />
* Board to Board connector - Flash module interface<br />
* Wi-Fi/BT Module Header - SDIO 3.0 and UART, pitch 2.0mm<br />
* 2x10 pins "Power Supply" GPIO Header: vbat, aldo1, bldo1, aldo3<br />
* 4 pins GPIO Header: TWI1<br />
* 2x7 pins "I2S" GPIO Header<br />
* 3 pins GPIO Header: PH4, PH10, GND<br />
* 3 pins GPIO Header: 1xADC<br />
* 4 pins GPIO Header: S-TWI<br />
* VBAT: Battery connector<br />
* Storage: Bootable MicroSD card<br />
* Video out: HDMI 1.4, 4 lanes MIPI-DSI<br />
* Video in: 1 x DVP<br />
* Audio: 3.5mm Line in / out, 1 x mic<br />
* Network: 10/100/1000Mbps Ethernet<br />
* USB: 1 x Micro USB, 2 x USB 2.0<br />
<br />
=== Board Information ===<br />
* Board Dimensions: 130mm x 85mm<br />
* Input Power: 5V@2A micro USB connector, 3.7V Li-Ion battery connector<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SOM_Schematic.pdf Lindenis V536 SOM Schematic]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SOM_PCB_Location_Map.pdf Lindenis V536 SOM PCB Place Map]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_Full_Function_Board_Schematic.pdf Lindenis V536 SBC Full-Function Board Schematic]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_SBC_mulit-function_pins_guide.pdf Lindenis V536 SBC mulit-function pins guide] | [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_开发板管脚复用说明.pdf 中文]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/Lindenis_V536_Full_Function_Board_PCB_Location_Map.pdf Lindenis V536 SBC Full-Function Board PCB Place Map]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/Schematic_and_PCB/src Lindenis V536 SBC Full-Function Board PCB Source Files]<br />
** [https://pan.baidu.com/s/1jiMNIYvwvm3Y6gUuFZxKxg Clik here to get the documents package in Baidu NetDisk(access code:5i5k)]<br />
<br />
== Datasheet ==<br />
* Allwinner V536 SOC Brief [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V536-Chinese-Brief.pdf 中文] | [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V536-English-Brief.pdf English]<br />
* [http://files.lindeni.org/lindenis-v536/Documents/SOC_brief_and_spec/V5x6_Professional_Camera_SoC_Datasheet_V1.2.pdf Allwinner V536 SOC datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/OP03-JS1158%20FORESEE_eMMC_NCEMASD9-08G%20SPEC%20A0%2020150701.pdf Foresee eMMC Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/AP6255%20IND%20datasheet_V1.1_12042017.pdf AP6255 Module Spec Sheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/RTL8211F-CG-RealtekMicroelectronics.pdf Ethernet PHY Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/LX50HDI4002-V0.pdf LCD Module Specification]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/GT911%20Capacitive%20Touch%20Controller%20Datasheet.pdf GOODiX GT911 5-Point Capacitive Touch Controller Datasheet]<br />
* [http://files.lindeni.org/lindenis-v5/datasheets/GL850G%20Datasheet_128.pdf USB 2.0 Hub Controller]<br />
<br />
== SDK ==<br />
<br />
=== Overview ===<br />
<br />
==== Features ====<br />
*Linux kernel 4.9 (official version)<br />
* U-Boot 2014.07<br />
* ARM GCC based cross toolchain<br />
* Integrated build system<br />
<br />
==== Main Components ====<br />
==== Layout ====<br />
<pre><br />
├── build<br />
├── config<br />
├── Config.in<br />
├── dl<br />
├── lichee<br />
├── logs<br />
├── Makefile<br />
├── package<br />
├── prebuilt<br />
├── rules.mk<br />
├── scripts<br />
├── softwinner<br />
├── target<br />
├── toolchain<br />
└── tools<br />
</pre><br />
<br />
=== Download and Build ===<br />
==== Prebuilt Image ====<br />
For fast begin, you can download the [[http://files.lindeni.org/lindenis-v536/Images prebuilt image] here.<br><br />
[https://pan.baidu.com/s/1WZ1uSpZPoVP2e4P8xXkbbA 国内开发者请在此下载]提取码:4p3h <br />
<br />
==== System requirements ====<br />
Listed below are the recommended requirements for downloading and building the SDK:<br />
* CPU: x86_64 or better family processor<br />
* Memory: 8GB or higher<br />
* Disk: 20GB free hard disk space, if you build it in a Virtual machine, I recommand you allocate a 30G virtual hard disk.<br />
** The Whole SDK is about 15G.<br />
* OS: Ubuntu 14.04 (tested) or higher<br />
* Network: internet connection<br />
<br />
==== Lazy Start ====<br />
Here are VMware station 14 image files which include the whole compiled SDK. And the SDK remote repositoreies are on gitee (not github).<br />
<br><br />
<b>[https://pan.baidu.com/s/1y-bSgRf87lp_qjJgeVPe5w Click here to get it]</b> (access code: tq4x)<br />
<br><br />
The password of the Ubuntu 14.04 in the VMware is "lindenis". Enjoy it !<br />
<br />
==== Linux host setup ====<br />
<br />
Ubuntu 14.04<br />
<br />
''HINT: later version should also work.''<br />
<br />
'''Install prerequisites'''<br />
<br />
<pre><br />
$ sudo apt-get update<br />
$ sudo apt-get install build-essential libncurses5-dev zlib1g-dev gawk git git-core ccache gettext libssl-dev xsltproc gperf subversion <br />
$ sudo dpkg --add-architecture i386<br />
$ sudo apt-get update<br />
$ sudo apt-get install lib32z1 lib32ncurses5 libc6:i386 libstdc++6:i386<br />
</pre><br />
<br />
'''Sudo without password'''<br />
<br />
<pre><br />
$ sudo visudo<br />
</pre><br />
<br />
Add this line at the end (change “tom” to your username):<br />
<pre>tom ALL=(ALL) NOPASSWD: ALL</pre><br />
Ctrl-X to leave, save your changes, and you're done!<br />
<br />
==== Downloading ====<br />
The SDK is available on [https://github.com/lindenis-org github]. For Chinese developer, it is available on [https://search.gitee.com/?skin=rec&type=repository&q=lindenis gitee] too.<br />
<br />
We use Repo manage Git repositories. Clone Repo from [https://android.googlesource.com/tools/repo android Git repositories] or other mirrors and install it.<br />
<br>Chinese developers can install Repo follow these steps:<br />
<pre><br />
$ git clone http://mirrors.ustc.edu.cn/aosp/git-repo.git ~/.bin/repo<br />
$ echo "export PATH=~/.bin/repo:$PATH" >> ~/.bashrc<br />
$ source ~/.bashrc<br />
</pre><br />
<br />
Becase there are some big files in the SDK, please run the following command before you start the downloading.<br />
<pre><br />
$ git config --global http.postBuffer 524288000<br />
</pre> <br />
Then run this to check:<br />
<pre><br />
$ git config --list<br />
</pre> <br />
<br />
For Lindenis V536 SBC, download the SDK on Github via:(此为github的下载方式,国内下载较慢,请使用国内源的方式下载,见下文)<br />
<pre><br />
$ mkdir lindenis-v536<br />
$ cd lindenis-v536<br />
$ repo init -u https://github.com/lindenis-org/manifest.git -b v536 -m lindenis-v536.xml<br />
$ repo sync<br />
</pre><br />
<br />
We recommend the Chinese developer download the SDK source code on gitee via:<br />
<br><br />
国内的开发者我们推荐使用国内的源来进行源代码下载:<br />
<pre><br />
$ mkdir lindenis-v536<br />
$ cd lindenis-v536<br />
$ repo init -u https://gitee.com/lindenis/manifest.git -b master -m lindenis-v536.xml<br />
$ repo sync<br />
</pre><br />
<br />
And then download these two files from Baidu NetDisk, and then copy them into the target directory follow below steps:<br />
<br><br />
下载源码后,请在百度云上把相关的依赖包下载下来,并按照以下方式放入指定SDK目录中:<br />
<br><br />
[https://pan.baidu.com/s/191Acv_sH-0ncrnagZ8ksQw dl.tar.gz] (提取码: 575x)<br />
<pre><br />
$ cp dl.tar.gz lindenis-v536<br />
$ tar xzvf dl.tar.gz dl/<br />
</pre><br />
<br />
[https://pan.baidu.com/s/1kdbc8LbxPxlQLj-ZQU_Gqg libs.tar.xz] (提取码: ljvj)<br />
<pre><br />
$ cp libs.tar.xz lindenis-v536/package/cortana/cortana-sdk<br />
</pre><br />
<br />
The Download time depends on your network connection speed. After finish the download, you should get below directories and files:<br />
<pre><br />
build config Config.in device dl lichee Makefile package prebuilt rules.mk scripts softwinner target toolchain tools<br />
</pre><br />
<br />
Start a branch for local workspace:<br />
<pre><br />
$ repo start lindenis-v536 --all<br />
</pre><br />
<br />
==== Building ====<br />
===== Setup env =====<br />
*For Lindenis V536 SBC:<br />
<pre><br />
$ source build/envsetup.sh<br />
</pre><br />
<br />
<pre><br />
$ lunch<br />
</pre><br />
<br />
Then you will see the follwing menu, and enter the number to select the target case, and enter:<br />
<pre><br />
You're building on Linux<br />
<br />
Lunch menu... pick a combo:<br />
1. v536_Lindenis_SBC-tina<br />
<br />
Which would you like? [Default v536_Lindenis_SBC]:1<br />
</pre><br />
<br />
===== Build source =====<br />
* Build kernel and rootfs<br />
If you are the first time downloaded the SDK and have not built the SDK before, run the below two commands, then exit and save the configuration at first.<br />
<pre><br />
$ make menuconfig<br />
</pre><br />
<pre><br />
$ make kernel_menuconfig<br />
</pre><br />
Then make it and wait ...<br />
<pre><br />
$ make -j8 V=s<br />
</pre><br />
<br />
===== Build image =====<br />
<pre><br />
$ pack<br />
</pre><br />
<br />
==== Installation ====<br />
'''[http://files.lindeni.org/lindenis-v536/Tools/PhoenixSuit.7z PhoenixSuit]'''<br />
* Download the PhoenixSuit.7z and extract to a local folder (note: Windows only).<br />
* Open the PhoenixSuit.exe.<br />
[[File:PSM.JPG|500px]]<br />
* Click the "firmware" button.<br />
[[File:Firmware.png|500px]]<br />
* Click the "image" button to select the image file.<br />
[[File:selectImage.png|500px]]<br />
* Now the PC tool is ready. Just '''keep pressing''' the "fel" key on the SBC.<br />
[[File:FELKEY.jpg|500px]]<br />
* After connected the SBC to PC via a USB cable, release the key, and the PhoenixSuit will enter the burn model.<br />
[[File:BurnModel.JPG|500px]]<br />
* If you want to keep the user data, please click "No". Click "Yes" will clean all datas in eMMC.Then will begin to download the image into eMMC.<br />
* If you can not start to download, just plug-out the USB cable and try again.<br />
[[File:download.JPG|500px]]<br />
* Wait until it finish downloading.<br />
[[File:Ok.JPG|500px]]<br />
<br />
== OS ==<br />
=== Overview ===<br />
Lindenis Video OS is the recommended operating system for normal use on Lindenis V536 series boards. Lindenis Video OS is maintained by [http://www.lindeni.com/ Lindenis Tech. Ltd.]. The SDK is hosted on [https://github.com/lindenis-org GitHub].<br />
===== Applications =====<br />
[[File:LindenisVideoOS.png|500px|thumb|Lindenis Video OS Architecture]]<br />
* Lindlive: a low-laternce A/V streaming application powered by Lindenis.<br />
* Lindplayer: a meida player application powered Lindenis.<br />
* Lindcamera: a camera application (supported preview, snapshot and recording) powered by Lindenis. <br />
* ... ...<br />
<br />
===== Framewrok =====<br />
<br />
* FFindeni: a multimedia framework specialized for low-latency A/V processing built by Lindenis. <br />
* CedarX: a Allwinner official multimedia decoding framework.<br />
* [http://www.minigui.org/ MiniGUI]: a tiny and efficiency open source GUI framework.<br />
* ... ...<br />
<br />
===== Libraries =====<br />
<br />
* Runtime Libraries: the system basic libraries like libc and so on.<br />
* Libavwrapper: a Lindenis-built library abstracted the hardware operation of the A/V processing.<br />
* [http://ffmpeg.org/ FFmpeg]: an open source software library for recording, converting and streaming audio and video.<br />
* [http://live555.com/ Live555]: an open source software library for streaming audio and video.<br />
* ... ...<br />
<br />
===== Linux Kernel =====<br />
<br />
* Official version: 4.9<br />
<br />
=== Reference Documents ===<br />
[http://files.lindeni.org/lindenis-v536/Documents/AW Allwinner Official Reference Documents]<br />
<br />
=== System Setup ===<br />
<br />
===== Uart =====<br />
* By default, the ttyS3 is assigned to the Linux console. The UART transmit pin called "TX" and receive pin called "RX" are in the J12 pin group, whose label is DEBUG. And the bit rate is 115200 bps.See below red rectangle.<br />
[[File:UART.jpg|500px]]<br />
<br />
===== Camera =====<br />
The camera supports the imx317 module as default. If you need to change to imx307, you can follow the steps below:<br />
*1.modify device/config/chips/v536/configs/Lindenis_SBC/sys_config.fex<br />
find this:<br />
sensor0_mname = "imx317_mipi"<br />
change to:<br />
sensor0_mname = "imx307_mipi"<br />
<br />
*2. make menuconfig selection<br />
Allwinner ---><br />
eyesee-mpp ---><br />
-*-eyesee-mpp-middleware ............... eyesee-mpp-middleware for Tina Linux<br />
select sensor (use sensor imx307) ---><br />
() use sensor imx317<br />
(X) use sensor imx307<br />
() use sensor imx278<br />
() use sensor imx258<br />
() use sensor imx386<br />
() use sensor sc2232<br />
*3. do "make" and then flash the firmware.<br />
<br />
===== ISP Tuning =====<br />
<br />
'''Allwinner V536 [http://files.lindeni.org/lindenis-v536/Tools/ISP_Tools ISP Tuning Tool]''' | [https://pan.baidu.com/s/1Fpd9cQYXshiDqKzZEw4e6A 国内]提取码:c0u8<br />
* Download the HawkviewTools-V3.0.2.7z and extract to a local folder (note: Windows only).<br />
* Download the awTuningApp, push it into the board through ADB or SSH and then run it. <br />
* Please refer to the documents in '''docs''' folder for usage.<br />
<br />
===== Display =====<br />
* Because of the limitation that there is one display engine module in V536, Lindenis-V536 SBC can not support dual-display.<br />
<br />
* The default display device of the SDK and the prebuilt image is HDMI(1080p).<br />
<br />
* If you have download the prebuilt image, and burn it into eMMC, you can switch the display device follow these steps:<br />
<br />
'''Connect serial to control the board'''<br />
<br />
* Firstly, you should connect the SBC debug UART to computer via a serial-USB cable so that you can send commands to the board through a PC serial software like Putty.<br />
<br />
* After you connected successfully, you will see the log show on the PC serial software like this:<br />
<br />
[[File:SBC_BOOT.JPG|frameless]]<br />
<br />
'''Enter U-boot command mode'''<br />
<br />
* Power on and press any keyboard key within 1s when you see the message below, then you can enter u-boot command mode.<br />
<br />
* Under this mode, you can modify the kernel devices tree by FDT tools in u-boot.<br />
<br />
[[File:EnterKey.jpg|frameless]]<br />
<br />
'''Change display device configuration with FDT tool'''<br />
<br />
* Input the follow command to switch display device between LCD and HDMI (1080p):<br />
<br />
'''LCD:'''<br />
<pre><br />
fdt set disp screen0_output_type <0x01>;<br />
fdt set disp screen0_output_mode <0x04>;<br />
fdt save;<br />
reset;<br />
</pre><br />
<br />
'''HDMI (1080p):'''<br />
<br />
<pre><br />
fdt set disp screen0_output_type <0x03>;<br />
fdt set disp screen0_output_mode <0x0a>;<br />
fdt save;<br />
reset;<br />
</pre><br />
* You can also select different display device via configuration in sys_config.fex<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;disp init configuration<br />
;<br />
;disp_mode (0:screen0<screen0,fb0>)<br />
;screenx_output_type (0:none; 1:lcd; 2:tv; 3:hdmi;5:vdpo)<br />
;screenx_output_mode (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)<br />
; (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)<br />
;----------------------------------------------------------------------------------<br />
[disp]<br />
disp_init_enable = 1<br />
disp_mode = 0<br />
<br />
screen0_output_type = 3<br />
screen0_output_mode = 10<br />
<br />
</pre><br />
<br />
===== TouchPanel =====<br />
* After you connected the CTP panel to the board, insmod its driver like this:<br />
<pre><br />
insmod /lib/modules/4.9.118/gt9xx_ts.ko<br />
</pre><br />
* sys_config.fex should config as follow:<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;capacitor tp configuration<br />
;external int function<br />
;wakeup output function<br />
;notice --- tp_int_port & tp_io_port use the same port<br />
;----------------------------------------------------------------------------------<br />
[ctp]<br />
ctp_used = 1<br />
ctp_name = "gt911_1060"<br />
ctp_twi_id = 1<br />
ctp_twi_addr = 0x5d<br />
ctp_screen_max_x = 1280<br />
ctp_screen_max_y = 720<br />
ctp_revert_x_flag = 1<br />
ctp_revert_y_flag = 1<br />
ctp_exchange_x_y_flag = 0<br />
<br />
ctp_int_port = port:PL06<6><default><default><default><br />
ctp_wakeup = port:PL07<1><default><default><1><br />
</pre><br />
<br />
===== Wifi =====<br />
*sys_config.fex should config as follow:<br />
<pre><br />
[wlan]<br />
wlan_used = 1<br />
wlan_busnum = 1<br />
;wlan_usbnum = 3<br />
wlan_power = "vcc33-wifi"<br />
wlan_io_regulator = "vcc-pg"<br />
;wlan_en = port:PG11<1><default><default><0><br />
wlan_regon = port:PG11<1><default><default><0><br />
wlan_hostwake = port:PL05<6><default><default><0><br />
</pre><br />
*make sure CONFIG_BCMDHD is configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_BCMDHD = m<br />
</pre><br />
*make sure PACKAGE_ap6255-firmware is configured when make menuconfig<br />
<pre><br />
PACKAGE_ap6255-firmware = y<br />
</pre><br />
*insmod driver as follow:<br />
<pre><br />
insmod /lib/modules/4.9.118/bcmdhd.ko<br />
</pre><br />
*Then you can use ifconfig and wpa_supplicant tools connect network<br />
<br />
===== Bluetooth =====<br />
*sys_config.fex should config as follow:<br />
<pre><br />
[bt_para]<br />
bt_used = 1<br />
bt_power = "vcc33-wifi"<br />
bt_io_regulator = "vcc-pg"<br />
bt_rst_n = port:PG10<1><default><default><0><br />
</pre><br />
*You can take the follow shell cmd to start bt<br />
<pre><br />
echo 0 > /sys/class/rfkill/rfkill0/state<br />
sleep 2<br />
echo 1 > /sys/class/rfkill/rfkill0/state<br />
sleep 2<br />
brcm_patchram_plus --tosleep=200000 --no2bytes --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 \<br />
--baudrate 115200 --patchram /lib/firmware/BCM4345C0.hcd /dev/ttyS1 &<br />
</pre><br />
*When the bt device is started, you can use hciconfig tools to do someting you want<br />
*(if hciconfig is not install, you should add it when make menuconfig)<br />
<br />
===== Ethernet =====<br />
*sys_config.fex should configured as follow:<br />
<pre><br />
[gmac0]<br />
gmac0_used = 1<br />
phy-mode = "rgmii"<br />
gmac_rxd3 = port:PE00<3><default><default><default><br />
gmac_rxd2 = port:PE01<3><default><default><default><br />
gmac_rxd1 = port:PE02<3><default><default><default><br />
gmac_rxd0 = port:PE03<3><default><default><default><br />
gmac_rxck = port:PE04<3><default><default><default><br />
gmac_rxctl = port:PE05<3><default><default><default><br />
gmac_clkin = port:PE06<3><default><default><default><br />
gmac_txd3 = port:PE07<3><default><3><default><br />
gmac_txd2 = port:PE08<3><default><3><default><br />
gmac_txd1 = port:PE09<3><default><3><default><br />
gmac_txd0 = port:PE10<3><default><3><default><br />
gmac_txck = port:PE11<3><default><3><default><br />
gmac_txctl = port:PE12<3><default><3><default><br />
gmac_mdc = port:PE13<3><default><3><default><br />
gmac_mdio = port:PE14<3><default><3><default><br />
gmac_ephy25m = port:PE15<3><default><default><default><br />
phy-rst = port:PE21<1><default><default><0><br />
gmac-power0 = "vcc-ephy"<br />
gmac-power1 = ""<br />
gmac-power2 = ""<br />
tx-delay = 7<br />
rx-delay = 31<br />
use_ephy25m = 1<br />
</pre><br />
*make sure CONFIG_SUNXI_GMAC is configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_SUNXI_GMAC = y<br />
</pre><br />
<br />
===== Keypad =====<br />
* The Keypad on the board is an GPADC keypad. The GPADC driver detect the different voltage of the keys and report the key value to user space via Linux standard Input Subsystem.<br><br />
* Here is the parameters show in the sys_config.fex:<br />
<pre><br />
;----------------------------------------------------------------------------------<br />
;resistance gpadc configuration<br />
:gpadc_used : Enable the GPADC<br />
;channel_num: Maxinum number of channels supported on the platform.<br />
;channel_select: channel enable setection. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08<br />
;channel_data_select: channel data enable. channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_compare_select: compare function enable channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_cld_select: compare function low data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;channel_chd_select: compare function hig data enable setection: channel0:0x01 channel1:0x02 channel2:0x04 channel3:0x08.<br />
;----------------------------------------------------------------------------------<br />
[gpadc]<br />
gpadc_used = 1<br />
channel_num = 1<br />
channel_select = 0x01<br />
channel_data_select = 0<br />
channel_compare_select = 0x01<br />
channel_cld_select = 0x01<br />
channel_chd_select = 0x01<br />
channel0_compare_lowdata = 1700000<br />
channel0_compare_higdata = 1200000<br />
key_cnt = 5<br />
key0_vol = 116<br />
key0_val = 115<br />
key1_vol = 233<br />
key1_val = 114<br />
key2_vol = 357<br />
key2_val = 139<br />
key3_vol = 473<br />
key3_val = 28<br />
key4_vol = 586<br />
key4_val = 102<br />
</pre><br />
<br />
===== Audio =====<br />
====== audiocodec ======<br />
*sys_config.fex should configured as follow:<br />
<pre><br />
[sndcodec]<br />
sndcodec_used = 0x1<br />
<br />
[i2s]<br />
i2s_used = 0x1<br />
<br />
[codec]<br />
codec_used = 0x1<br />
lineoutvol = 0x1f<br />
maingain = 0x4<br />
headsetmicgain = 0x4<br />
adcagc_cfg = 0x0<br />
adcdrc_cfg = 0x0<br />
adchpf_cfg = 0x0<br />
dacdrc_cfg = 0x0<br />
dachpf_cfg = 0x0<br />
pa_ctl_level = 0x1<br />
pa_msleep_time = 0xa0<br />
gpio-spk = port:PH10<1><1><default><default><br />
</pre><br />
<br />
====== i2s ======<br />
*sys_config.fex should configured as follow, and the param should configured accord your device need:<br />
:'''if you i2s1 is used'''<br />
<pre><br />
[snddaudo0]<br />
snddaudio0_used = 1<br />
<br />
[daudio0]<br />
daudio0_used = 1<br />
daudio_master = 4<br />
audio_format = 4<br />
signal_inversion = 1<br />
slot_width_select = 32<br />
pcm_lrck_period = 128<br />
msb_lsb_first = 0<br />
sign_extend = 0<br />
frametype = 0<br />
mclk_div = 1<br />
tdm_config = 0<br />
tx_data_mode = 0<br />
rx_data_mode = 0<br />
</pre><br />
<br />
:'''if you i2s2 is used'''<br />
<pre><br />
[snddaudo2]<br />
snddaudio2_used = 1<br />
<br />
[daudio2]<br />
daudio2_used = 1<br />
daudio_master = 4<br />
audio_format = 1<br />
signal_inversion = 1<br />
slot_width_select = 32<br />
pcm_lrck_period = 32<br />
msb_lsb_first = 0<br />
sign_extend = 0<br />
frametype = 0<br />
mclk_div = 0<br />
tdm_config = 1<br />
tx_data_mode = 0<br />
rx_data_mode = 0<br />
</pre><br />
*make sure CONFIG_SND_SUNXI_SOC_SUNXI_DAUDIO configured when make kernel_menuconfig<br />
<pre><br />
CONFIG_SND_SUNXI_SOC_SUNXI_DAUDIO = y<br />
</pre><br />
<br />
=== Application Demo ===<br />
The application demos powered by Lindenis.<b>[http://files.lindeni.org/lindenis-v536/Demo/ Click here to download the demos]</b><br />
<br />
===== Lindlive =====<br />
lindlive is a high performance low latency live streaming library.<br />
lindlive integrate some useful function modules, such as audio/video capture, encoding and streaming protocol.<br />
So developers can easily implement a live streaming server based on lindenis board.<br />
<br />
There are two samples app using lindlive, one is sample_mppsrc_2_livesink and the other is sample_mppsrc_2_ffsink.<br />
The sample source code is located in SDK.<br />
<br />
!!! It is strongly recommended to use lindplayer with '-live' as the client of the lindlive.<br />
It will be lower latency.<br />
<br />
usage:<br />
sample_mppsrc_2_livesink -i [ip] -p [port] -n [name]<br />
-i [ip] is the ip address of the server. If it is not set, the 'ip' default is local ethernet or wifi ip address.<br />
-p [port] is the port of the server. If it is not set, the 'port' default is rtsp port 8554.<br />
-n [name] is the name of live streaming. If it is not set, the 'name' default is 'live'.<br />
All of the arguments are optional.<br />
If sample_mppsrc_2_livesink is correctly running, the server url is 'rtsp://[ip]:[port]/[name]'<br />
Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.<br />
<br />
sample_mppsrc_2_ffsink -t [type] -u [url]<br />
-t [type]: the muxer type, can be 'mpegts/mp4/rtp/rtp_mpegts/rtsp/rtmp'<br />
-u [url] : sink to url, like: '/tmp/out.mp4' or 'rtp://192.168.1.100:12345'<br />
Example 1: sink as a live streaming.<br />
sample_mppsrc_2_ffsink -t rtp_mpegts -u rtp://192.168.3.118:12345<br />
sample_mppsrc_2_ffsink -t rtp -u rtp://192.168.3.118:12342/test<br />
Then it can be played in an player with the url 'rtsp://[ip]:[port]/[name]'.<br />
Example 2: save as a local file.<br />
sample_mppsrc_2_ffsink -t mp4 -u /tmp/out.mp4<br />
sample_mppsrc_2_ffsink -t mpegts -u /tmp/out.ts<br />
<br />
===== Lindplayer =====<br />
lindplayer is a high performance media player that can run on lindenis board. <br />
It supports upto 4K@30fps H.264/H.265 video decoder.<br />
It can play a local media file or a media stream from internet.<br />
<br />
usage:<br />
lindplayer -u [url] <options><br />
-u [url] is the media path to be played.<br />
<options> use -live to indicate this is a live streaming.<br />
such as:<br />
lindplayer -u ./movie.ts<br />
or lindplayer -u http://192.168.1.102/test<br />
or lindplayer -u rtsp://192.168.1.102/test -live<br />
<br />
===== Lindcamera =====</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=522Linbian Usage Guide2019-01-31T12:36:59Z<p>Michael: /* OpenCV */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br><br><br />
OpenCV version 4.0.1<br><br />
This is a simple sample for motion detection via opencv. <br><br />
When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br><br />
Something is moving! mean_diff:70<br><br />
Something is moving! mean_diff:94<br><br />
Something is moving! mean_diff:120<br><br />
Something is moving! mean_diff:362<br><br />
Something is moving! mean_diff:34<br><br />
Something is moving! mean_diff:30<br><br />
<br />
==== Location ====<br />
sample_virvi2opencv2vo<br><br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=521Linbian Usage Guide2019-01-31T12:36:03Z<p>Michael: /* OpenCV */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
OpenCV version 4.0.1<br><br />
<br />
This is a simple sample for motion detection via opencv. <br><br />
When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br><br />
Something is moving! mean_diff:70<br><br />
Something is moving! mean_diff:94<br><br />
Something is moving! mean_diff:120<br><br />
Something is moving! mean_diff:362<br><br />
Something is moving! mean_diff:34<br><br />
Something is moving! mean_diff:30<br><br />
<br />
==== Location ====<br />
sample_virvi2opencv2vo<br><br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=520Linbian Usage Guide2019-01-31T12:34:46Z<p>Michael: /* OpenCV */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
This is a simple sample for motion detection via opencv. <br><br />
When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br><br />
Something is moving! mean_diff:70<br><br />
Something is moving! mean_diff:94<br><br />
Something is moving! mean_diff:120<br><br />
Something is moving! mean_diff:362<br><br />
Something is moving! mean_diff:34<br><br />
Something is moving! mean_diff:30<br><br />
<br />
==== Location ====<br />
sample_virvi2opencv2vo<br><br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=519Linbian Usage Guide2019-01-31T12:33:11Z<p>Michael: /* OpenCV */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
==== Location ====<br />
sample_virvi2opencv2vo<br><br><br />
This is a simple sample for motion detection via opencv. <br><br />
When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br><br />
Something is moving! mean_diff:70<br><br />
Something is moving! mean_diff:94<br><br />
Something is moving! mean_diff:120<br><br />
Something is moving! mean_diff:362<br><br />
Something is moving! mean_diff:34<br><br />
Something is moving! mean_diff:30<br><br />
<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=518Linbian Usage Guide2019-01-31T12:31:45Z<p>Michael: /* Demo programs */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br><br><br />
This is a simple sample for motion detection via opencv. <br><br />
When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br><br />
Something is moving! mean_diff:70<br><br />
Something is moving! mean_diff:94<br><br />
Something is moving! mean_diff:120<br><br />
Something is moving! mean_diff:362<br><br />
Something is moving! mean_diff:34<br><br />
Something is moving! mean_diff:30<br><br />
<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=517Linbian Usage Guide2019-01-31T12:30:47Z<p>Michael: /* Building */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br><br><br />
This is a simple sample for motion detection via opencv. <br><br />
When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br><br />
Something is moving! mean_diff:70<br><br />
Something is moving! mean_diff:94<br><br />
Something is moving! mean_diff:120<br><br />
Something is moving! mean_diff:362<br><br />
Something is moving! mean_diff:34<br><br />
Something is moving! mean_diff:30<br><br />
<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=516Linbian Usage Guide2019-01-31T12:30:33Z<p>Michael: /* Building */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Build ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br><br><br />
This is a simple sample for motion detection via opencv. <br><br />
When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br><br />
Something is moving! mean_diff:70<br><br />
Something is moving! mean_diff:94<br><br />
Something is moving! mean_diff:120<br><br />
Something is moving! mean_diff:362<br><br />
Something is moving! mean_diff:34<br><br />
Something is moving! mean_diff:30<br><br />
<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=515Linbian Usage Guide2019-01-31T12:28:27Z<p>Michael: /* OpenCV */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br><br><br />
This is a simple sample for motion detection via opencv. <br><br />
When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br><br />
Something is moving! mean_diff:70<br><br />
Something is moving! mean_diff:94<br><br />
Something is moving! mean_diff:120<br><br />
Something is moving! mean_diff:362<br><br />
Something is moving! mean_diff:34<br><br />
Something is moving! mean_diff:30<br><br />
<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=514Linbian Usage Guide2019-01-31T12:27:37Z<p>Michael: /* OpenCV */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br><br />
This is a simple sample for motion detection via opencv. <br><br />
When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br><br />
Something is moving! mean_diff:70<br><br />
Something is moving! mean_diff:94<br><br />
Something is moving! mean_diff:120<br><br />
Something is moving! mean_diff:362<br><br />
Something is moving! mean_diff:34<br><br />
Something is moving! mean_diff:30<br><br />
<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=513Linbian Usage Guide2019-01-31T12:25:55Z<p>Michael: /* OpenCV */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br />
This is a simple sample for motion detection via opencv. When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br />
<br />
Something is moving! mean_diff:70<br />
<br />
Something is moving! mean_diff:94<br />
<br />
Something is moving! mean_diff:120<br />
<br />
Something is moving! mean_diff:362<br />
<br />
Something is moving! mean_diff:34<br />
<br />
Something is moving! mean_diff:30<br />
<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=512Linbian Usage Guide2019-01-31T12:24:39Z<p>Michael: /* Test result */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br />
This is a simple sample for motion detection via opencv. When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br />
Something is moving! mean_diff:70<br />
Something is moving! mean_diff:94<br />
Something is moving! mean_diff:120<br />
Something is moving! mean_diff:362<br />
Something is moving! mean_diff:34<br />
Something is moving! mean_diff:30<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====<br />
[[File:Black Screen.jpg|thumb|left]]<br />
[[File:Something is moving.jpg|thumb|left]]</div>Michaelhttp://wiki.lindeni.org/index.php?title=File:Something_is_moving.jpg&diff=511File:Something is moving.jpg2019-01-31T12:24:20Z<p>Michael: </p>
<hr />
<div>Something is moving</div>Michaelhttp://wiki.lindeni.org/index.php?title=File:Black_Screen.jpg&diff=510File:Black Screen.jpg2019-01-31T12:23:33Z<p>Michael: </p>
<hr />
<div>Black Screen</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=509Linbian Usage Guide2019-01-31T12:22:12Z<p>Michael: /* OpenCV */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br />
This is a simple sample for motion detection via opencv. When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br />
Something is moving! mean_diff:70<br />
Something is moving! mean_diff:94<br />
Something is moving! mean_diff:120<br />
Something is moving! mean_diff:362<br />
Something is moving! mean_diff:34<br />
Something is moving! mean_diff:30<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=508Linbian Usage Guide2019-01-31T12:21:43Z<p>Michael: /* OpenCV */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
=== OpenCV ===<br />
<br />
sample_virvi2opencv2vo<br />
This is a simple sample for motion detection via opencv. When running this sample, if the picture captured by the camera is still, it will be black screen. If there is a moving object, the outline of the moving object will be displayed. When the mean difference of the real-time image frame difference is greater than the sensitivity value, the following printing appears, indicating that there is a significant change in the image or something is moving.<br />
<br />
Something is moving! mean_diff:10<br />
Something is moving! mean_diff:70<br />
Something is moving! mean_diff:94<br />
Something is moving! mean_diff:120<br />
Something is moving! mean_diff:362<br />
Something is moving! mean_diff:34<br />
Something is moving! mean_diff:30<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2opencv2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2opencv2vo -path ./sample_virvi2opencv2vo.conf<br />
</pre><br />
<br />
You can change the conf in the sample_virvi2opencv2vo.conf<br />
# auto_test_count : test times<br />
# get_frame_count : number of frame in one time test<br />
# dev number: video node<br />
# src_width * src_height:720p/1080p;<br />
# src_frame_rate: 25<br />
# pic_format is nv21<br />
# enable_disp_color: 0 disable, 1 enable<br />
# moving_detect_sensitivity >=1 , 1 is most sensitive<br />
<br />
==== Test result ====</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=507Linbian Usage Guide2019-01-31T12:08:47Z<p>Michael: /* Demo programs */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== Camera Module ==<br />
===download source code from github===<br />
*ldcam developed base on gstreamer<br />
:git clone https://github.com/lindenis-org/ldcam-gst.git<br />
===compile===<br />
*compile on v5 board===<br />
::you can execute "make" directly<br />
*compile on your own env<br />
::you should create the Makefile by yourself <br />
===user commd===<br />
:you can use "./ldcam -?" or "./ldcam --help" to get the cmd instructions<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== MPP ==<br />
<br />
MPP is the media process platform of Allwinner V5, including following components.<br />
* system control, API family: AW_MPI_SYS<br />
: This component deal with the media hardware initialization, other components initialization and component state management and etc.<br />
* video input, API family: AW_MPI_VI<br />
* video output, API family: AW_MPI_VO<br />
* image stitch engine, API family: AW_MPI_ISE<br />
* video encode, API family: AW_MPI_VENC<br />
* video decode, API family: AW_MPI_VDEC<br />
* mux, API family: AW_MPI_MUX<br />
* demux, API family: AW_MPI_DEMUX<br />
* audio input, API family: AW_MPI_AI<br />
* audio output, API family: AW_MPI_AO<br />
* audio endode, API family: AW_MPI_AENC<br />
* audio output, API family: AW_MPI_AOUT<br />
* Region, API family: AW_MPI_RGN<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Demo programs ==<br />
<br />
Allwinner release a series of MPP samples. You can download from [https://github.com/lindenis-org/mpp_sample Github].<br />
<pre><br />
$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample<br />
</pre><br />
<br />
After downloading, You will get the following directory.<br />
<pre><br />
app/<br />
Makefile.param<br />
README.md<br />
sample_adec/<br />
sample_aenc/<br />
sample_ai/<br />
......<br />
</pre><br />
'''There is a instruction name readme.txt in every sample, you should read the document first when you running the sample'''<br />
<br />
'''And then you can know how to config the sample, some sample needed be configured,maybe config file is sample_xxx.conf.'''<br />
<br />
'''app/''' includes a set of MPP samples with a command line based menu. '''sample_xxx/''' is a separate sample of the scene. Root privileges is required when run these sample. e.g.<br />
<pre><br />
$ sudo ./app/release/app_mpp_sample<br />
<br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num:<br />
</pre><br />
<br />
=== RTSP ===<br />
<br />
==== Location ====<br />
<br />
app_mpp_sample<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/app<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./release/app_mpp_sample<br />
</pre><br />
There will shows the following message when you execultive the cmd, and type the num according the menu.<br />
<pre><br />
***************************************************************<br />
1 : vi+(venc+rtsp)+vo<br />
2 : vi+(venc+rtsp)<br />
3 : vi+vo<br />
4 : vi+ise+(venc+rtsp)+vo<br />
5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp<br />
6 : vi->yuv+venc+rtsp<br />
7 : vi+venc+mux<br />
8 : vi+(venc+mux)+vo<br />
9 : demux+vdec+vo<br />
10 : ai+aenc+mux+ao<br />
11 : demux+adec+ao<br />
12 : Quit<br />
***************************************************************<br />
Please choice 1~12 num: 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 1<br />
<br />
***************** Choice VI+VENC scene **************************<br />
[0]:VI_4K@30fps + VENC(4K@30fps+VGA@30fps)<br />
[1]:VI_4K@25fps + VENC(4K@25fps+720P@25fps) [default]<br />
[2]:VI_2K@30fps + VENC(2K@30fps+720P@30fps)<br />
[3]:VI_1080P@30fps + VENC(1080P@30fps+720P@30fps)<br />
[4]:VI_2880x2160@30fps + VENC(2880x2160@30fps+1080P@30fps)<br />
[5]:VI_2592x1944@30fps + VENC(2592x1944@30fps+1080P@30fps)<br />
Please choose VI+VENC scene ID 0~3 or (q-Quit): 1<br />
<br />
***************************************************************<br />
1 : Set VI+VENC scene (Resolution, default:4K@25fps+720P@25fps)<br />
2 : Set VENC Payload Type (H264/H265, default:H264)<br />
3 : Set VENC RC Mode (CBR/VBR/FIXQP, default:CBR)<br />
4 : Set VENC Profile (BL/MP/HP, default:Main Profile)<br />
5 : Set VENC rotate (0/90/180/270, default:rotate_0)<br />
6 : Save confige and run this sample<br />
***************************************************************<br />
Please choice 1~6 num: 6<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Rtsp1.jpg|frameless]]<br />
<br />
*You can see that the two remote device can get the data at the same time<br />
<br />
*There are two output data channel, you can get 720p from channel0 and 4K data from channel1<br />
<br />
*Tt also can be viewed by mobile phone, a simple IPC mode.<br />
<br />
=== Dual Camera ===<br />
<br />
==== Location ====<br />
<br />
sample_virvi2ise2vo<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_virvi2ise2vo<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_virvi2ise2vo -path sample_virvi2ise2vo.conf<br />
</pre><br />
<br />
==== Test result ====<br />
[[File:Dual camera.jpg|frameless]]<br />
<br />
*Two ISP can work at the same time<br />
<br />
*And each one can send 4K 30fps data out when you preview the picture<br />
<br />
*Device can support 4K 15fps encode when two ISP work at the same time<br />
<br />
=== Face detection ===<br />
<br />
Face detection based on EVE.<br />
<br />
==== Location ====<br />
<br />
sample_face_detect<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_face_detect<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_face_detect<br />
</pre><br />
<br />
The picture of face crop and store at '''./pic''' directory when detected.<br />
<br />
==== Test result ====<br />
[[File:Face detect.jpg|frameless]]<br />
<br />
*Support face detect which the data source minmum pixels is 20<br />
<br />
*Support face detection and tracing at the same time, the maximum number is 16<br />
<br />
*The maximum detect face number is 128<br />
<br />
=== Motion detection ===<br />
<br />
Motion detection based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2MOD<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD<br />
$ make <br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./DTCAResult.bin .<br />
<br />
=== Human counting ===<br />
<br />
Hunman counting based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2HCNT<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf<br />
</pre><br />
<br />
The information of detected target was stored at ./HCNTResult.bin .<br />
<br />
=== VLPR ===<br />
<br />
VLPR based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_vi2VLPR<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf<br />
</pre><br />
<br />
The information of detected vehicle license plate was stored at ./VLPRResult.bin .<br />
<br />
=== Binocular depth information image ===<br />
<br />
BDII based on CVE.<br />
<br />
==== Location ====<br />
<br />
sample_AILib/sample_BDII<br />
<br />
==== Building ====<br />
<br />
<pre><br />
$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII<br />
$ make<br />
</pre><br />
<br />
==== Running ====<br />
<br />
<pre><br />
$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf<br />
</pre><br />
<br />
The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .<br />
<br />
=== Image stitch ===<br />
<br />
Camera module is in development.<br />
<br />
=== OpenCV ===</div>Michaelhttp://wiki.lindeni.org/index.php?title=File:012315314190_0lindenis-v5-introduction-en-20190123_1.jpg&diff=480File:012315314190 0lindenis-v5-introduction-en-20190123 1.jpg2019-01-23T07:49:20Z<p>Michael: </p>
<hr />
<div>Lindenis V5 SBC P1</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=428Linbian Usage Guide2018-10-25T09:22:18Z<p>Michael: /* Camera source */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
On Linbian OS, the default terminal application is LXTerminal.<br />
<br />
[[File:Lxterminal.png|frameless]]<br />
<br />
You can open it from '''Application Menu''' -> '''System Tools'''.<br />
<br />
== MPP ==<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Camera Module ==<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Use for CSI Camera<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== Demo programs ==<br />
<br />
=== Face recognition ===<br />
<br />
=== Motion detection ===<br />
<br />
=== Human counting ===<br />
<br />
=== VLPR ===<br />
<br />
=== Image stitch ===<br />
<br />
=== Binocular DOF image ===<br />
<br />
=== Speech recognition ===</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=410Linbian Usage Guide2018-10-24T11:14:59Z<p>Michael: /* Gstreamer */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
== MPP ==<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Camera Module ==<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
=== Camera source ===<br />
*'''lindeniv4l2src: Video (video4linux2) Source'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24<br />
<br />
=== Omx hardware H.264 decoder and encoder ===<br />
*'''omxh264dec: OpenMAX H.264 Video Decoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink<br />
<br />
*'''omxh264videoenc: OpenMAX H.264 Video Encoder'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! omxh264videoenc target-bitrate=5000000 ! mpegtsmux ! filesink location=1.ts<br />
<br />
=== Display sink ===<br />
*'''sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices'''<br><br />
Example:<br><br />
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== Demo programs ==<br />
<br />
=== Face recognition ===<br />
<br />
=== Motion detection ===<br />
<br />
=== Human counting ===<br />
<br />
=== VLPR ===<br />
<br />
=== Image stitch ===<br />
<br />
=== Binocular DOF image ===<br />
<br />
=== Speech recognition ===</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Configuration&diff=406Linbian Configuration2018-10-24T08:58:04Z<p>Michael: /* Camera Config */</p>
<hr />
<div>[[zh:Linbain配置]]<br />
== linbian-config ==<br />
<br />
In development<br />
<br />
== UART configuration ==<br />
<br />
By default, the ttyS0 is assigned to the Linux console. The UART transmit and receive pins are on PB9 and PB10 espectively, which are pins 8 and 10 on the 'PI BUS' GPIO header. And the bit rate is 115200 bps.<br />
<br />
== Ethernet ==<br />
<br />
Ethernet is enabled by default. Plug in the network cable will automatically connect to the Internet.<br />
<br />
[https://launchpad.net/wicd Wicd] is used for manage wireless and wired interface.<br />
<br />
=== Running Wicd in Desktop Environment ===<br />
<br />
Open '''Wicd Network Manager''' from desktop. If the board is properly set up and connected, you should see a Window as follow.<br />
<br />
[[File:wicd-nm-wired.png|frameless]]<br />
<br />
=== Running Wicd in Text Mode ===<br />
<br />
Open a Terminal from desktop. Type '''wicd-curses''':<br />
<br />
[[File:wicd-curses.png|frameless]]<br />
<br />
Manage network by keyboard.<br />
<br />
== Wi-Fi ==<br />
<br />
=== Installing ===<br />
<br />
Lindenis V5 without builtin Wi-Fi. Follow [http://files.lindeni.org/lindenis-v5/accessories/Lindenis_V5_Wi-Fi_Bluetooth_Installation_Guide.pdf these instructions] and install a module.<br />
<br />
=== Add Service In Running Environment ===<br />
<br />
Add configure file wifi.conf in /etc/modules-load.d, and the context of the configure file is the driver name, for example :bcmdhd<br />
<br />
Reboot the system<br />
<br />
=== Configuration ===<br />
<br />
Manage Wi-Fi by Wicd (open '''Wicd Network Manager''' from desktop).<br />
<br />
[[File:wicd-nm-wireless.png|frameless]]<br />
<br />
Click '''Properties''' button to set access point password.<br />
<br />
[[File:wicd-nm-wireless-prop.png|frameless]]<br />
<br />
And then click '''Connect''' button to get access.<br />
<br />
[[File:wicd-nm-wireless-connected.png|frameless]]<br />
<br />
== Bluetooth ==<br />
Bluetooth firmware and service are not installed by default<br />
=== Add configure file ===<br />
add configure file bt in "device/eagle/rootfs/etc" of sdk or "/etc" in running environment, and the context as follow:<br />
#!/bin/bash<br />
#<br />
# Shell script to install Bluetooth firmware and attach BT part of<br />
#<br />
TTY="/dev/ttyS1"<br />
BT_POWER_MGR_PATH=/sys/class/rfkill/rfkill0<br />
BT_FW_PATH=/lib/firmware/rtl_bt<br />
test -d $BT_POWER_MGR_PATH || exit 1<br />
test -d $BT_FW_PATH || exit 1<br />
echo "Using device $TTY for initializing Bluetooth"<br />
#BT power initialize<br />
echo 0 > /sys/class/rfkill/rfkill0/state<br />
sleep 0.1<br />
echo 1 > /sys/class/rfkill/rfkill0/state<br />
brcm_patchram_plus --patchram /etc/firmware/BCM4345C0.hcd --no2bytes --tosleep 1000 $TTY<br />
hciattach $TTY any<br />
exit 0<br />
<br />
=== Add Service ===<br />
If you want to add service in running environment, you can use the following cmd:<br />
insserv /etc/init.d/bt<br />
If you want to add service in sdk, you should modify "debain/mk-rootfs-stretch.sh" as follow:<br />
<br />
diff --git a/mk-rootfs-stretch.sh b/mk-rootfs-stretch.sh<br />
index 75dd3ce..c46d605 100755<br />
--- a/mk-rootfs-stretch.sh<br />
+++ b/mk-rootfs-stretch.sh<br />
@@ -91,6 +91,10 @@ if insserv -s | grep mpp > /dev/null ; then<br />
insserv /etc/init.d/mpp<br />
fi<br />
+if insserv -s | grep bt > /dev/null ; then<br />
+insserv /etc/init.d/bt<br />
+fi<br />
+<br />
apt-get install -y bash-completion<br />
<br />
=== Manage Bt devices ===<br />
<br />
You can use some open source tools, such as blueman.<br />
<pre><br />
sudo apt-get install blueman<br />
</pre><br />
<br />
== Camera Config ==<br />
=== Sys_config.fex config ===<br />
<br />
See the 13 chapter page 37 to page 52 [http://files.lindeni.org/lindenis-v5/documents/guide/sys_config.fex%E4%BD%BF%E7%94%A8%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E.pdf sys_config guide]<br />
<br />
=== Kernel menuconfig ===<br />
<br />
Device Drivers ---> <br />
<*> Multimedia support ---> <br />
[*] V4L platform devices ---> <br />
[*] imx317 platform select ---> <br />
--- imx317 platform select <br />
[*] select IPC platform config otherwise SDV platform <br />
<M> imx317_mipi sensor driver <br />
<br />
the imx317 sensor driver code<br />
<br />
kernel/drivers/media/platform/sunxi-vin/modules/sensor/imx317_mipi.c<br />
<br />
if you want to support a new sensor, you can add the driver code in this path, and modify the Makefile and Kconfig like imx317. Of course you should config the sys_config.fex first.<br />
<br />
=== Insmod the sensor module ===<br />
<br />
1.cp the driver ko to debian/target/lib/modules/4.4.55+/<br />
<br />
2.replace the imx317_mipi with the new sensor ko's name in this file<br />
<br />
device/eagle/rootfs/etc/modules-load.d/mpp.conf<br />
<br />
3.build the sdk<br />
<br />
=== User Interfaces ===<br />
<br />
1.Use the MPP interfaces. see the [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf MPP Interface Usage] page 20-53,<br />
<br />
The demo code is here [https://github.com/lindenis-org/mpp_sample/tree/master/sample_virvi2vo sample_virvi2vo]<br />
<br />
2.Use the /dev/videoX directly, you can see the demo in [http://files.lindeni.org/lindenis-v5/documents/Driver/SUNXI-VIN%e6%a8%a1%e5%9d%97%e4%bd%bf%e7%94%a8%e6%96%87%e6%a1%a3.pdf Camera Driver Guide]<br />
<br />
== ISP Tuning ==<br />
<br />
=== Allwinner V5 [ftp://www.lindeni.org/tools/HawkviewTools_Debug_V1.00.rar ISP Tuning Tool] ===<br />
* Download and extract to a local folder (note: Windows only).<br />
* Upgrade your Linbian OS to 20181016 or later.<br />
* Please refer to the documents in '''docs''' folder for usage.<br />
<br />
== Display Config ==<br />
<br />
Because of the limitation that there is one display engine module in V5, V5 board can not support dual-display.<br />
<br />
The default display device of the SDK and the image on FTP server is HDMI(1080p).<br />
<br />
If you have download the image from FTP server, and burn it into SD card or eMMC, you can switch the display device follow these steps:<br />
<br />
=== Connect serial to control the board===<br />
<br />
Firstly, you should connect the board's UART0 to computer through a serial-USB cable so that you can send commands to the board through a PC serial software like Putty.<br />
<br />
After you connected successfully, you will see the log show on the PC serial software like this:<br />
<br />
[[File:Booting up message.jpg|frameless]]<br />
<br />
=== Enter U-boot command mode===<br />
<br />
Power on and press any key within 1s when you see the message below, then you can enter u-boot command mode.<br />
<br />
Under this mode, you can modify the kernel devices tree by FDT tools in u-boot.<br />
<br />
[[File:Fdt.png|frameless]]<br />
<br />
=== Change display device configuration with FDT tool===<br />
<br />
Input the follow command to set display device to LCD (following [http://files.lindeni.org/lindenis-v5/accessories/Lindenis_V5_LCD_CTP_Installation_Guide.pdf this guide] to connect LCD panel) or HDMI (1080p):<br />
<br />
'''LCD:'''<br />
<pre><br />
fdt set boot_disp output_type <0x01>;<br />
fdt set boot_disp output_mode <0x04>;<br />
fdt set disp screen0_output_type <0x01>;<br />
fdt set disp screen0_output_mode <0x04>;<br />
fdt save;<br />
reset;<br />
</pre><br />
<br />
'''HDMI (1080p):'''<br />
<br />
<pre><br />
fdt set boot_disp output_type <0x00>;<br />
fdt set boot_disp output_mode <0x00>;<br />
fdt set disp screen0_output_type <0x03>;<br />
fdt set disp screen0_output_mode <0x0a>;<br />
fdt save;<br />
reset;<br />
</pre><br />
<br />
=== Change X11 configuration===<br />
<br />
After you change the display device, you should also tell the X11. Log in the system and modify the X11 configuration like this:<br />
<br />
'''LCD:'''<br />
<pre><br />
ai@linbian:~$ cd /etc/X11/<br />
ai@linbian:/etc/X11$ sudo ln -sf ./conf.d/xorg_lcd.conf ./xorg.conf<br />
ai@linbian:/etc/X11$ ls -l xorg.conf<br />
lrwxrwxrwx 1 root root 22 Oct 10 10:41 xorg.conf -> ./conf.d/xorg_lcd.conf<br />
ai@linbian:/etc/X11$ sudo systemctl restart lightdm<br />
</pre><br />
<br />
'''HDMI (1080p):'''<br />
<pre><br />
ai@linbian:~$ cd /etc/X11/<br />
ai@linbian:/etc/X11$ sudo ln -sf ./conf.d/xorg_hdmi.conf ./xorg.conf<br />
ai@linbian:/etc/X11$ ls -l xorg.conf<br />
lrwxrwxrwx 1 root root 23 Oct 10 10:46 xorg.conf -> ./conf.d/xorg_hdmi.conf<br />
ai@linbian:/etc/X11$ sudo systemctl restart lightdm<br />
</pre><br />
<br />
== CTP Config ==<br />
<br />
After you connected the CTP panel to the board (see [http://files.lindeni.org/lindenis-v5/accessories/Lindenis_V5_LCD_CTP_Installation_Guide.pdf the guide]), insmod its driver like this:<br />
<pre><br />
sudo insmod /lib/modules/4.4.55+/gt9xx_ts.ko<br />
</pre><br />
<br />
'''Notice : The CTP driver in the image on FTP server is not the latest version, you should download our SDK and compile the image by yourself to confirm CTP work well. '''<br />
<br />
== External Storage Config ==<br />
<br />
== Localisation ==</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=405Linbian Usage Guide2018-10-24T08:41:32Z<p>Michael: /* Camera Module */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
== MPP ==<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Camera Module ==<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== Demo programs ==<br />
<br />
=== Face recognition ===<br />
<br />
=== Motion detection ===<br />
<br />
=== Human counting ===<br />
<br />
=== VLPR ===<br />
<br />
=== Image stitch ===<br />
<br />
=== Binocular DOF image ===<br />
<br />
=== Speech recognition ===</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Configuration&diff=404Linbian Configuration2018-10-24T08:40:03Z<p>Michael: /* Camera Config */</p>
<hr />
<div>[[zh:Linbain配置]]<br />
== linbian-config ==<br />
<br />
In development<br />
<br />
== UART configuration ==<br />
<br />
By default, the ttyS0 is assigned to the Linux console. The UART transmit and receive pins are on PB9 and PB10 espectively, which are pins 8 and 10 on the 'PI BUS' GPIO header. And the bit rate is 115200 bps.<br />
<br />
== Ethernet ==<br />
<br />
Ethernet is enabled by default. Plug in the network cable will automatically connect to the Internet.<br />
<br />
[https://launchpad.net/wicd Wicd] is used for manage wireless and wired interface.<br />
<br />
=== Running Wicd in Desktop Environment ===<br />
<br />
Open '''Wicd Network Manager''' from desktop. If the board is properly set up and connected, you should see a Window as follow.<br />
<br />
[[File:wicd-nm-wired.png|frameless]]<br />
<br />
=== Running Wicd in Text Mode ===<br />
<br />
Open a Terminal from desktop. Type '''wicd-curses''':<br />
<br />
[[File:wicd-curses.png|frameless]]<br />
<br />
Manage network by keyboard.<br />
<br />
== Wi-Fi ==<br />
<br />
=== Installing ===<br />
<br />
Lindenis V5 without builtin Wi-Fi. Follow [http://files.lindeni.org/lindenis-v5/accessories/Lindenis_V5_Wi-Fi_Bluetooth_Installation_Guide.pdf these instructions] and install a module.<br />
<br />
=== Add Service In Running Environment ===<br />
<br />
Add configure file wifi.conf in /etc/modules-load.d, and the context of the configure file is the driver name, for example :bcmdhd<br />
<br />
Reboot the system<br />
<br />
=== Configuration ===<br />
<br />
Manage Wi-Fi by Wicd (open '''Wicd Network Manager''' from desktop).<br />
<br />
[[File:wicd-nm-wireless.png|frameless]]<br />
<br />
Click '''Properties''' button to set access point password.<br />
<br />
[[File:wicd-nm-wireless-prop.png|frameless]]<br />
<br />
And then click '''Connect''' button to get access.<br />
<br />
[[File:wicd-nm-wireless-connected.png|frameless]]<br />
<br />
== Bluetooth ==<br />
Bluetooth firmware and service are not installed by default<br />
=== Add configure file ===<br />
add configure file bt in "device/eagle/rootfs/etc" of sdk or "/etc" in running environment, and the context as follow:<br />
#!/bin/bash<br />
#<br />
# Shell script to install Bluetooth firmware and attach BT part of<br />
#<br />
TTY="/dev/ttyS1"<br />
BT_POWER_MGR_PATH=/sys/class/rfkill/rfkill0<br />
BT_FW_PATH=/lib/firmware/rtl_bt<br />
test -d $BT_POWER_MGR_PATH || exit 1<br />
test -d $BT_FW_PATH || exit 1<br />
echo "Using device $TTY for initializing Bluetooth"<br />
#BT power initialize<br />
echo 0 > /sys/class/rfkill/rfkill0/state<br />
sleep 0.1<br />
echo 1 > /sys/class/rfkill/rfkill0/state<br />
brcm_patchram_plus --patchram /etc/firmware/BCM4345C0.hcd --no2bytes --tosleep 1000 $TTY<br />
hciattach $TTY any<br />
exit 0<br />
<br />
=== Add Service ===<br />
If you want to add service in running environment, you can use the following cmd:<br />
insserv /etc/init.d/bt<br />
If you want to add service in sdk, you should modify "debain/mk-rootfs-stretch.sh" as follow:<br />
<br />
diff --git a/mk-rootfs-stretch.sh b/mk-rootfs-stretch.sh<br />
index 75dd3ce..c46d605 100755<br />
--- a/mk-rootfs-stretch.sh<br />
+++ b/mk-rootfs-stretch.sh<br />
@@ -91,6 +91,10 @@ if insserv -s | grep mpp > /dev/null ; then<br />
insserv /etc/init.d/mpp<br />
fi<br />
+if insserv -s | grep bt > /dev/null ; then<br />
+insserv /etc/init.d/bt<br />
+fi<br />
+<br />
apt-get install -y bash-completion<br />
<br />
=== Manage Bt devices ===<br />
<br />
You can use some open source tools, such as blueman.<br />
<pre><br />
sudo apt-get install blueman<br />
</pre><br />
<br />
== Camera Config ==<br />
'''Sys_config.fex config'''<br />
<br />
See the 13 chapter page 37 to page 52 [http://files.lindeni.org/lindenis-v5/documents/guide/sys_config.fex%E4%BD%BF%E7%94%A8%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E.pdf sys_config guide]<br />
<br />
'''Kernel menuconfig'''<br />
<br />
Device Drivers ---> <br />
<*> Multimedia support ---> <br />
[*] V4L platform devices ---> <br />
[*] imx317 platform select ---> <br />
--- imx317 platform select <br />
[*] select IPC platform config otherwise SDV platform <br />
<M> imx317_mipi sensor driver <br />
<br />
the imx317 sensor driver code<br />
<br />
kernel/drivers/media/platform/sunxi-vin/modules/sensor/imx317_mipi.c<br />
<br />
if you want to support a new sensor, you can add the driver code in this path, and modify the Makefile and Kconfig like imx317. Of course you should config the sys_config.fex first.<br />
<br />
'''Insmod the sensor module'''<br />
<br />
1.cp the driver ko to debian/target/lib/modules/4.4.55+/<br />
<br />
2.replace the imx317_mipi with the new sensor ko's name in this file<br />
<br />
device/eagle/rootfs/etc/modules-load.d/mpp.conf<br />
<br />
3.build the sdk<br />
<br />
'''User Interfaces'''<br />
<br />
1.Use the MPP interfaces. see the [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf MPP Interface Usage] page 20-53,<br />
<br />
The demo code is here [https://github.com/lindenis-org/mpp_sample/tree/master/sample_virvi2vo sample_virvi2vo]<br />
<br />
2.Use the /dev/videoX directly, you can see the demo in [http://files.lindeni.org/lindenis-v5/documents/Driver/SUNXI-VIN%e6%a8%a1%e5%9d%97%e4%bd%bf%e7%94%a8%e6%96%87%e6%a1%a3.pdf Camera Driver Guide]<br />
<br />
== ISP Tuning ==<br />
<br />
=== Allwinner V5 [ftp://www.lindeni.org/tools/HawkviewTools_Debug_V1.00.rar ISP Tuning Tool] ===<br />
* Download and extract to a local folder (note: Windows only).<br />
* Upgrade your Linbian OS to 20181016 or later.<br />
* Please refer to the documents in '''docs''' folder for usage.<br />
<br />
== Display Config ==<br />
<br />
Because of the limitation that there is one display engine module in V5, V5 board can not support dual-display.<br />
<br />
The default display device of the SDK and the image on FTP server is HDMI(1080p).<br />
<br />
If you have download the image from FTP server, and burn it into SD card or eMMC, you can switch the display device follow these steps:<br />
<br />
=== Connect serial to control the board===<br />
<br />
Firstly, you should connect the board's UART0 to computer through a serial-USB cable so that you can send commands to the board through a PC serial software like Putty.<br />
<br />
After you connected successfully, you will see the log show on the PC serial software like this:<br />
<br />
[[File:Booting up message.jpg|frameless]]<br />
<br />
=== Enter U-boot command mode===<br />
<br />
Power on and press any key within 1s when you see the message below, then you can enter u-boot command mode.<br />
<br />
Under this mode, you can modify the kernel devices tree by FDT tools in u-boot.<br />
<br />
[[File:Fdt.png|frameless]]<br />
<br />
=== Change display device configuration with FDT tool===<br />
<br />
Input the follow command to set display device to LCD (following [http://files.lindeni.org/lindenis-v5/accessories/Lindenis_V5_LCD_CTP_Installation_Guide.pdf this guide] to connect LCD panel) or HDMI (1080p):<br />
<br />
'''LCD:'''<br />
<pre><br />
fdt set boot_disp output_type <0x01>;<br />
fdt set boot_disp output_mode <0x04>;<br />
fdt set disp screen0_output_type <0x01>;<br />
fdt set disp screen0_output_mode <0x04>;<br />
fdt save;<br />
reset;<br />
</pre><br />
<br />
'''HDMI (1080p):'''<br />
<br />
<pre><br />
fdt set boot_disp output_type <0x00>;<br />
fdt set boot_disp output_mode <0x00>;<br />
fdt set disp screen0_output_type <0x03>;<br />
fdt set disp screen0_output_mode <0x0a>;<br />
fdt save;<br />
reset;<br />
</pre><br />
<br />
=== Change X11 configuration===<br />
<br />
After you change the display device, you should also tell the X11. Log in the system and modify the X11 configuration like this:<br />
<br />
'''LCD:'''<br />
<pre><br />
ai@linbian:~$ cd /etc/X11/<br />
ai@linbian:/etc/X11$ sudo ln -sf ./conf.d/xorg_lcd.conf ./xorg.conf<br />
ai@linbian:/etc/X11$ ls -l xorg.conf<br />
lrwxrwxrwx 1 root root 22 Oct 10 10:41 xorg.conf -> ./conf.d/xorg_lcd.conf<br />
ai@linbian:/etc/X11$ sudo systemctl restart lightdm<br />
</pre><br />
<br />
'''HDMI (1080p):'''<br />
<pre><br />
ai@linbian:~$ cd /etc/X11/<br />
ai@linbian:/etc/X11$ sudo ln -sf ./conf.d/xorg_hdmi.conf ./xorg.conf<br />
ai@linbian:/etc/X11$ ls -l xorg.conf<br />
lrwxrwxrwx 1 root root 23 Oct 10 10:46 xorg.conf -> ./conf.d/xorg_hdmi.conf<br />
ai@linbian:/etc/X11$ sudo systemctl restart lightdm<br />
</pre><br />
<br />
== CTP Config ==<br />
<br />
After you connected the CTP panel to the board (see [http://files.lindeni.org/lindenis-v5/accessories/Lindenis_V5_LCD_CTP_Installation_Guide.pdf the guide]), insmod its driver like this:<br />
<pre><br />
sudo insmod /lib/modules/4.4.55+/gt9xx_ts.ko<br />
</pre><br />
<br />
'''Notice : The CTP driver in the image on FTP server is not the latest version, you should download our SDK and compile the image by yourself to confirm CTP work well. '''<br />
<br />
== External Storage Config ==<br />
<br />
== Localisation ==</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=403Linbian Usage Guide2018-10-24T08:35:58Z<p>Michael: /* Camera Module */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
== MPP ==<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Camera Module ==<br />
<br />
'''Sys_config.fex config'''<br />
<br />
See the 13 chapter page 37 to page 52 [http://files.lindeni.org/lindenis-v5/documents/guide/sys_config.fex%E4%BD%BF%E7%94%A8%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E.pdf sys_config guide]<br />
<br />
'''Kernel menuconfig'''<br />
<br />
Device Drivers ---> <br />
<*> Multimedia support ---> <br />
[*] V4L platform devices ---> <br />
[*] imx317 platform select ---> <br />
--- imx317 platform select <br />
[*] select IPC platform config otherwise SDV platform <br />
<M> imx317_mipi sensor driver <br />
<br />
the imx317 sensor driver code<br />
<br />
kernel/drivers/media/platform/sunxi-vin/modules/sensor/imx317_mipi.c<br />
<br />
if you want to support a new sensor, you can add the driver code in this path, and modify the Makefile and Kconfig like imx317. Of course you should config the sys_config.fex first.<br />
<br />
'''Insmod the sensor module'''<br />
<br />
1.cp the driver ko to debian/target/lib/modules/4.4.55+/<br />
<br />
2.replace the imx317_mipi with the new sensor ko's name in this file<br />
<br />
device/eagle/rootfs/etc/modules-load.d/mpp.conf<br />
<br />
3.build the sdk<br />
<br />
'''User Interfaces'''<br />
<br />
1.Use the MPP interfaces. see the [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf MPP Interface Usage] page 20-53,<br />
<br />
The demo code is here [https://github.com/lindenis-org/mpp_sample/tree/master/sample_virvi2vo sample_virvi2vo]<br />
<br />
2.Use the /dev/videoX directly, you can see the demo in [http://files.lindeni.org/lindenis-v5/documents/Driver/SUNXI-VIN%e6%a8%a1%e5%9d%97%e4%bd%bf%e7%94%a8%e6%96%87%e6%a1%a3.pdf Camera Driver Guide]<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== Demo programs ==<br />
<br />
=== Face recognition ===<br />
<br />
=== Motion detection ===<br />
<br />
=== Human counting ===<br />
<br />
=== VLPR ===<br />
<br />
=== Image stitch ===<br />
<br />
=== Binocular DOF image ===<br />
<br />
=== Speech recognition ===</div>Michaelhttp://wiki.lindeni.org/index.php?title=Linbian_Usage_Guide&diff=402Linbian Usage Guide2018-10-24T08:32:13Z<p>Michael: /* Camera Module */</p>
<hr />
<div>[[zh:Linbian使用指南]]<br />
== Terminal ==<br />
<br />
== MPP ==<br />
<br />
=== Allwinner official documents ===<br />
* MPP Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf Chinese version].<br />
* ISP Module User Guide, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20%e6%a8%a1%e5%9d%97%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/MPP_ISP%20Development%20User%20Guide.pdf English version].<br />
* EVE Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%e5%ba%94%e7%94%a8API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version], [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/EVE%c2%a0Application%c2%a0API%c2%a0Reference%c2%a0Manual_%e5%85%ad%e7%82%b9%e7%a7%91%e6%8a%80.pdf English version].<br />
* Human Counting Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e4%ba%ba%e5%91%98%e8%ae%a1%e6%95%b0API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Motion Detection Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e8%bf%90%e5%8a%a8%e7%9b%ae%e6%a0%87%e8%af%86%e5%88%ab%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
* Binocular depth of field (DOF) Application Development Reference Manual, [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AIE_CVE%e5%8f%8c%e7%9b%ae%e6%b7%b1%e5%ba%a6%e4%bf%a1%e6%81%af%e7%ae%97%e6%b3%95API%e5%8f%82%e8%80%83%e6%89%8b%e5%86%8c.pdf Chinese version]<br />
<br />
=== Samples ===<br />
<br />
Please refer to [[#Demo_programs | Demo programs]].<br />
<br />
== Camera Module ==<br />
<br />
<br />
*sys_config.fex config<br />
<br />
See the 13 chapter page 37 to page 52 [http://files.lindeni.org/lindenis-v5/documents/guide/sys_config.fex%E4%BD%BF%E7%94%A8%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E.pdf sys_config guide]<br />
<br />
<br />
*kernel menuconfig<br />
<br />
Device Drivers ---> <br />
<*> Multimedia support ---> <br />
[*] V4L platform devices ---> <br />
[*] imx317 platform select ---> <br />
--- imx317 platform select <br />
[*] select IPC platform config otherwise SDV platform <br />
<M> imx317_mipi sensor driver <br />
<br />
the imx317 sensor driver code<br />
<br />
kernel/drivers/media/platform/sunxi-vin/modules/sensor/imx317_mipi.c<br />
<br />
if you want to support a new sensor, you can add the driver code in this path, and modify the Makefile and Kconfig like imx317. Of course you should config the sys_config.fex first.<br />
<br />
<br />
*insmod the sensor module<br />
<br />
1.cp the driver ko to debian/target/lib/modules/4.4.55+/<br />
<br />
2.replace the imx317_mipi with the new sensor ko's name in this file<br />
<br />
device/eagle/rootfs/etc/modules-load.d/mpp.conf<br />
<br />
3.build the sdk<br />
<br />
<br />
*User Interfaces<br />
1.Use the MPP interfaces. see the [http://files.lindeni.org/lindenis-v5/documents/soft_design/MPP/AW%20IPC%e5%aa%92%e4%bd%93%e5%a4%84%e7%90%86%e8%bd%af%e4%bb%b6%e5%bc%80%e5%8f%91%e5%8f%82%e8%80%83.pdf MPP Interface Usage] page 20-53,<br />
<br />
The demo code is here [https://github.com/lindenis-org/mpp_sample/tree/master/sample_virvi2vo sample_virvi2vo]<br />
<br />
2.Use the /dev/videoX directly, you can see the demo in [http://files.lindeni.org/lindenis-v5/documents/Driver/SUNXI-VIN%e6%a8%a1%e5%9d%97%e4%bd%bf%e7%94%a8%e6%96%87%e6%a1%a3.pdf Camera Driver Guide]<br />
<br />
== Webcams ==<br />
<br />
== Gstreamer ==<br />
<br />
== Play Video ==<br />
<br />
== Play Audio ==<br />
<br />
== Python ==<br />
<br />
== GPIO ==<br />
<br />
== Demo programs ==<br />
<br />
=== Face recognition ===<br />
<br />
=== Motion detection ===<br />
<br />
=== Human counting ===<br />
<br />
=== VLPR ===<br />
<br />
=== Image stitch ===<br />
<br />
=== Binocular DOF image ===<br />
<br />
=== Speech recognition ===</div>Michael