How To: Fix “No accelerated colorspace conversion found from yuv420p to bgr24.” | OpenCV-2.2.0 & Ubu

This problem is basically an issue converting YUV to RGB using ffmpeg, in order for it to work ffmpeg needs to be recompiled with x264. To get around it use the following to recompile ffmpeg and OpenCV 2.1/2.2:

  1. Follow steps 1-to-4 of FakeOutdoorsman’s guide on ubuntuforums.org – here
  2. OpenCV 2.1/2.2 Install Guide by Sebastian Montabone - here


another solution:


http://ozbots.org/opencv-install-troubleshooting/


Problem
$ ./my_webcam_program
[swscaler @ 0x89c3e30]No accelerated colorspace conversion found from yuv420p to bgr24.
[swscaler @ 0x8893810]No accelerated colorspace conversion found from yuv420p to bgr24.
[swscaler @ 0x889c5b0]No accelerated colorspace conversion found from yuv420p to bgr24.
Last message repeated 1 times

 
Solution
The “accepted” solution is to rebuild x264 and ffmpeg with the shared library option. To rebuild x264, change to the directory where you untared the x264 source files, and enter the following commands:
./configure --enable-shared --enable-pic
make
sudo make install

 
To rebuild ffmpeg, change to the directory where you untared the ffmpeg source files, and enter the following commands:

./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared
make
sudo make install

After rebuilding x264 and ffmpeg, you do not need to rebuild OpenCV. If the swscaler message still occurs when you run your program, run sudo ldconfig, and run your program again.

This solution comes from the following thread on ubuntuforums.org: http://ubuntuforums.org/showthread.php?t=1471616

Unfortunately for me, configuring and recompiling x264 and ffmpeg does not make the warning meesage go away. If try the solution above, please let me know in the comments if it works for you.



评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值