ffmpeg的移植

1、下载源码

git clone https://github.com/aaron201912/ffmpeg.git

将ffmpeg-master.zip 放到Ubuntu下解压

# unzip -x ffmpeg-master.zip ./

2、配置屏参

将7寸屏参头文件拷贝到ffplayer/app/下。并修改ffplayer/app/sd20xpanel.c和ui_app/player/playerWnd.c,将屏参头文件包含进去。

# vi ffplayer/app/sd20xpanel.c

# vi ui_app/player/playerWnd.c

3、编译

# cd ffmpeg-4.1.3/
# sh config_for_ssd20x.sh
# make clean 【可选】
# make -j4
# make install

生成文件位于host目录下:

4、验证

编译测试app

# cd ../ffplayer/app
# vi Makefile

注意:
1、CONFIG_CHIP := SSD20X (选择SSD20X)
2、在lib后加上/8.2.1

CONFIG_CHIP := SSD20X

INCLUDES  = -I. -I$(CURRENT_PATH)/../include -I$(CURRENT_PATH)/../../ffmpeg-4.1.3/host/include -I$(CURRENT_PATH)/../../sstar/include

LIB_PATH  = -L. -L$(CURRENT_PATH)/../../ffmpeg-4.1.3/host/dynamic -L$(CURRENT_PATH)/../../sstar/lib -L$(CURRENT_PATH)/../../3rdparty/lib/8.2.1

# make clean
# make -j4

生成可执行文件ssplayer。

将ssplayer和 ../resources/clock.avi & cuc.flv拷贝到开发板上。
将../../ffmpeg-4.1.3/host/dynamic/下所有动态库拷贝到开发板/usr/lib目录下。
libssplayer.so 位于ffmpeg/ffplayer/app/目录下:

注意:拷贝之前先查看MMA大小,一般MMA大小设置为16M左右及以上,看需求设置
MMA大小设置请参考:http://doc.industio.com/docs/ssd20x-system/page_8

设置结束重新编译更新系统

# chmod a+x ssplayer

# ./ssplayer ./cuc.flv

文档更新时间: 2022-04-19 16:50   作者:Aeeditor