Difference between revisions of "Linbian Usage Guide"

From Lindenis Wiki
Jump to: navigation, search
(Binocular DOF image)
(MPP)
Line 43: Line 43:
 
== MPP ==
 
== MPP ==
  
 +
MPP is the media process platform of Allwinner V5, including following components.
 +
* system control, API family: AW_MPI_SYS
 +
* video input, API family: AW_MPI_VI
 +
* video output, API family: AW_MPI_VO
 +
* image stitch engine, API family: AW_MPI_ISE
 +
* video encode, API family: AW_MPI_VENC
 +
* video decode, API family: AW_MPI_VDEC
 +
* mux, API family: AW_MPI_MUX
 +
* demux, API family: AW_MPI_DEMUX
 +
* audio input, API family: AW_MPI_AI
 +
* audio output, API family: AW_MPI_AO
 +
* audio endode, API family: AW_MPI_AENC
 +
* audio output, API family: AW_MPI_AOUT
 +
* Region, API family: AW_MPI_RGN
 +
 
=== Allwinner official documents ===
 
=== Allwinner official documents ===
 
* 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].
 
* 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].

Revision as of 08:35, 26 October 2018

Terminal

On Linbian OS, the default terminal application is LXTerminal.

Lxterminal.png

You can open it from Application Menu -> System Tools.

Camera Module

Webcams

Gstreamer

Camera source

  • lindeniv4l2src: Video (video4linux2) Source

Use for CSI Camera
Example:
sudo gst-launch-1.0 lindeniv4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoconvert ! sunxifbsink video-memory=24

Omx hardware H.264 decoder and encoder

  • omxh264dec: OpenMAX H.264 Video Decoder

Example:
sudo gst-launch-1.0 filesrc location=1c.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! videoconvert ! sunxifbsink

  • omxh264videoenc: OpenMAX H.264 Video Encoder

Example:
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

Display sink

  • sunxifbsink: Accelerated console framebuffer video sink for sunxi-based devices

Example:
sudo gst-launch-1.0 -v videotestsrc pattern=ball name=left ! sunxifbsink

Play Video

Play Audio

Python

GPIO

MPP

MPP is the media process platform of Allwinner V5, including following components.

  • system control, API family: AW_MPI_SYS
  • video input, API family: AW_MPI_VI
  • video output, API family: AW_MPI_VO
  • image stitch engine, API family: AW_MPI_ISE
  • video encode, API family: AW_MPI_VENC
  • video decode, API family: AW_MPI_VDEC
  • mux, API family: AW_MPI_MUX
  • demux, API family: AW_MPI_DEMUX
  • audio input, API family: AW_MPI_AI
  • audio output, API family: AW_MPI_AO
  • audio endode, API family: AW_MPI_AENC
  • audio output, API family: AW_MPI_AOUT
  • Region, API family: AW_MPI_RGN

Allwinner official documents

Samples

Please refer to Demo programs.

Demo programs

Allwinner release a series of MPP samples. You can download from Github.

$ git clone https://github.com/lindenis-org/mpp_sample ~/mpp_sample

After downloading, You will get the following directory.

app/
Makefile.param
README.md
sample_adec/
sample_aenc/
sample_ai/
......

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.

$ sudo ./app/release/app_mpp_sample

***************************************************************
  1 : vi+(venc+rtsp)+vo
  2 : vi+(venc+rtsp)
  3 : vi+vo
  4 : vi+ise+(venc+rtsp)+vo
  5 : [vi+venc+vo]+[ai+aenc+ao]+rtsp
  6 : vi->yuv+venc+rtsp
  7 : vi+venc+mux
  8 : vi+(venc+mux)+vo
  9 : demux+vdec+vo
 10 : ai+aenc+mux+ao
 11 : demux+adec+ao
 12 : Quit
***************************************************************
 Please choice 1~12 num:

Face detection

Face detection based on EVE.

Location

sample_face_detect

Building

$ cd ~/mpp_sample/sample_face_detect
$ make

Running

$ sudo ./sample_face_detect

The picture of face crop and store at ./pic directory when detected.

Motion detection

Motion detection based on CVE.

Location

sample_AILib/sample_vi2MOD

Building

$ cd ~/mpp_sample/sample_AILib/sample_vi2MOD
$ make 

Running

$ sudo ./sample_vi2MOD -path sample_vi2MOD.conf

The information of detected target was stored at ./DTCAResult.bin .

Human counting

Hunman counting based on CVE.

Location

sample_AILib/sample_vi2HCNT

Building

$ cd ~/mpp_sample/sample_AILib/sample_vi2HCNT
$ make

Running

$ sudo ./sample_vi2HCNT -path sample_vi2HCNT.conf

The information of detected target was stored at ./HCNTResult.bin .

VLPR

VLPR based on CVE.

Location

sample_AILib/sample_vi2VLPR

Building

$ cd ~/mpp_sample/sample_AILib/sample_vi2VLPR
$ make

Running

$ sudo ./sample_vi2VLPR -path sample_vi2VLPR.conf

The information of detected vehicle license plate was stored at ./VLPRResult.bin .

Binocular depth information image

BDII based on CVE.

Location

sample_AILib/sample_BDII

Building

$ cd ~/mpp_sample/sample_AILib/sample_vi2BDII
$ make

Running

$ sudo ./sample_vi2BDII -path sample_vi2BDII.conf

The output is a 8bit-gray-scale picture, stored at ./BDIIResult.bin .

Image stitch

Camera module is in development.