0

I'm new to the library and I'm writing a program to analyze videos following the tutorial. Here is my code snippet:

        detector = new VideoDetector(24);
        detector.setClassifierPath(classifierPath);
        detector.setImageListener(this);

        detector.setDetectAllExpressions(true);
        detector.setDetectAllEmotions(true);
        detector.setDetectAllEmojis(true);
        detector.setDetectAllAppearances(true);
        detector.setDetectAge(true);
        detector.setDetectEthnicity(true);
        detector.start();
        detector.process("path to the video file");

I got the following exception:

Error opening video file: Source: __cdecl FileVideoCapture::FileVideoCapture(const class boost::filesystem::path &,const float)(C:\Jenkins\workspace\affdexface-win64\src\modules\utils\FileVideoCapture.cpp LINE 12)

I'm not sure where does the "C:\Jenkins\workspace\" part come from? Could anyone help me?

Thanks!

  • The "Jenkins" part in the error is just referring to a source file location in a Jenkins CI build server. What format of video file are you using? Is it one for the supported formats listed at http://developer.affectiva.com/supportedvideoformats/? Can you confirm that it's playable using a video player program? – Andy Dennie Nov 14 '16 at 17:04
  • Sorry, I just noticed that you said it was an mp4 file in the title of your question... missed that. – Andy Dennie Nov 14 '16 at 20:06

1 Answers1

0

Can you paste more information on the codec of the video file. Here are couple of ways in which you can find the codec information.

Can you verify the version of opencv_ffmpeg*.dll? In the SDK installer under Affectiva->AffdexSDK->bin we include either opencv_ffmpeg248 or opencv_ffmpeg248_64.dll based on x86 or x64. Can you verify that you are getting the error using the dll that is shipped?

Did you convert the video to a different file format using ffmpeg and then re-run the application?

Community
  • 1
  • 1
  • I have opencv_ffmpeg248_64.dll. The codec of my video file looks like this: Stream 0: Codec: H264 - MPEG-4 AVC (part 10) (avc1), Resolution: 1280*738, Display resolution 1280*720, Frame rate 24, Decoded format: Planar 4:2:0 YUV full scale. Stream 1 Type: Audio. Codec: MPEG AAC Audio(mp4a), Channels: Stereo, sample rate: 48kHz – flyhigher Nov 16 '16 at 04:50
  • @flyhigher did you try the second suggestion of converting to a different format and re-run the application. – Umang Mukesh Mehta Nov 16 '16 at 21:26
  • Do you have the `opencv_ffmpeg248_64.dll` loaded during runtime? We require opencv_ffmpeg*.dll for video decoding during runtime. You will require to copy the dll into either Debug/Release folder based on your configuration. – Umang Mukesh Mehta Nov 16 '16 at 21:41
  • Ok I added the dll to the Debug and Release folder. Now the app crashed with the following system events: Fault offset: 0x00000000000b136d Faulting process id: 0x3060 Faulting application start time: 0x01d2406b5d7f210c Faulting application path: C:\github\VideoAnalysis\VideoAnalysis\bin\Debug\VideoAnalysis.vshost.exe Faulting module path: C:\github\VideoAnalysis\VideoAnalysis\bin\Debug\affdex-native.dll – flyhigher Nov 17 '16 at 00:58
  • I tried to use the Kairo sdk to analyze the video and it worked fine. So there must be something wrong with affdex dlls. – flyhigher Nov 17 '16 at 00:59
  • @flyhigher can you send over the video to us so that we can evaluate if it is a problem with the video or with the compilation. – Umang Mukesh Mehta Nov 17 '16 at 19:44