Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
M
materials
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
osak
materials
Commits
b6182e9c
Commit
b6182e9c
authored
Apr 17, 2012
by
Milan Santosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fail :-(
Signed-off-by:
Milan Santosi
<
milan.santosi@gmail.com
>
parent
11317e73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
kiss/ffmpeg_splitter.sh
kiss/ffmpeg_splitter.sh
+5
-8
No files found.
kiss/ffmpeg_splitter.sh
View file @
b6182e9c
...
...
@@ -4,24 +4,21 @@
# seconds overlap (for upload to youtube)
# USAGE: read comments and adjust where necessary, then:
# ./ffmpeg_splitter.sh <input
video
file>
# ./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
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