Video Recording Plug-In

Hello everybody,

I thought there was only a way to use the captured photos to extract the video from the model view, but looking at the link below, I realized that there is a way to extract the video.

"https://github.com/AnyBody/video-recorder"

So, in order to extract the model view of Mocap data using BVH (Xsens) into video, I modified it by adding the blue box codes to the Main.any file in the path below, and the following warning message appeared.

Below is Code for Main.any File

#include "../../../../../../Tools/ModelUtilities/Video/CameraClassTemplate.any"

Main={

VideoLookAtCamera MyCam (UP_DIRECTION = y) = {
CameraLookAtPoint = {60,70,0};
CameraFieldOfView = 1;
CameraDirection = {1, 1, -1};
BackgroundColor = {1, 1, 1};
VideoInputFrameRate = 60;
VideoResolution = {1920, 1080};
Analysis = {
AnyOperation &ref = Main.RunAnalysis.InverseDynamics;
};
};
};

// ***************************** AnyMoCap ************************************
#include "../../../libdef.any"

// Enter and edit data/settings shared by all subjects and trials
#path MOCAP_LAB_SPECIFIC_DATA "../../../LabSpecificData.any"

// Enter and edit data shared by all trials from this subject
#path MOCAP_SUBJECT_SPECIFIC_DATA "../SubjectSpecificData.any"

// Enter and edit data specific to this trial:
#path MOCAP_TRIAL_SPECIFIC_DATA "TrialSpecificData.any"

// Include the AnyMoCap Framwork
#include "<ANYMOCAP_MODEL>"

Below is Error Message I got

ERROR(SCR.PRS23) : Main.any(5) : Defined at : CameraClassTemplate.any(146) : 'Preview' : Expression assignments are not allowed in declarations of AnyFolder objects

The CameraClassTemplate.any file has not been modified, and I used the file provided with AMMR.

This is my first time warning, so I don't know how to fix it, but any help would be appreciated.

Hi Crayonmu,

Please try to put the libdef as the first line in the model it seems that this class is relying on definitions in the libdef to work so it need to come prior to class.

#include "../../../libdef.any"

#include "../../../../../../Tools/ModelUtilities/Video/CameraClassTemplate.any"

Main={

VideoLookAtCamera MyCam (UP_DIRECTION = y) = {
CameraLookAtPoint = {60,70,0};
CameraFieldOfView = 1;
CameraDirection = {1, 1, -1};
BackgroundColor = {1, 1, 1};
VideoInputFrameRate = 60;
VideoResolution = {1920, 1080};
Analysis = {
AnyOperation &ref = Main.RunAnalysis.InverseDynamics;
};
};
};


Best regards
Søren

Hi toerholm,

Thank you for your kind answer :slight_smile:

I had a problem that the video was not generated, but it was possible to solve it by looking at the link below.

If someone sees this article and has the same problem, paste the "ffmpeg.exe" file into the same path as main.any and it will solve it.

Thanks for sharing this

Best regards
Søren

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.