#进入预览模式
init.sh --ov4689
modprobe lcd_ili9342
rmmod ambarella_fb
modprobe ambarella_fb resolution=960x240
test_image -i 0 &
test_encode -i0 --lcd 960x240 --mixer 1 --osd-mixer off
#录制h264/h265命令
1.进入预览模式
2.test_bsreader -f [filename] &
3.test_encode -A -h 1080p -e #1080p打开编码模式 -h:h264 -H:h265
4.test_encode -A -s #停止编码
#播放
test_decode --idle
test_decode -f /sdcard/cuc_ieschool.h265
test_decode -f /sdcard/cuc_ieschool.h264
test_decode -f /sdcard/123.h264
test_decode -f /sdcard/video_file.h264
test_decode -f /sdcard/hevctest.h265
test_decode -f filename
windows下
H265封装MP4
.\ffmpeg -i hevctest.h265 -vcodec copy -f mp4 test.mp4
linux下
./ffmpeg -i hevctest.h265 -vcodec copy -f mp4 test1.mp4
MP4解封装H265
.\ffmpeg -i test.mp4 -codec copy -bsf h264_mp4toannexb -f h264 20130312_133313.264
./ffmpeg -i /sdcard/test1.mp4 -codec copy -bsf hevc_mp4toannexb -f hevc /sdcard/test1.h265
u盘创建方法:
modprobe g_mass_storage file=/dev/mmcblk0p1 stall=0 removable=1
卸载u盘
rmmod g_mass_storage
解压文件
tar -xjvf *.tar.bz2
tar -xzvf *.tar.bz2
链接库路径指定
export LD_LIBRARY_PATH=/sdcard/ffmpeg_output/lib:$/usr/lib:/sdcard/mp4v2/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/ue/build/s5l_linux_sdk/ambarella/unit_test/private/iav_test/arch_s5l/ffmpeg_out/lib
ffmpeg 配置
./configure --disable-x86asm --prefix=/ue/build/ffmpeg_out \
--enable-shared \
--enable-cross-compile \
--cc=/usr/local/linaro-aarch64-2017.08-gcc7.1/bin/aarch64-linux-gnu-gcc \
--cxx=/usr/local/linaro-aarch64-2017.08-gcc7.1/bin/aarch64-linux-gnu-g++ \
--cross-prefix=/usr/local/linaro-aarch64-2017.08-gcc7.1/bin/aarch64-linux-gnu- \
--arch=aarch64 \
--target-os=linux
Mplayer 配置
./configure --enable-cross-compile \
--host-cc=gcc \
--cc=/usr/local/linaro-aarch64-2017.08-gcc7.1/bin/aarch64-linux-gnu-gcc \
--as=/usr/local/linaro-aarch64-2017.08-gcc7.1/bin/aarch64-linux-gnu-as \
--ar=/usr/local/linaro-aarch64-2017.08-gcc7.1/bin/aarch64-linux-gnu-ar \
--ranlib=/usr/local/linaro-aarch64-2017.08-gcc7.1/bin/aarch64-linux-gnu-ranlib \
--target=arm-linux \
--prefix=/ue/build/mplayer_out \
--enable-alsa \
--enable-static \
--disable-win32dll \
--disable-dvdread \
--enable-fbdev \
--disable-mencoder \
--disable-live \
--disable-ivtv \
--language=zh_CH
./configure \
--prefix=/ue/build/mplayer_out \
--enable-fbdev \
--disable-win32dll \
--disable-dvdread \
--enable-mplayer \
--disable-mad \
--disable-mencoder \
--disable-live \
--enable-armv5te \
--disable-armv6 \
--disable-armv6t2 \
--enable-cross-compile \
--enable-ffmpeg_so \
--disable-directx \
--disable-direct3d \
--disable-3dnow \
--disable-3dnowext \
--cc=/usr/local/linaro-aarch64-2017.08-gcc7.1/bin/aarch64-linux-gnu-gcc \
--target=aarch64-linux \
--extra-cflags="-I include"
--extra-ldflags="-L../qt/arm-qt-output/lib "\
ZLIB配置
./configure --extra-cflags="-I../qt/arm-qt-output/include"
2//
Usage:
1. Extract Linux kernel in s5l_linux_sdk.
$ cd s5l_linux_sdk/ambarella
$ source build/env/aarch64-linaro-gcc.env
$ cd boards/s5lm_tomato
$ make -j11
previws for lcd
init.sh --ov4689
rmmod ambarella_fb
modprobe ambarella_fb resolution=960x240
test_image -i 0 &
modprobe lcd_ili9342
test_encode -i 0 --lcd 960x240 --mixer 1 --osd-mixer off
test_osd -w 960 -h 240 -a 255 -c b /dev/fb0
/
init.sh --ov4689
rmmod ambarella_fb
modprobe ambarella_fb resolution=960x240
test_image -i 0 &
modprobe lcd_ili9342
test_encode -i 1 --lcd 960x240 --mixer 1 --osd-mixer off
test_encode -i 1 --cvbs 720x576 --mixer 1 --osd-mixer off
/// rtsp server
init.sh --imx377
init.sh --ov4689
test_tuning -a &
test_encode -i 0 --hdmi 480p
rtsp_server &
test_encode -A -h720p -e -B -h 480p -e
///
init.sh --imx377
modprobe ambarella_fb resolution=960x240
modprobe lcd_ili9342
test_image -i 0 &
test_encode -i0 --lcd 960x240 --mixer 1 --osd-mixer off
///caputer //flow//
init.sh --ov4689
rmmod ambarella_fb
modprobe ambarella_fb resolution=960x240
modprobe lcd_ili9342
test_image -i 0 &
test_encode -i 2688x1512 --lcd 960x240 --mixer 1 --osd-mixer off -X --bsize 2688x1512 --bmaxsize 2688x1512 -A --smaxsize 2688x1512 --large-downscale 1
test_encode -A -h 2688x1512 -b 0 -e
test_upscale_jpeg -b 0 -f 004 --4x // 运行test_upscale_jpeg, 你能够得到帮助提示的。-b是你选择的buffer, --4x 是你放大16倍,--2X则是放大4倍。
test_upscale_jpeg -b 1 -f 004 --4x //use buffer 1 to scale.
=================================uvc====================================
init.sh --ov4689
sleep 1
test_image -i0 &
test_encode -i0 --cvbs 480i
test_encode -A -h 1080p --bitrate 8000000 -e
echo device > /proc/ambarella/usbphy0
modprobe libcomposite
modprobe uac
modprobe audio
modprobe uvc stream_format=0
modprobe webcam streaming_maxpacket=512
-------------------------------------------------------------------------
init.sh --ov4689
sleep 1
test_image -i0 &
test_encode -i0 --cvbs 480i
test_encode -A -h 1080p --bitrate 8000000 -e
echo device > /proc/ambarella/usbphy0
modprobe libcomposite
modprobe uvc stream_format=0
modprobe webcam streaming_maxpacket=512
=================================audio record==========================
mount -t debugfs debugfs /mnt
cd /mnt/asoc/ak4951\ @\ AMBEVK/codec\:ak4951-codec.0-0012/
echo 0x06 0x0B >codec_reg
echo 0x02 0x1E >codec_reg
echo 0x03 0x01 >codec_reg
echo 0x09 0x00 >codec_reg
echo 0x0A 0x6C >codec_reg
echo 0x0B 0x2E >codec_reg
echo 0x0C 0xE1 >codec_reg
echo 0x0D 0xE1 >codec_reg
echo 0x1A 0x2C >codec_reg
echo 0x1B 0x01 >codec_reg
echo 0x1D 0x03 >codec_reg
echo 0x00 0xC3 >codec_reg
arecord -vv -fdat 0002.wav
U diskk
modprobe g_mass_storage file=/dev/mmcblk0p1 stall=0 removable=1
mkdir mass_storage
mount /dev/mmcblk0p1 /mass_storage/
modprobe g_mass_storage file=/mass_storage/usb stall=0 removable=1
dd if=/dev/zero of=/mass_storage/usb bs=1024 count=36283