Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg-stabilizer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Richard Torenvliet
ffmpeg-stabilizer
Commits
e46c9660
Commit
e46c9660
authored
Nov 22, 2017
by
Richard Torenvliet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
0 deletions
+96
-0
convert.sh
convert.sh
+38
-0
makefile
makefile
+3
-0
stablize.sh
stablize.sh
+55
-0
No files found.
convert.sh
0 → 100755
View file @
e46c9660
#!/bin/bash
if
[
$#
-lt
2
]
;
then
echo
"missing arguments:"
echo
"usage
$0
<video> <options>"
exit
1
fi
video
=
$1
output_video
=
$2
echo
"output_video"
$2
#options=$2
base
=
$(
basename
"
$output_video
"
)
extension
=
"
${
base
##*.
}
"
base_filename
=
"
${
base
%.*
}
"
transform_file
=
"converted/
$base_filename
.trf"
output_merged
=
"converted/
$base_filename
-stb
$opts
-merged.
$extension
"
echo
"ffmpeg -i
$video
$options
-vf vidstabdetect=shakiness=8:accuracy=15:result=
$transform_file
-f null -"
echo
"Options"
echo
$options
echo
"==="
if
[
-z
"
$options
"
]
;
then
echo
"No time limit"
ffmpeg
-y
-i
$video
-vf
vidstabdetect
=
shakiness
=
5:accuracy
=
15:result
=
$transform_file
-f
null -
ffmpeg
-y
-i
$video
-vf
\
vidstabtransform
=
smoothing
=
5:interpol
=
bicubic:input
=
$transform_file
,unsharp
=
5:5:0.8:3:3:0.4
$output_video
ffmpeg
-y
-i
$video
-i
$output_video
-filter_complex
"[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w"
$output_merged
fi
if
[
-n
"
$options
"
]
;
then
echo
"Time limit"
ffmpeg
-y
-i
$video
$options
-vf
vidstabdetect
=
shakiness
=
5:accuracy
=
15:result
=
$transform_file
-f
null -
ffmpeg
-y
-i
$video
$options
-vf
\
vidstabtransform
=
smoothing
=
5:interpol
=
bicubic:input
=
$transform_file
,unsharp
=
5:5:0.8:3:3:0.4
$output_video
ffmpeg
-y
$options
-i
$video
-i
$output_video
-filter_complex
"[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w"
$output_merged
fi
makefile
0 → 100644
View file @
e46c9660
converted/%.MOV
:
./convert.sh
$(VIDEO)
$@
"
$(OPTIONS)
"
stablize.sh
0 → 100755
View file @
e46c9660
#!/bin/bash
if
[
$#
-ne
1
]
;
then
echo
"missing arguments:"
echo
"usage
$0
<list>"
exit
1
fi
tmpIFS
=
$IFS
while
IFS
=
''
read
-r
var
do
video
=
`
echo
"
$var
"
|
cut
-f1
-d
','
`
video
=
`
echo
$video
|
sed
's/,//g'
`
options
=
`
echo
"
$var
"
|
cut
-f2
-d
','
`
base
=
$(
basename
"
$video
"
)
extension
=
"
${
base
##*.
}
"
base_filename
=
"
${
base
%.*
}
"
transform_file
=
"converted/
$base_filename
.trf"
opts
=
$(
echo
$options
|
sed
's/\ //g'
)
opts
=
$(
echo
$opts
|
sed
's/:/-/g'
)
opts
=
$(
echo
$opts
|
sed
's/\"//g'
)
output_video
=
"converted/
$base_filename
-stb
$opts
.
$extension
"
output_merged
=
"converted/
$base_filename
-stb
$opts
-merged.
$extension
"
#echo $output_video
echo
$video
original_video
=
$(
echo
$output_video
|
sed
's/\(.*\)\(-stb.*\)\(.MOV$\)/\1\3/g'
)
#echo $derp
echo
$tmpIFS
IFS
=
$tmpIFS
if
[
-z
"
$options
"
]
;
then
VIDEO
=
$video
make
$output_video
;
fi
if
[
-n
"
$options
"
]
;
then
VIDEO
=
$video
OPTIONS
=
$options
make
$output_video
;
fi
done
<
"
$1
"
# for t in $ALL_TARGETS; do IFS=" " ;
# video=`echo $$t | cut -f1 -d ','`
# options=`echo $$t | cut -f2 -d ','`
# base=`basename $video`
# extension=MOV
# base_filename=`echo $base | sed 's/.MOV//g'`
# transform_file="converted/$base_filename.trf"
# opts=`echo $options | sed 's/\ //g'`
# opts=`echo $opts | sed 's/:/-/g'`
# output_video="$base_filename-stb$opts.$extension"
# output_merged="$base_filename-stb$opts-merged.$extension"
# #MOVIE=echo $t | cut -f1 -d ',' "OPT=${echo $t | cut -f2 -d ','}" make $output_video
# done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment