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













1















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!










share|improve this question


























    1















    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!










    share|improve this question
























      1












      1








      1








      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!










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 13:48









      C.M.C.M.

      331412




      331412






















          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
          );



          );













          draft saved

          draft discarded


















          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















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현