Code Monkey home page Code Monkey logo

Comments (4)

porcino avatar porcino commented on July 28, 2024 1

I tested the scene detection with a 4k hdr source and the same but downscaled to 720, the speed was 1.33x vs 1.32x. I knew the bottleneck is the cpu decoding speed.
A possibility is to use the gpu to decode, but in my experience this is unreliable, it fails with some encodes and the gpu variations decode different formats.
But, I still can speed up the detection using more than one process, on my pc the decoding use 25% or less cpu, so at least we can use three processes. I'll do it when I have time because I need to change the worst code in the program xd

from av1ador.

Anacondo avatar Anacondo commented on July 28, 2024

Just for context I ran a quick test on my system (Ryzen 5950x w/ 64GB RAM) and this is how long it took to detect the scenes:

Video 1 (4K, 2h12m): 15min
Video 2 (1080p, 1h47m): 4min

from av1ador.

Anacondo avatar Anacondo commented on July 28, 2024

Haha, ok mate, no problem. Thanks a lot! Any way I can help? I can try to investigate the command line for ffmpeg to add more threads if you point me to the place in the code where it's used.

from av1ador.

porcino avatar porcino commented on July 28, 2024

Haha, ok mate, no problem. Thanks a lot! Any way I can help? I can try to investigate the command line for ffmpeg to add more threads if you point me to the place in the code where it's used.

Sure but I think ffmpeg doesn't have that option.
I added multhreading to the scene detection when the video is large, with a maximun 3 ffmpeg processes, check if this helps

from av1ador.

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.