ffmpeg fast but accurate seek in aviConverting avi to mp4: audio is out of syncBest video format using ffmpeg converterAVI to MP4 - ffmpeg conversionFFMPEG fixing broken or wrong video containers extensionsffmpeg dump specific length of video after seeking PICT_TYPE_I keyframeffmpeg convert multiple files from avi dv video (dvsd) to avi h.264 + mp3(mp4)FFMPEG Batch Convert for Windowsffmpeg exact start and end timesHow to cut and merge avi videos with javaConverting AVI vid with ffmpeg results in readable but corrupt output
MAXDOP Settings for SQL Server 2014
Longest common substring in linear time
Indicating multiple different modes of speech (fantasy language or telepathy)
Folder comparison
Can I use my Chinese passport to enter China after I acquired another citizenship?
Drawing ramified coverings with tikz
We have a love-hate relationship
Divine apple island
Translation of Scottish 16th century church stained glass
anything or something to eat
A Permanent Norse Presence in America
Freedom of speech and where it applies
Can a significant change in incentives void an employment contract?
Should I install hardwood flooring or cabinets first?
Gibbs free energy in standard state vs. equilibrium
Journal losing indexing services
Is it improper etiquette to ask your opponent what his/her rating is before the game?
A social experiment. What is the worst that can happen?
Why does Async/Await work properly when the loop is inside the async function and not the other way around?
Could solar power be utilized and substitute coal in the 19th Century
If a character with the Alert feat rolls a crit fail on their Perception check, are they surprised?
Visiting the UK as unmarried couple
How should I respond when I lied about my education and the company finds out through background check?
Is a model fitted to data or is data fitted to a model?
ffmpeg fast but accurate seek in avi
Converting avi to mp4: audio is out of syncBest video format using ffmpeg converterAVI to MP4 - ffmpeg conversionFFMPEG fixing broken or wrong video containers extensionsffmpeg dump specific length of video after seeking PICT_TYPE_I keyframeffmpeg convert multiple files from avi dv video (dvsd) to avi h.264 + mp3(mp4)FFMPEG Batch Convert for Windowsffmpeg exact start and end timesHow to cut and merge avi videos with javaConverting AVI vid with ffmpeg results in readable but corrupt output
I've built a small pipeline to automatically cut and enhance video files which I recorded.
I detect scenes by using the ffmpeg's select='gt(scene,0.4)',showinfo
filter. After parsing these information I run ffmpeg
for each scene to produce single video files for them, for example:
ffmpeg -y -i test.avi -ss 00:00:00.00 -to 00:00:54.61 -c copy test_1.avi
ffmpeg -y -i test.avi -ss 00:00:54.61 -to 00:01:38.21 -c copy test_2.avi
ffmpeg -y -i test.avi -ss 00:01:38.21 -to 00:01:59.45 -c copy test_3.avi
[...]
As you can see I use the -ss
and -to
parameters to specify where the output files should start and end. This is working very well but it becomes very, very slow over time since my original file size is ~50 gigabytes.
I guess that -ss
lets ffmpeg seek from the beginning of the original file to the start time as I can observe disk action when seeking.
Placing the -ss
param before the -i
input file is faster but very inaccurate (off by some seconds).
Is there maybe any trick to increase the cut/trim performance without losing the accuracy?
I also tried to convert the input file to MP4 which decreases the file size and seek time significantly. But then I had keyframe errors and I want to operate on the original files.
Thank you!
ffmpeg
add a comment |
I've built a small pipeline to automatically cut and enhance video files which I recorded.
I detect scenes by using the ffmpeg's select='gt(scene,0.4)',showinfo
filter. After parsing these information I run ffmpeg
for each scene to produce single video files for them, for example:
ffmpeg -y -i test.avi -ss 00:00:00.00 -to 00:00:54.61 -c copy test_1.avi
ffmpeg -y -i test.avi -ss 00:00:54.61 -to 00:01:38.21 -c copy test_2.avi
ffmpeg -y -i test.avi -ss 00:01:38.21 -to 00:01:59.45 -c copy test_3.avi
[...]
As you can see I use the -ss
and -to
parameters to specify where the output files should start and end. This is working very well but it becomes very, very slow over time since my original file size is ~50 gigabytes.
I guess that -ss
lets ffmpeg seek from the beginning of the original file to the start time as I can observe disk action when seeking.
Placing the -ss
param before the -i
input file is faster but very inaccurate (off by some seconds).
Is there maybe any trick to increase the cut/trim performance without losing the accuracy?
I also tried to convert the input file to MP4 which decreases the file size and seek time significantly. But then I had keyframe errors and I want to operate on the original files.
Thank you!
ffmpeg
add a comment |
I've built a small pipeline to automatically cut and enhance video files which I recorded.
I detect scenes by using the ffmpeg's select='gt(scene,0.4)',showinfo
filter. After parsing these information I run ffmpeg
for each scene to produce single video files for them, for example:
ffmpeg -y -i test.avi -ss 00:00:00.00 -to 00:00:54.61 -c copy test_1.avi
ffmpeg -y -i test.avi -ss 00:00:54.61 -to 00:01:38.21 -c copy test_2.avi
ffmpeg -y -i test.avi -ss 00:01:38.21 -to 00:01:59.45 -c copy test_3.avi
[...]
As you can see I use the -ss
and -to
parameters to specify where the output files should start and end. This is working very well but it becomes very, very slow over time since my original file size is ~50 gigabytes.
I guess that -ss
lets ffmpeg seek from the beginning of the original file to the start time as I can observe disk action when seeking.
Placing the -ss
param before the -i
input file is faster but very inaccurate (off by some seconds).
Is there maybe any trick to increase the cut/trim performance without losing the accuracy?
I also tried to convert the input file to MP4 which decreases the file size and seek time significantly. But then I had keyframe errors and I want to operate on the original files.
Thank you!
ffmpeg
I've built a small pipeline to automatically cut and enhance video files which I recorded.
I detect scenes by using the ffmpeg's select='gt(scene,0.4)',showinfo
filter. After parsing these information I run ffmpeg
for each scene to produce single video files for them, for example:
ffmpeg -y -i test.avi -ss 00:00:00.00 -to 00:00:54.61 -c copy test_1.avi
ffmpeg -y -i test.avi -ss 00:00:54.61 -to 00:01:38.21 -c copy test_2.avi
ffmpeg -y -i test.avi -ss 00:01:38.21 -to 00:01:59.45 -c copy test_3.avi
[...]
As you can see I use the -ss
and -to
parameters to specify where the output files should start and end. This is working very well but it becomes very, very slow over time since my original file size is ~50 gigabytes.
I guess that -ss
lets ffmpeg seek from the beginning of the original file to the start time as I can observe disk action when seeking.
Placing the -ss
param before the -i
input file is faster but very inaccurate (off by some seconds).
Is there maybe any trick to increase the cut/trim performance without losing the accuracy?
I also tried to convert the input file to MP4 which decreases the file size and seek time significantly. But then I had keyframe errors and I want to operate on the original files.
Thank you!
ffmpeg
ffmpeg
asked Mar 21 at 13:48
C.M.C.M.
331412
331412
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55281935%2fffmpeg-fast-but-accurate-seek-in-avi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55281935%2fffmpeg-fast-but-accurate-seek-in-avi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown