Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance #10

Open
teb opened this issue Mar 17, 2023 · 2 comments
Open

Performance #10

teb opened this issue Mar 17, 2023 · 2 comments

Comments

@teb
Copy link

teb commented Mar 17, 2023

hi, is there a way to increase performance on this tool? I see on a 48core system that it uses 2% of the CPU, (1 core is using 50% = ffprobe), rest are sleeping. Is there a way to use ffprobe in multitreaded mode? or Use HW decoding instead?
I also checked the IO performance. My 8xRAID SSD was mearly sleeping during the process..

@slhck
Copy link
Owner

slhck commented Mar 17, 2023

Thanks for raising this issue. I think the only way to avoid this right now is to do a file-based parallelization (e.g. with GNU parallel.

We ultimately depend on ffprobe here. It may be faster to parse just the container (which will be enough to get the type of frame and its size) with dedicated parsing libraries, and restrict ourselves to work with MKV and MP4 containers only.

@slhck
Copy link
Owner

slhck commented Mar 17, 2023

Out of curiosity, do you see a speed difference between setting threads for ffprobe?

Because I get:

 
Summary
  'ffprobe -threads 0 -loglevel error -select_streams v -show_packets -show_entries packet=pts_time,dts_time,duration_time,size,flags -of json test/test.mp4' ran
    1.07 ± 0.48 times faster than 'ffprobe -threads 1 -loglevel error -select_streams v -show_packets -show_entries packet=pts_time,dts_time,duration_time,size,flags -of json test/test.mp4'
    1.16 ± 0.10 times faster than 'ffprobe -threads 32 -loglevel error -select_streams v -show_packets -show_entries packet=pts_time,dts_time,duration_time,size,flags -of json test/test.mp4'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants