help with videos in raspberry pi, c++ and openCV

asked 2015-02-19 01:30:55 -0500

jeck_slist gravatar image

Hi, I am currently trying to apply computer vision processing to a video in raspberry pi B+. I use visual studio c++ and openCV in windows in order to run and test my code. After I make it work in windows, i transfer the cpp file along with the video in the pi and I build the executable from there. I am able to build the executable however when I run it nothing happens.

Is there something I need to install in the pi in order to play videos? please help

edit retag flag offensive close merge delete


As far as I know, I think you would need to have OpenCV installed on the Raspberry Pi.

I don't think this is that you want to do but, If you are just looking to play videos, the pi has a default omxplayer that plays videos in full screen.

Potato gravatar imagePotato ( 2015-02-19 09:29:05 -0500 )edit

i have opencv installed in my raspberry pi. playing videos is actually just the first step, my true goal is to apply video processing to these videos

jeck_slist gravatar imagejeck_slist ( 2015-02-19 21:04:47 -0500 )edit

Can you try compiling the code using the gcc compiler and see if the binary created with that works?

Potato gravatar imagePotato ( 2015-02-20 08:08:48 -0500 )edit

Just to answer my own question. I finally made it to work. it seems ffmpeg support was not installed before making opencv. I just had to make sure sure that ffmpeg was checked in cmake.

I think this update was truly the key for playing videos sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev

I got the answer here:

jeck_slist gravatar imagejeck_slist ( 2015-02-26 02:56:25 -0500 )edit