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. |
18th November 2008, 01:01 | #1 | Link |
Registered User
Join Date: Mar 2008
Posts: 30
|
x264 Pre scenecut Error
It's not a very significant bug, but with pre-scenecut on (or x264 is threaded), I get 38 of 51 frames as i-frames, and the others as p-frames. With pre-scenecut off I get only 3 i-frames. I observed the same 38/13 frame decision with threads=1 and pre-scenecut on.
The source is House Season 4 Episode 1 DVD. The clip is a dust cloud caused by a building collapsing. This is the stats file and the x264 output: http://pastebin.ca/1259842 Here is the source in y4m. I don't know how to frame-accurately cut a VOB (9MB): http://rapidshare.com/files/164818388/out.y4m.zip |
18th November 2008, 01:05 | #2 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Pre-scenecut tends to be more aggressive than scenecut, especially in the case of psy-RD, as psy-RD tends to bias against intra-blocks but is only taken into account in non-pre-scenecut.
It chose scenecuts there because those frames were basically completely uncorrelated: they were completely smoke-filled, leading to be basically nothing but grain, so this resulted in the entire sequence being encoded as I-frames. Generally, I think pre-scenecut tends to be more accurate. It might be an interesting project, sometime, however, to make pre-scenecut more adaptive to the effects and properties of psy-RD. Edit: Just tested, and even with psy-RD, there's no point in making them P-frames. The frames are over 80% i8x8 blocks at CRF18. It does get a bit less optimal at higher CRFs though.
__________________
Follow x264 development progress | akupenguin quotes | x264 git status ffmpeg and x264-related consulting/coding contracts | Doom10 Last edited by Dark Shikari; 18th November 2008 at 01:13. |
18th November 2008, 01:08 | #3 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Isn't it expected to get a different result with pre-scenecut, compared to pre-scenecut disabled ???
Also: Why do you think it is a bug? 38 of 51 frames as I-Frames sound like very much, but does it actually look worse with that specific sample?
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
18th November 2008, 01:22 | #4 | Link |
Registered User
Join Date: Mar 2008
Posts: 30
|
Thanks DarkShikari, I'll never doubt x264's pre-scenecut decision again!
@Lord_Mulder: I thought it was a bug because so many consecutive i-frames seemed suboptimal and the final bitrate of the pre-scenecut encode was over 2000kb/s greater than the scenecut encode. |
18th November 2008, 01:27 | #5 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Looking at the size of an encode alone doesn't help anything. It's the "quality to bitrate" ratio that matters. And 2-Pass is the only feasible way to compare that. A great number of consecutive I-Frames would only be sub-optimal for your source, if it looks worse at same bitrate/size. If pre-scenecut produces a bigger file in CRF mode, then it's almost impossible to decide whether the increase in quality is worth the increase in size or not...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 18th November 2008 at 01:30. |
|
20th November 2008, 02:58 | #7 | Link |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
This brings up a question I forgot to ask some time ago: When you have a run of uncorrelated frames like this, and you don't want to shovel a lot of extra bitrate into them, but don't want them to get all blurry, what can you do? I was thinking, encoder side, reduce deblocking so that it doesn't get too blurry on high quantizer, while selectively keeping high frequency bands for the illusion of a noisy source? (Blurring & blocking are far more noticeable than ringing at times like that, after all.) Without changing the encoder, I don't really know what to do even if I singled the frames out in a zone.
|
20th November 2008, 04:03 | #8 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|