From b6182e9c17686511fb7104037672695f7c6b01bc Mon Sep 17 00:00:00 2001 From: Milan Santosi <milan.santosi@gmail.com> Date: Tue, 17 Apr 2012 03:44:52 +0200 Subject: [PATCH] fail :-( Signed-off-by: Milan Santosi <milan.santosi@gmail.com> --- kiss/ffmpeg_splitter.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/kiss/ffmpeg_splitter.sh b/kiss/ffmpeg_splitter.sh index 6e704f6..4b848d8 100755 --- a/kiss/ffmpeg_splitter.sh +++ b/kiss/ffmpeg_splitter.sh @@ -4,24 +4,21 @@ # seconds overlap (for upload to youtube) # USAGE: read comments and adjust where necessary, then: -# ./ffmpeg_splitter.sh <inputvideofile> +# ./ffmpeg_splitter.sh <inputfile> #################################################################### +# use globbing to get basename and extension. # see http://linuxgazette.net/18/bash.html fname=$1 # the file name bname=${fname%%.*} # the file basename ext=${fname#*.} # the file extension -# first, re-encode with every frame as keyframe -ffmpeg -g 1 -i cstex81-session01-100-new2.wmv - - - -for i in {1..5} # Assumption that no video is longer than 5*15=75min +for i in {1..5} # Naive assumption that no video is longer than + # 5*15=75min. Please adjust! do - ffmpeg -vcodec copy -acodec copy -ss $[i*890 - 890] -t 899.999 -i $1 ${$1%%.*}-part0$i.$(echo $1 | sed 's/.*\.//') + ffmpeg -vcodec copy -acodec copy -ss $[i*890 - 890] -t 899.999 -i $1 $bname-part0$i.$ext done -- GitLab