Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Error #1

Open
tu-jhample opened this issue Oct 5, 2015 · 3 comments
Open

Compilation Error #1

tu-jhample opened this issue Oct 5, 2015 · 3 comments

Comments

@tu-jhample
Copy link

I attempted to build but seem to have an error with Hist::calculate() and Video::GetNextFrame().
Here is the output from the attempted build:

..../shotdetect-master/build# make -j 3
[ 12%] Built target logger
[ 25%] Built target option
[ 37%] [ 50%] Building CXX object src/CMakeFiles/shotdetect.dir/biThreshold/hist.cpp.o
Building CXX object src/CMakeFiles/shotdetect.dir/video.cpp.o
/..../shotdetect-master/src/biThreshold/hist.cpp: In member function ‘void Hist::calculate()’:
/..../shotdetect-master/src/biThreshold/hist.cpp:112:61: error: ‘cvCvtPixToPlane’ was not declared in this scope
       cvCvtPixToPlane(hsvframe, h_plane, s_plane, v_plane, 0);
                                                             ^
src/CMakeFiles/shotdetect.dir/build.make:169: recipe for target 'src/CMakeFiles/shotdetect.dir/biThreshold/hist.cpp.o' failed
make[2]: *** [src/CMakeFiles/shotdetect.dir/biThreshold/hist.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/jordan/Desktop/shotdetect-master/src/video.cpp: In member function ‘bool Video::GetNextFrame()’:
/home/jordan/Desktop/shotdetect-master/src/video.cpp:252:32: error: ‘AVFrame’ has no member named ‘av_frame_get_best_effort_timestamp’
     currentTimeStamp = pFrame->av_frame_get_best_effort_timestamp() * av_q2d(pFormatCtx->streams[videoStream]->time_base);
                                ^
src/CMakeFiles/shotdetect.dir/build.make:100: recipe for target 'src/CMakeFiles/shotdetect.dir/video.cpp.o' failed
make[2]: *** [src/CMakeFiles/shotdetect.dir/video.cpp.o] Error 1
CMakeFiles/Makefile2:163: recipe for target 'src/CMakeFiles/shotdetect.dir/all' failed
make[1]: *** [src/CMakeFiles/shotdetect.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
@yuhonglin
Copy link
Owner

Hi tu-jhample, thanks for reporting this. It seems there are version issues with both ffmpeg and opencv since I developed it with ffmpeg 2.6.1 and opencv 2.4.

I will try to make it compatible with newest ffmpeg and opencv. Please wait. And if you are in a hurry, you can install ffmpeg and opencv of versions above.

BTW, this piece of code was mostly written 4 years ago so please feel free to ask any questions. It will be a chance to get it updated and improved

@kmbriedis
Copy link

I had the ‘cvCvtPixToPlane’ was not declared in this scope error because I had openCV 3.2.0 installed instead of openCV 2.*.
Just replaced function cvCvtPixToPlane with cvSplit in biThreshold/hist.cpp:112 in it compiled!

@jodyngo
Copy link

jodyngo commented Jul 19, 2017

make[2]: *** [src/CMakeFiles/shotdetect.dir/video.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/shotdetect.dir/all] Error 2
make: *** [all] Error 2

May you please advise for above error? I was failed to build on Linux.
Is there any solution to run it on Windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants