FFMPEG support in OpenCV

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FFMPEG support in OpenCV

跳至解决方案
3,764 次查看
lchen
Contributor III

Hi,

I've a Yocto image (imx-image-full) for the iMX8 board. OpenCV 4.4 is included in the image, which uses gstreamer as the backend. When testing a video app, some of the OpenCV properties are not supported. e.g.

property 6 = CAP_PROP_FOURCC
property 46 = CAP_PROP_CODEC_PIXEL_FORMAT

I am trying to add FFMPEG support to the OpenCV by adding the following lines in conf/local.conf

IMAGE_INSTALL_append = " ffmpeg"
LICENSE_FLAGS_WHITELIST = "commercial"

With this FFMPEG pkgs were compiled successfully. However, the building failed at opencv do_install:

ERROR: opencv-4.4.0.imx-r0 do_install: Execution of '/home/xxx/xxx/build-imx8qmmek-xwayland/tmp/work/cortexa72-cortexa53-crypto-mx8-poky-linux/opencv/4.4.0.imx-r0/temp/run.do_install.3025' failed with exit code 1:
abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this.
Child aborted
CMake Error: Generator: execution of make failed. Make command was: ninja -v -j 12 install &&
WARNING: exit code 1 from a shell command.

I also tried removing gstreamer in PACKAGECONFIG in the opencv recipe file, but still got the same error.

 

Any insights or solution for this issue is appreciated!

Thanks,

Lijun

0 项奖励
回复
1 解答
3,744 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

After removing PACKAGECONFIG[gstreamer], you need add PACKAGECONFIG[ffmpeg]="-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,XXXX"

在原帖中查看解决方案

0 项奖励
回复
2 回复数
3,745 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

After removing PACKAGECONFIG[gstreamer], you need add PACKAGECONFIG[ffmpeg]="-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,XXXX"

0 项奖励
回复
3,736 次查看
lchen
Contributor III

Thanks for the reply.

Actually after I did a clean and re-build for opencv, it worked with ffmpeg and gstreamer together.

I am not if ffmpeg and gstreamer can get along together for OpenCV, or I have to choose one of them?

Thanks,

Lijun

0 项奖励
回复