Created
October 17, 2015 02:41
-
-
Save Birchwell/dba79f7289c3154decef to your computer and use it in GitHub Desktop.
This custom action will split video into clips according to a user defined number of seconds. Can be used with Thunar Custom Actions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
eval RES=($(yad --form --quoted-output --separator=" " --field "Input file:FL" --field "Output dir:DIR" --field "Duration:NUM")) | |
[[ $? -ne 0 ]] && exit 1 | |
ext=${RES[0]##*.} | |
out=$(basename ${RES[0]} .$ext) | |
$mkdir "${RES[2]}" | |
ffmpeg -i "${RES[0]}" -f segment -segment_time "${RES[2]}" -acodec copy -vcodec copy -reset_timestamps 1 -map 0 "${RES[1]}/$out-%d.$ext" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment