retour

Twist



Jar executable can be downloaded here: Twist.jar release 0.1
ffmpeg is requested by Twist.jar, and it can be downloaded here: https://www.ffmpeg.org/download.html
Source code is here: Twist.java

You can find below examples of parameters usage:

java -jar Twist.jar -input myvideo.mp4 twist myvideo.mp4 with a rotation of 1000 frames, naming the output video "myvideo.mp4.twisted.mp4"
java -jar Twist.jar -input mydirectory generate a rotation of 1000 frames based on all images files in mydirectory named i0001.png, i0002.png, ...
java -jar Twist.jar -input myvideo.mp4 -definition 400:300 set output film definition to (width, height) = (400, 300), which is strongly recommanded in order to make a preview of the video, because full definition can be time consuming
java -jar Twist.jar -input myvideo.mp4 -definition 108 set output film definition to height = 108 and width respecting the input video width / height ratio; e.g. if input is a 1920x1080 video, the output will be 192x108.
java -jar Twist.jar -input myvideo.mp4 -output mynewvideo.mp4 do the same as above, but naming the output video mynewvideo.mp4
java -jar Twist.jar -input myvideo.mp4 -output mydirectory do not generate the final video file, and just keep the generated image files
java -jar Twist.jar -input myvideo.mp4 -frames 200:100:499 take 200 frames, starting from frame 100 to frame 499
java -jar Twist.jar -input myvideo.mp4 -frames 200 take 200 frames, starting from the first frame of the input video to the last one
java -jar Twist.jar -input myvideo.mp4 -crop 100:200:300:400 take a sub set of the frames, from point (x,y) = (100,200) with (width, height) = (300,400)
java -jar Twist.jar -input myvideo.mp4 -ffmpeg "c:\foo\bar" allow to specify ffmpeg directory, default value is in the current directory
java -jar Twist.jar -input myvideo.mp4 -keep twist the video, keeping when finished all generated intermediate images files
java -jar Twist.jar -input myvideo.mp4 -keep input twist the video, keeping when finished all generated intermediate images files based on input video
java -jar Twist.jar -input myvideo.mp4 -keep output twist the video, keeping when finished all generated images files necessary to produce output video
java -jar Twist.jar -input myvideo.mp4 -move oscillation twist the video with an oscillation of the frames plane, with a vertical rotation axe going through the center of the cube, with 1000 frames and a minimum and maximum angle of -pi / 8 and pi / 8
java -jar Twist.jar -input myvideo.mp4 -move oscillation:200 twist the video with an oscillation of the frames plane, with a vertical rotation axe going through the center of the cube, with 200 frames and a minimum and maximum angle of -pi / 8 and pi / 8
java -jar Twist.jar -input myvideo.mp4 -move oscillation:200:0.2 twist the video with an oscillation of the frames plane, with a vertical rotation axe going through the center of the cube, with 200 frames and a minimum and maximum angle of -0.2 radian and 0.2 radian
java -jar Twist.jar -input myvideo.mp4 -move rotation twist the video with a complete rotation of the frames plane, with a vertical rotation axe going through the center of the cube, with 1000 frames
java -jar Twist.jar -input myvideo.mp4 -move rotation:200 twist the video with a complete rotation of the frames plane, with a vertical rotation axe going through the center of the cube, with 200 frames
java -jar Twist.jar -input myvideo.mp4 -move linear:0:0.5 twist the video with a linear movement fo the frames plane, from the very first frame to 0.5 of the video, i.e. the middle of the video
java -jar Twist.jar -input myvideo.mp4 -move square:200 twist the video with a complete rotation of the frames plane, with a vertical rotation axe going through the center of the cube, with 200 frames; whereas whte "rotation" argument, the frames follows a cylinder, with "square" argument, the edge of the frames follows the voxels cube.
java -jar Twist.jar -input myvideo.mp4 -move curved:600:0.5:0.5:0.5:0.25:0:0.25:0.17:0.17:6 twist the video in curving the frames plane smoothly: the movement last 600 frames, the curve orbits around the a center which is at (0.5, 0.5, 0.5), i.e. the center of the voxels cube, the orbit has a (xRadius, yRadius, frameRadius) = (0.25, 0, 0.25), the bump is elliptic orientied in frames axis with (widthBump, heightBump) = (0.17, 0.17) and the power applied is 6 to define the bump shape.
java -jar Twist.jar -input myvideo.mp4 -move linear:0:0.5~oscillation:200:0.2~rotation:600~curved:600:0.5:0.5:0.5:0.25:0:0.25:0.17:0.17:6~linear:0.5:1 movements can be chained using "~" as in this example, start with a lnear movement, followed by an ascillation, a rotation and a final linear movement.
java -jar Twist.jar -i myvideo.mp4 -m l:0:0.5~o:200:0.2~r:600~c:600:0.5:0.5:0.5:0.25:0:0.25:0.17:0.17:6~l:0.5:1 the first letter of each parameter and argument can be used in order to have a shorter command line


retour