Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
materials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
materials
Commits
b6182e9c
Commit
b6182e9c
authored
13 years ago
by
Milan Santosi
Browse files
Options
Downloads
Patches
Plain Diff
fail :-(
Signed-off-by:
Milan Santosi
<
milan.santosi@gmail.com
>
parent
11317e73
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
kiss/ffmpeg_splitter.sh
+5
-8
5 additions, 8 deletions
kiss/ffmpeg_splitter.sh
with
5 additions
and
8 deletions
kiss/ffmpeg_splitter.sh
+
5
−
8
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment