-
Notifications
You must be signed in to change notification settings - Fork 106
Examples (Tests)
all following application provide by yami-utils.
./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
-
you can get raw h264 byte stream by below yamiencode or extract it from mp4 (ffmpeg/avconv -i /path/to/mp4/contains/h264 -vcodec copy -bsf h264_mp4toannexb -an -f h264 output.h264)
-
if you want to try dma_buf (-m 4), recent mesa is required (from Oct'2014), here is my scripts to setup build environments: https://github.com/halleyzhao/yami-share/blob/master/set-yami-mesa.env
-
Decode test can be built/run without X11: https://github.com/halleyzhao/yami-share/blob/master/yamidecode-wo-x11.png
-
Basic transcoding support: encoder test accepts input data from decoder output
-
Testscript is added, it supports one-run-for-all: with a folder including h264/vp8/jpeg/raw-ref
./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
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