FFMpeg - How to apply a scene select filter on an area of the frames - ffmpeg

This is a follow up question to:
Using FFMPEG: How to do a Scene Change Detection? with timecode?
Using FFmpeg to do scene change detection, the filter select=gt(scene,0.3) can be used to select the frames whose scene detection score is greater then 0.3.
Question: In FFmpeg, is possible to extend the filter so that only a scene select is applied on a defined area of the video frames? In other words, using an example, how can one do a scene change detection of only the right hand side of the video frames?

Related

Wide FOV and Large Baseline Fisheye stereo cameras rectification

Iam working on Fisheye stereo cameras, I can't Rectify the cameras for stereo correspondence due to the presence of vegetation and the large baseline between the cameras which make the task particularly challenging. The FOV is 210 degrees and baseline is 0.59m I posted Left and Right image of the same scene with the cameras,
Left Image Right Image
I've tried OpenCV-Fisheye model and openCv-Omnidirectional model, none of them worked, the output images were not rectified.
Should the Omnidirectional model work?
Is it even possible to calibrate the cameras together?

MLT Framework. How to add text or image watermark on the center of video and add zoomIn animation to it?

Tried this:
-filter watermark:"welcome.jpg" in=0 out=320 composite.progressive=1 producer.align=centre composite.valign=middle composite.halign=center crop_to_fill=1 composite.geometry="0=0,0:80%x80%:0%;60=0,0:100%x100%:100%;260=0,0:120%x120%:100%;320=0,0:120%x120%:0%"
But it doesn't increase size of watermark, it just moves it to right bottom side...
I don't know of a way to animate a center zoom only using the watermark filter. But it is possible to animate a center zoom using the affine transition. You would need to use two tracks: one with the background video and another with the text to be animated. Here is an example:
melt color:blue in=0 out=320 -track welcome.jpg in=0 out=320 -transition affine valign=middle halign=center scale=1 fill=1 geometry="0=10%,10%:80%x80%:0%;60=0,0:100%x100%:100%;260=-10%,-10%:120%x120%:100%;320=-10%,-10%:120%x120%:0%"
The key is that the position of the watermark is relative to the left corner. So, in addition to animating the size, you also need to animate the x and y position as shown in the example.
Also note that the animation will interpolate the size and position for each frame - but the position is rounded to the nearest pixel. So the motion may not be smooth. That is a known limitation to the animation capabilities in MLT.

Print a 3D object animation in 2D

Here what I need to do is print the 3D animation transitions in my animation clip in 2D format. For example printing a human animation walking on paper. Is there a way to do this?
There are several aspects to consider:
Splitting the animation up into frames
Rendering the frame
Retrieving the rendered frame
Splitting the animation up into frames
Before you render a frame, you have to decide, which frame it should be. Depending on your requirements you may want to render only keyframes (frames that have been defined by the animation artist or the mocap data, but may not be evenly distributed over the duration of the animation), or to render frames that are evenly distributed over the duration of the animation (i.e. render one frame every 0.2 seconds).
Once you know the frame, you can tell the AnimationController to jump to that specific frame and update the 3D model accordingly.
Rendering the frame
Again, depending on your requirements, you may want to consider using a Camera with an orthographic projection. This will remove any perspective distortions, making it easier to visually analyze the animation. If of course the goal is a more visually appealing or "artistic" presentation, a perspective projection may be desired as well.
Retrieving the frame
As you want to print out the rendering, you need to retrieve the result of the rendering. You can do this either by letting Unity take a screenshot (Application.CaptureScreenshot), or by having a RenderTexture and setting this as the render target of your Camera. You can then copy the contents of the RenderTexture to a Texture2D (Texture2D.ReadPixels()) and save that to disk (Texture2D.EncodeToPNG/JPG())

Crop a video layer in an AVComposition

I'm using AVMutableComposition to position and composite two different video tracks for playback and export. I can easily scale and position the video tracks using AVMutableVideoCompositionLayerInstruction. This is all in the sample code.
However, what I need to do is crop one of the video layers. Not "effectively crop" as is done in the sample code by having the video frame overlap the side of the composition, but actually crop one of the layers being composited so the shape of the composited video is different but video is not distorted. In other words, I don't want to change the renderSize of the whole composition, just crop one of the composited layers.
Is this possible? Any ideas to make it happen? Thanks!
Have you tried the Cropping Settings? of AVMutableVideoCompositionLayerInstruction?

3D Max generate objects from animation frames, copy frames to viewport

Is it possible to copy all animation frames into separate objects in the viewport?
I am already using the Path Deformation and the Array tools, but they cannot (as far I know) animate materials. Also, their output cannot be edited with the curve editor??
Example:
I have a 30 frame animation of a rotating box moving along a path. Instead I would like 30 boxes in the viewport. Each one, a copy of its respective keyframe.
Sort of like the classic video technique of creating trails from moving objects. I know it can be done in After Effects, but I want to actual 3d models from my own custom animation frames, in the scene and not the results from Path Deformation and Array. Then I can work on them as a still image.
Select the object and use this maxscript code:
for i = 1 to 30 do at time i snapshot $
It will create a collapsed copy of the mesh at each frame.

Resources