This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Pages: 1 - Last Post: 14-Sep-2017 18:38 Last Post By: jGromit
ctwist

Posts: 1,411
Registered: 27-Sep-2003
videoProcessor parameters
Posted: 14-Sep-2017 05:57
 
  Click to reply to this thread Reply
As you may be aware, Mirage supports variants (i.e. multiple album objects on one slide page). Variants are generated by Mirage. I realized that a variant video does not respect the clip start and end parameters, so I have fixed it, but it is not working. If I include the video as a non-variant, clipping works correctly.
TimeCode vVideoClipStart = (TimeCode)vProperties.get(AlbumObjectProperties.VIDEO_CLIP_START);
TimeCode vVideoClipLength = (TimeCode)vProperties.get(AlbumObjectProperties.VIDEO_CLIP_LENGTH);
VideoProcessor vVideoProcessor = engine.getVideoProcessor();
File vOutFile = vVideoProcessor.processVideo(vFile, Orientation.normal, vVideoClipStart, vVideoClipLength, vIndex.vOutputDirectory);
The video that is failing starts from the beginning, and the end is clipped. However, the generated video is not clipped.
I verified that vVideoClipStart and vVideoClipLength are populated correctly.
I tried to enhance this to convert a null videoClipStart to TimeCode(0,0), but it didn't help.

So, what am I doing wrong?
RobM

Posts: 4,382
Registered: 4-Aug-2006
Re: videoProcessor parameters
Posted: 14-Sep-2017 15:28   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
ctwist wrote:
As you may be aware, Mirage supports variants (i.e. multiple album objects on one slide page). Variants are generated by Mirage. I realized that a variant video does not respect the clip start and end parameters, so I have fixed it, but it is not working. If I include the video as a non-variant, clipping works correctly.
TimeCode vVideoClipStart = (TimeCode)vProperties.get(AlbumObjectProperties.VIDEO_CLIP_START);
TimeCode vVideoClipLength = (TimeCode)vProperties.get(AlbumObjectProperties.VIDEO_CLIP_LENGTH);
VideoProcessor vVideoProcessor = engine.getVideoProcessor();
File vOutFile = vVideoProcessor.processVideo(vFile, Orientation.normal, vVideoClipStart, vVideoClipLength, vIndex.vOutputDirectory);
The video that is failing starts from the beginning, and the end is clipped. However, the generated video is not clipped.
I verified that vVideoClipStart and vVideoClipLength are populated correctly.
I tried to enhance this to convert a null videoClipStart to TimeCode(0,0), but it didn't help.

So, what am I doing wrong?

Dunno, but if you post the skin I'm sure others can have a look and either confirm a problem or stumble on the solution. Video processing is part black arts, as I found out when making the external tool to convert images into a movie ;)
ctwist

Posts: 1,411
Registered: 27-Sep-2003
Re: videoProcessor parameters
Posted: 14-Sep-2017 18:12   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
You can ignore this thread. It was just another example of skin developer ineptitude. Apparently you need to initialize a variable before using it instead of afterwards.

I am leaving this here because my code snippet is correct; maybe it will be useful for somebody else. There is no need to convert a null videoClipStart; videoProcessor handles nulls.
jGromit

Posts: 33,170
Registered: 31-Jan-2006
Re: videoProcessor parameters
Posted: 14-Sep-2017 18:38   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
ctwist wrote:
Apparently you need to initialize a variable before using it instead of afterwards.

Clearly, an overly fussy language.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums