Avidemux Forum

Avidemux => Windows => Topic started by: HugoNabais on November 13, 2024, 03:41:55 PM

Title: Questions about AviDemux
Post by: HugoNabais on November 13, 2024, 03:41:55 PM
So, I've been using Avidemux recently to edit, cut, and reencode 8k videos to 4k (I have some TVs that don't play well 8k videos)
I've been using Mpeg4 AVC x264 to encode in a mp4 file with the resize filter.
I have two Pcs, one main 5950X with 32 threads, and a i5-12400F with 12 threads.

My questions are:
 1º Why is Avidemux limited to 4 threads? In the codec x264 settings I can only set 1,2 or 4 threads, it takes many hours to encode those 8k to 4k files, but CPU usage in my 5950x is only at around 12% (4-5 threads working only).

 2º Since my workflow that I've explained only uses a max of 4 threads they take almost the same time in both my PCs, but it always is faster on the intel! Which is very strange, the AMD is around 30-40% slower! But every other software I use or bench is faster on the AMD. I'm using version 2.8.2, running from same network folder, all settings are equal on both. Does Avidemux run better on intel systems?


Other than these small things I would like to understand, the results are very good, and the edit GUI is very intuitive!
Title: Re: Questions about AviDemux
Post by: szlldm on November 13, 2024, 05:38:19 PM
You should use Auto-detect, then all cores will be used
Title: Re: Questions about AviDemux
Post by: HugoNabais on November 13, 2024, 10:13:42 PM
Quote from: szlldm on November 13, 2024, 05:38:19 PMYou should use Auto-detect, then all cores will be used

It's always on auto!
It only uses 4 threads!!
Title: Re: Questions about AviDemux
Post by: szlldm on November 13, 2024, 10:31:54 PM
Then i guess the botleneck is the decoding.
Title: Re: Questions about AviDemux
Post by: HugoNabais on November 14, 2024, 11:31:47 AM
I have the latest version of LAV video decoder that supports many threads... it's strange.
Is there another decoder I can try?
Title: Re: Questions about AviDemux
Post by: eumagga0x2a on November 14, 2024, 07:10:53 PM
The default for the x264 encoder plugin in Avidemux is to let the library (libx264) decide how many threads to use. That's true that Avidemux doesn't provide means to force a number of threads other than 1, 2 or 4.
Title: Re: Questions about AviDemux
Post by: HugoNabais on November 15, 2024, 11:20:34 AM
Quote from: eumagga0x2a on November 14, 2024, 07:10:53 PMThe default for the x264 encoder plugin in Avidemux is to let the library (libx264) decide how many threads to use. That's true that Avidemux doesn't provide means to force a number of threads other than 1, 2 or 4.

Any ideias on why on "auto" mine is only using 4 threads?
Title: Re: Questions about AviDemux
Post by: eumagga0x2a on November 15, 2024, 04:21:07 PM
This is presumably what libx264 developers think is best for the result. I need to read x264 source code to understand the details, don't have time for that ATM.
Title: Re: Questions about AviDemux
Post by: szlldm on November 16, 2024, 03:00:20 AM
My 5800X is usually fully utilized (16 threads) when running x264 encodings.
I'm still suspect decoding bottleneck in your case (8k source).
1) In Preferences/HW Accel try to disable all option, then in Preferences/Threading select Auto-detect. Do not forget to restart the program after this. Test the encoding.
2) If your hardware support decoding, also try enabling options in Preferences/HW Accel as well.
Title: Re: Questions about AviDemux
Post by: HugoNabais on November 18, 2024, 11:03:09 PM
Quote from: szlldm on November 16, 2024, 03:00:20 AMMy 5800X is usually fully utilized (16 threads) when running x264 encodings.
I'm still suspect decoding bottleneck in your case (8k source).
1) In Preferences/HW Accel try to disable all option, then in Preferences/Threading select Auto-detect. Do not forget to restart the program after this. Test the encoding.
2) If your hardware support decoding, also try enabling options in Preferences/HW Accel as well.


Your 5800X is using 16 threads but my 5950X is only using 4... So must me something on my side!

These are my preferences (default I think):
(https://i.ibb.co/qr18YrG/1.jpg)
(https://i.ibb.co/0GKqCv1/2.jpg)
(https://i.ibb.co/Nxjp6gJ/3.jpg)
(https://i.ibb.co/qN8sgD6/4.jpg)
Title: Re: Questions about AviDemux
Post by: eumagga0x2a on November 18, 2024, 11:10:55 PM
Make sure all default post-processing options are disabled (this is also the default, you must have inherited ancient settings with PP enabled). You ruin your videos with PP enabled.

If your source videos are high-bit-depth HDR videos, HDR to SDR conversion in Avidemux is very slow and performed on the CPU, even the "Fast YUV" one. Avidemux doesn't allow passing 10- or 12-bit images through the filter chain to video encoders, everything gets reduced to 8-bit 4:2:0.
Title: Re: Questions about AviDemux
Post by: HugoNabais on November 19, 2024, 10:32:27 PM
Quote from: eumagga0x2a on November 18, 2024, 11:10:55 PMMake sure all default post-processing options are disabled (this is also the default, you must have inherited ancient settings with PP enabled). You ruin your videos with PP enabled.

If your source videos are high-bit-depth HDR videos, HDR to SDR conversion in Avidemux is very slow and performed on the CPU, even the "Fast YUV" one. Avidemux doesn't allow passing 10- or 12-bit images through the filter chain to video encoders, everything gets reduced to 8-bit 4:2:0.

I can confirm that after disabling both Post processing deblocking options Avidemux now uses 100%, all 32 threads of my CPU! Now it runs really really nice (compared to using 4 threads)
A video that needed 4 hours now took less than 30 minutes!!

I have no idea why those options were enabled! Thanks everyone!