Coder Social home page Coder Social logo

Comments (7)

eibol avatar eibol commented on August 15, 2024

Hi, thanks for the information. I'm afraid it is an undesired behaviour of the parallel encoding, it partitions all the file list in n-threads blocks, starts sequentially, but after a while it starts with the first item of every n-thread block, thus creating that annoying effect.

I have not found yet a way to solve it, it would require a complete rewriting.

By the way, this patched version should display Video codec column properly.

from ffmpeg_batch.

lchiocca avatar lchiocca commented on August 15, 2024

I had a quick look at the code. I haven't played around a lot with c# but from what I can tell, you are using the "Parallel.ForEach" to run the individual tasks. I think - based on microsoft examples - that you could simply create a task scheduler and pass it through the ParallelOptions. The example I found online was https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskscheduler?view=net-7.0. If you look at the example it defines a LimitedConcurrencyLevelTaskScheduler that takes the maxDegreeOfParallelism as a constructor parameter. You can probably then pass a new instance of that class to the ParallelOptions.TaskScheduler and it should probably work :)

from ffmpeg_batch.

johnloopi avatar johnloopi commented on August 15, 2024

By the way, this patched version should display Video codec column properly.

Thanks for that patched version, @eibol
Will this bug be fixed in 3.0.2 or should anyone with this issue download the patched version and replace it with the one they currently have?

from ffmpeg_batch.

eibol avatar eibol commented on August 15, 2024

Hi, versión 3.0.2 will be released soon. Another seldom issue with columns showed up.

from ffmpeg_batch.

eibol avatar eibol commented on August 15, 2024

I had a quick look at the code. I haven't played around a lot with c# but from what I can tell, you are using the "Parallel.ForEach" to run the individual tasks. I think - based on microsoft examples - that you could simply create a task scheduler and pass it through the ParallelOptions. The example I found online was https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskscheduler?view=net-7.0. If you look at the example it defines a LimitedConcurrencyLevelTaskScheduler that takes the maxDegreeOfParallelism as a constructor parameter. You can probably then pass a new instance of that class to the ParallelOptions.TaskScheduler and it should probably work :)

Thanks for the suggestion. I tried the example but it is displays a compilation error.
Anyways, I've been playing with this minor annoyance and it would require a complete rewrite I cannot face, also forcing a sequential processing can slightly reduce performance. Since I'd like to keep gui part as light as possible so encoding performance is as close as command line alone, I have to keep it this way for the time being.

from ffmpeg_batch.

eibol avatar eibol commented on August 15, 2024

@lchiocca I've been testing some promising changes to keep multi-file encoding as ordered as possible.
If you want to try it just use this beta version.

It does not seem to affect performance either.

from ffmpeg_batch.

eibol avatar eibol commented on August 15, 2024

Also, this beta version could fix the thread lossing when reaching the end of the multi-file encoding list.

from ffmpeg_batch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.