Jump to content

Easy Video Trimmer


iamtheky
 Share

Recommended Posts

This ffmpeg snippet has proven useful more than once, so figured I would share.

$file = FileOpenDialog("Select Video" , @ScriptDir , "ALL(*.*)")

$start = inputbox( "Start Time" , "Enter Capture Start Time in Seconds - 0 is the beginning")
$length = inputbox ("Length of Capture" , "Enter the desired duration (in seconds) of the output video")

run("ffmpeg -sameq -ss " & $start & " -t " & $length & " -i " & $file & " " & stringtrimright($file , 4) & "_output.mp4")

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...