affdex VideoDetector failed to open a mp4 file - affdex-sdk

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!

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?

Related

ffmpeg in cocoa app does not do perfect streaming

I am using ffmpeg 3.1.4
If i stream via command line on Mac 10.10.5 its done properly.
However when i compile source code and add library files in my cocoa app and try to stream i get errors.
Format context is created properly using :
avformat_alloc_output_context2(_avOutputFormatContext, _avOutputFormat, "flv", "rtmp://path/swati.flv"
File is opened properly :
avio_open(&_avOutputFormatContext->pb, cStreamName, AVIO_FLAG_WRITE);
However Error is received at :
avformat_write_header(_avOutputFormatContext, NULL);
It gives -22 error
Any suggestion what should i do.

Load Image From File and set into UnityEngine.UI.Image Unity

I try to load image from file and set into UnityEngine.UI.Image. the image is BirdDiedScreenShot.PNG. also define namespace
using System.IO;
But the problem is when i define path of image, Like
byte[] bytes = File.ReadAllBytes (Application.persistentDataPath + "/BirdDiedScreenShot.png");
in Above Code ReadAllBytes() method of File Class is not Work. It Give me Error like
System.IO.File' does not contain a definition forReadAllBytes'
What's the problem i don't Solve. how can i Fix This.? Please Give Me Suggestion to Solve this.. thanks...
This has to do with having "Web Player" selected as target platform.
When you click "File -> BuildSettings" in the Unity editor you see a little Unity icon next to the target platform. Switch to "PC, Mac & Linux Standalone" for example.
If you don't have the "PC, Mac & Linux Standalone" module loaded, check this thread: http://forum.unity3d.com/threads/5-3-released.372567/page-2#post-2414948
By the way, the actual name of the Windows module is called "Windows Build Support".
In the new Download Assistant you can choose which modules to install. (Can be found on Unitys download page http://unity3d.com/get-unity/download?ref=personal)
greetings

making VLC play external stream using VB.net

Hi I would like to programmatically make VLC play a video stream. I dont want to embed VLC just make it play. Normally I start VLC to play a local file like this
System.Diagnostics.Process.Start("VLC.exe", link to local file)
when I try the same process but supplying a vid stream I get an error saying the file cant be found.
System.Diagnostics.Process.Start("VLC.exe", "https://www.youtube.com/watch?v=y2C_3swE9sQ&list=PLrEnWoR732-BHrPp_Pm8_VleD68f9s14-&index=37")
It is supposed to be possible as per the instruction on VLC website:
To receive a HTTP stream, start VLC with : % vlc http://www.example.org/your_file.mpg but I can't seam to get it done.
Could someone point me in the right dirrection?
Your code works perfectly with VLC 2.2.1 which is the latest version.
To avoid The system cannot find the file specified error is better specify complete path of executable:
System.Diagnostics.Process.Start(
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe",
"https://www.youtube.com/watch?v=y2C_3swE9sQ&list=PLrEnWoR732-BHrPp_Pm8_VleD68f9s14-&index=37"
)
If you can't upgrade please note that this isn't a VB.NET problem but an incompatibility between new YouTube format and old versions of VLC: google vlc youtube.lua fix for a possible solution (not tested).

Getting error in using SoundJS

I'm using Flash HTML5Canvas document to publish html files.
I want to add audio playback and started using SoundJS but having problems in using it.
I used the following code in the file.
createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin, createjs.FlashPlugin]);
But when I publish it and and run it in browser(Chrome, Win7 Pro 64) I get the following error in console.
"Cannot read property registerPlugins of undefined"
When I checked the html source code, soundjs source is not mentioned. easeljs, tween & movieclip sources are mentioned.
How do I get this resolved?
Thanks :)
First I needed to edit the html file produced by flash cc.
I manually added the line
"http://code.createjs.com/soundjs-0.6.1.min.js"></script>
Double clicking the edited html file and running in browser gives HTTP errors.
So in the publish settings of Flash CC, I disabled the 'Overwrite HTML' option and then if I test/publish via Flash CC, Soundjs loads fine. It requires a local server to test it and I missed that part.

depthAndStencil throws Error 103 in application XML

in trying to implement the answer to stage.stage3Ds is empty when debuging on Kindle Fire HD 8.9". I tried adding both renderMode and detailAndStencil to the application xml file but get this error when trying to debug to device.
Error occurred while packaging the application:
D:\Flash\Mobile Test\bin-debug\Main-app.xml(10): error 103: application.initialWindow.depthAndStencil is an unexpected element/attribute
The initialWindow portion of application xml file is below
<initialWindow>
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<renderMode>direct</renderMode>
<depthAndStencil>true</depthAndStencil>
</initialWindow>
It looks like depthAndStencil option is only available with AIR 3.2 onwards.
Looking through the template file that is used to generate the app descriptor file:
[AIR SDK ROOT]\templates\air\descriptor-template.xml
The entry for depthAndStencil first appears in the template file that comes with the AIR 3.2 SDK.
Edit:
Confirmed. See release notes for 3.2 SDK: http://helpx.adobe.com/flash-player/release-note/release-notes-developer-flash-player.html