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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th February 2005, 18:54   #1  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
x264 bframes block on anime content

Hi

I have a strange blocking problem with x264 (b130 - b144):



This is with 3 bframes, I have something similar with none. Tested at 536kbps and 800kbps, 16 ref.
__________________
Detritus Software

Last edited by Sirber; 1st March 2005 at 01:23.
Sirber is offline   Reply With Quote
Old 26th February 2005, 19:08   #2  |  Link
Sagittaire
Testeur de codecs
 
Sagittaire's Avatar
 
Join Date: May 2003
Location: France
Posts: 2,487
inloop desactived ... ???
and 16 ref frames are useless
__________________
Le Sagittaire ... ;-)

1- Ateme AVC or x264
2- VP7 or RV10 only for anime
3- XviD, DivX or WMV9
Sagittaire is offline   Reply With Quote
Old 26th February 2005, 19:10   #3  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
activated, both setting at 0. It looks like over quantizating
Tryed with 1 ref, 0 bframes. Looks the same.
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 26th February 2005, 19:10   #4  |  Link
Tommy Carrot
Registered User
 
Tommy Carrot's Avatar
 
Join Date: Mar 2002
Posts: 857
There can be 2 reasons. FFdshow doesn't deblock the b-frames (but Akupenguin already committed the b-frames deblocker code into ffmpeg, so we just have to wait until ffdshow gets updated too), and it's also possible that the flawed decoding of weighted prediction causes the heavy blocking (see this thread), which is also fixed in libavcodec, but not in ffdshow.
Tommy Carrot is offline   Reply With Quote
Old 26th February 2005, 20:35   #5  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
It's not bweighted prediction ( rev130 didn't have it ). It's not deblocking on bframes ( since without bframes, the problem is still there ).

What was the quantizer of that particular frame you showed us ?
Manao is offline   Reply With Quote
Old 27th February 2005, 16:48   #6  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
Around 40. I'll redo some tests.
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 27th February 2005, 16:51   #7  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
40 ??? You disabled in loop deblocking then. That or you were wrong when you stated previously that even without bframes, you're getting these blocks
Manao is offline   Reply With Quote
Old 27th February 2005, 17:06   #8  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
I just made two tests, one with bframes and one whitout. It seems in my older tests bframes were at 3 (screenshot and the other test with ref at 1, but bframes at 3).

The test whitout bframes has no blocks and quant is ~30. With bframes (3), quants goes up to 40 for bframes and ~26 for P. By default, settings for bfrrmes are "Reduce 30%", maybe that's why..
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 27th February 2005, 17:11   #9  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
Ok, so it's indeed a combination of lack of inloop deblocking on bframes ( will soon be corrected in ffdshow, already corrected in ffmpeg if i'm not mistaken ) and very high quantizers ( or too low bitrates ).

Even with bframe deblocking, you might want to lower the bframe reduce factor to 20 %
Manao is offline   Reply With Quote
Old 27th February 2005, 17:13   #10  |  Link
dragongodz
....
 
dragongodz's Avatar
 
Join Date: May 2002
Location: Australia
Posts: 2,797
can you try increasing ref (say 5) for 3 B frames ? or even test with just 1 B frame ?
__________________
Narrator: And of course, with the birth of the artist came the inevitable afterbirth - the critic. (History of the World part 1)
dragongodz is offline   Reply With Quote
Old 27th February 2005, 17:13   #11  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
My bitrate goal is 536kbps (600kbps with audio). Should I disable bframe reduce %?

Quote:
Originally posted by dragongodz
can you try increasing ref (say 5) for 3 B frames ? or even test with just 1 B frame ?
With 1 ref or 16 ref, same problem.
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 27th February 2005, 17:22   #12  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,855
Try to lower it to 1.1 / 1.2, to see if it's better
Manao is offline   Reply With Quote
Old 27th February 2005, 17:29   #13  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
I'll retry that when the new ffdshow with deblocking will be avalible.

Thanks for the help!
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 28th February 2005, 21:56   #14  |  Link
DeathTheSheep
<The VFW Sheep of Death>
 
DeathTheSheep's Avatar
 
Join Date: Dec 2004
Location: Deathly pasture of VFW
Posts: 1,149
In a previous thread entitled "The Coolness of B-Frames," I've outlined a similar problem.

The problem is, extreme blocking occurs in anime encodes with 1 or more b-frames.

Try using 0 or 1 b-frame(s), and set reference frames to 15. You may want to increase the bitrate just a *tiny* bit to compensate for the immediate quantization decrease (no more than 10-15%).

You will see marked improvement, especially if all settings are checked (except B-frame search if using 0 b-frames, which is recommended for anime).

Bi-directional prediction of exteremely fast-moving content (like that Naruto intro, when the clouds are moving at 400mph) or choppy content (such as animation characters, which don't move with the liquid motion of people), tends to be absolutely terrible, even with deblocking, which reduces detail considerably on b-frames. (And I daresay they had reletively no detail to begin with).

Solution: Use max settings with 0 b-frames, 15 refs (or 1-bframe if you're desperate).

Cheers!
__________________
Recommended all-in-one stop for x264/GCC needs on Windows: Komisar x264 builds!
DeathTheSheep is offline   Reply With Quote
Old 28th February 2005, 23:07   #15  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
Better wait when deblocking will be working on ffdshow. BFrames are really good to lower the bitrate... and I love lower bitrate
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 1st March 2005, 02:08   #16  |  Link
hpn
Registered User
 
Join Date: Jan 2005
Posts: 191
Your screenshot actually looks very decent. An average DVD encode with almost no or very little downsizing (W-Zoom 95% to 98%) usually has a 688x288 frame size, or 744 16x16 blocks. In your case the frame size is 640x480 or 1200 16x16 blocks. It means that your 536kbps encode has the same quality as a 9/16 DVD encode at 332kbps! (744/1200x536). I don't think in this case you could expect miracles from your encode and maybe at such a low bitrate ffdshow simply does not trigger the deblocking part (not sure about it however), trying to preserve as much picture contrast as possible, otherwise you'll really get a blocking-free picture but so blurred out that no text would be readable. Just try the same encode at about 900-1000kbps and if the blocking persists this maybe really a bug that needs to be fixed.
hpn is offline   Reply With Quote
Old 1st March 2005, 02:10   #17  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
I don't have that blocking issue with RV10 or VP6. IMO it's really a decoder problem (deblock bframes) as well as untuned bframes % (my bad).
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 1st March 2005, 11:24   #18  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,779
Quote:
Originally posted by Sirber
[B]Better wait when deblocking will be working on ffdshow.
ffmpeg does it already, now only milan needs to update to the latest libavcodec
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 1st March 2005, 13:00   #19  |  Link
Sirber
retired developer
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,978
Yeah, I know. That's why I'm waiting...
__________________
Detritus Software
Sirber is offline   Reply With Quote
Old 1st March 2005, 19:13   #20  |  Link
hellfred
FFmpeg fan
 
Join Date: Dec 2003
Location: Germany
Posts: 427
mplayer

Quote:
Originally posted by Sirber
Yeah, I know. That's why I'm waiting...
Sirber, just help yourself to a homegrown mplayer win32 binary. Once MinGW/MSYS is set up, you get it in 30 minutes on a PIII 550MHz - and can easily link it to latest x264 for encoding, which by the way, gets compiled in less than 5 minutes in my system.

Hellfred
hellfred is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.