Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
16th September 2021, 23:50 | #1 | Link |
Registered User
Join Date: Aug 2017
Posts: 58
|
x264 "threads" quality problem
Hi,
I'm dealing with a very grainy video, I tried to reduce threads to 1 to help improving quality a bit but looking at the result it seems to me that the default thread settings for me (threads = 6) gives better results in many of my tests with several bitrates. It's odd because AFAIK low threads implies better quality. I was wondering if it was because of the grainy source causing more random results (or something else) and if threads=1 is really better whatever the source is ? Thank you |
17th September 2021, 01:15 | #2 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
It is slice-based threading that can have a certain detrimental effect on quality. That is what x264 used in the early days (and is still available as an option, for low-latency scenarios).
Nowadays, x264 uses frame-based threading, by default. And, with frame-based threading, the effect of the thread count on quality should really be negligible. But I don't see how using more threads could actually improve the result. So, the question is, how exactly did you determine that the result with more threads is "better" than with one thread? BTW: You could try adding "--non-deterministic" in order to slightly improve quality. By default, x264 enforces deterministic behavior when using multiple threads. This option removes the restriction (at the cost of repeatability). See also: https://raw.githubusercontent.com/jp...oc/threads.txt
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 17th September 2021 at 01:34. |
17th September 2021, 03:45 | #3 | Link | |
Registered User
Join Date: Aug 2017
Posts: 58
|
Quote:
Then I noticed that in several occurrences threads=1 seemed worse to me, which is strange. |
|
17th September 2021, 03:51 | #4 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
|
Were the file sizes the same?
__________________
madVR options explained |
17th September 2021, 04:12 | #6 | Link |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
|
And you aren't comparing I-frames to P-frames or P-frames to B-frames?
__________________
madVR options explained |
17th September 2021, 21:45 | #8 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Also, to my understanding, x264 is deterministic as long as you are encoding with the exactly same settings and option "--non-deterministic" was not set. By changing the number of threads you are changing the encoding settings, though. This means that results won't be exactly same. It's a bit like rolling the dice again. Even though the differences should be very small, things could happen to come out slightly "better" in some frames, and slightly "worse" in other frames. So, unless "threads=1" consistently looks worse than "threads=6", with various different sources, and not just in a few selected frames, I wouldn't worry too much
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 17th September 2021 at 21:53. |
|
18th September 2021, 00:58 | #9 | Link | |
Registered User
Join Date: Aug 2017
Posts: 58
|
Quote:
Thank you |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|