Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Examples (Tests)

Xu Guangxin edited this page Jun 8, 2016 · 7 revisions

all following application provide by yami-utils.

video playback

    ./yamidecode -i test.h264 [-m 0/1/2/3/4]

Full list of decode options:

   -i media file to decode  
   -w wait before quit: 0:no-wait, 1:auto(jpeg wait), 2:wait
   -f dumped fourcc [*]
   -o dumped output dir
   -m <render mode>
     -1: skip video rendering
      0: dump video frame to file
      1: render to X window [*]
      2: texture: render to Pixmap + texture from Pixmap [*]
      3: texture: export video frame as drm name (RGBX) + texture from drm name
      4: texture: export video frame as dma_buf(RGBX) + texutre from dma_buf [dep on recent mesa]
      5: texture: export video frame as dma_buf(NV12) + texture from dma_buf. not implement yet
 [*] v4l2decode doesn't support the option

video recording

    ./yamiencode -i raw.yuv -s I420 -W width_value -H height_value -c AVC -o out.h264
    ./yamiencode -i ./bear_320x192_40frames.yuv -s I420 -W 320 -H 192 -c AVC -o out.h264

encode with camera

    ./yamiencode -i /dev/video0 -N 300 -s YUY2 -W 640 -H 480 -c AVC -o out.h264

basic transcoding:

    ./yamiencode -i /home/chronos/halley/MID.h264 -s I420 -W 640 -H 480 -c AVC -o out.h264

Full list of supported options are:

    -i <source yuv filename> load YUV from a file
    -W <width> -H <height>
    -o <coded file> optional
    -b <bitrate> optional
    -f <frame rate> optional
    -c <codec: AVC|VP8|JPEG> Note: not support now
    -s <fourcc: NV12|I420|YUY2|YV12> Note: not support now
    -N <number of frames to encode(camera default 50), useful for camera>

##transcode with zero copy:

    tests/yamitranscode -i xxx.264 -o 720x480.264

video wall sample application

kill your x. run command like this:

    example/grid xxx.264 -r 4 -c 5

it will decode and display xxx.264 on a 4x5 block

Clone this wiki locally