Ask Your Question
0

Encoding videos for opencv

asked Dec 3 '12

Tie-fighter gravatar image

updated Dec 4 '12

I would like to use video datasets to test my program, but unfortunately it does not work.

How do I encode them for the current version of opencv?

PS: It seems to be a problem with cmake (OpenCV examples work but own project doesn't). I am using the tutorial CMakeList.txt that does not compile including the codecs. Can you give me any pointers on how to correctly do this?

Preview: (hide)

2 answers

Sort by » oldest newest most voted
2

answered Dec 3 '12

AlexanderShishkov gravatar image

updated Dec 3 '12

The easiest way is to transcode the video with any available tool (mplayer, VirtualDub, etc...)

Preview: (hide)

Comments

To what codec/format?

Tie-fighter gravatar imageTie-fighter (Dec 3 '12)edit

divx video in AVI file container

I am running out of ideas... are there any fool-proof video samples I could try? Maybe it's a problem with the code.

Tie-fighter gravatar imageTie-fighter (Dec 3 '12)edit

Our test videos are located in opencv_extra repository. For example you can test on big_buck_bunny.avi from https://github.com/Itseez/opencv_extra/tree/master/testdata/highgui/video

For ccp-examle-bgfg_gmg even the original mjpeg videos work... it seems to be a problem with compiling. I do not understand, wh...

Tie-fighter gravatar imageTie-fighter (Dec 4 '12)edit

Do you use binary OpenCV package or you compiled OpenCV?

This is solved, but I am not allowed to close the question yet... It didn't work so I recompiled but forgot to "make install" -_- Everything works fine now...

Tie-fighter gravatar imageTie-fighter (Dec 4 '12)edit
0

answered Dec 20 '12

Tie-fighter gravatar image

I recompiled with ffmpeg but forgot to make install

-_-

Preview: (hide)

Question Tools

Stats

Asked: Dec 3 '12

Seen: 712 times

Last updated: Dec 20 '12