Video Editor Plugin
This plugin allows you to trim videos, merge two videos into one, get video info (Duration, size, width, height), and get a thumbnail(image) of specific second in a video.
Platforms:
this plugin only works with iOS and AndroidFunctions:
videoEditor.createThumbnail(videoInput, imageOutput, atTime, imageWidth, imageHeight, quality)
videoInput(string) video file path via system.pathForFile
imageOutput(string) image output path via system.pathForFile
atTime (number) second to get image from video
imageWidth (number) image width
imageHeight (number) image height
quality (number) image quality (1-100, 100 = high quality)
videoEditor.trim(videoInput, startTime, endTime, videoOutput, listener)
videoInput(string) video file path via system.pathForFile
startTime (number) second to start trim
endTime (number) second to end trim
imageHeight (number) image height
videoOutput(string) video output path via system.pathForFile
listener (function) returns event.isError if true then an error occured, if false then it was a success
videoEditor.getVideoInfo(videoInput)
-- output table with key value pairs: width(number), height(number), orientation(string, values: "portrait", "landscape"), duration(number), size(number, bytes of file), bitrate (number)videoInput(string) video file path via system.pathForFile
videoEditor.mergeVideos(videoInput1, videoInput2, videoOutput, listener)
videoInput1(string)first video to merge file path via system.pathForFile
videoInput2(string)second video to merge file path via system.pathForFile
videoOutput(string) video output path via system.pathForFile
listener (function) returns event.isError if true then an error occured, if false then it was a success
videoEditor.cropVideo(videoInput, videoOutput, width, height, listener)
--"important" make sure the crop width and height is smaller video width and heightvideoInput(string) video to crop file path via system.pathForFile
videoOutput(string) video output path via system.pathForFile
width(number)crop video width system.pathForFile
height(number)crop video height system.pathForFile
listener (function) returns event.isError if true then an error occured, if false then it was a success