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 17th June 2006, 02:11   #1  |  Link
futurex
Registered User
 
Join Date: Mar 2005
Posts: 155
Preserving grain

Hello,

I am using megui to encode mpeg2 to x264, but noticed a considerable quality loss due to deblocking which i put on -3,-2. i know i can disable deblocking but that ofcourse will introduce artefacts. the problem is that in removing grain it removes detail as well, like

original:



x264:



is there any way to preserve grain? this happens even with good bitrates, 1300kb/s at 704x400. i use sharktooth HQ slowest profile except i changed the deblocking to -3, -2. i searched and saw mentioned sharktooths matrix but it didnt help. i am new to megui so please be gentle if there is a setting for this!

Last edited by futurex; 17th June 2006 at 02:16.
futurex is offline   Reply With Quote
Old 17th June 2006, 03:20   #2  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,926
@futurex that is normal without FGS support you won't be able to preserve this kind of Details @ those Low Bitrates and to turn of deblocking the bitrate in your case is to low too, so you have to life with blocks in high motion sequences or you prefer the detail lose thats up to you another possibility would be to use a higher bitrate.
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004

Last edited by CruNcher; 17th June 2006 at 03:24.
CruNcher is offline   Reply With Quote
Old 17th June 2006, 03:36   #3  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
if you can "live" with bitrates around 1600kbps and higher you can try my EQM AVC-HR custom matrix, it should help preserving grain and reducing blocking.

Last edited by Sharktooth; 17th June 2006 at 03:48.
Sharktooth is offline   Reply With Quote
Old 17th June 2006, 04:44   #4  |  Link
futurex
Registered User
 
Join Date: Mar 2005
Posts: 155
thanks cruncher and sharktooth, i'll encode a short clip at 1600kbps and see what it looks like :-)
futurex is offline   Reply With Quote
Old 17th June 2006, 08:49   #5  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
futurex : why would you try to preseve the "grain" of a so bad looking source ? Seing how overshapped it is, what you see isn't grain, it's plain noise enhanced by the sharpening. If you want noise at playback, just add it with ffdshow. ( Imho, even if you don't want noise, you should add it, because it will enhance the visual impression )
__________________
Manao is offline   Reply With Quote
Old 17th June 2006, 09:11   #6  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
Manao If you noticied the (very bad) haloing I find it hard to beleive that you wouldn't have noticed the (quite evident) bluring present in the screenshot of x264. It definately doesn't look like noise is all the inloop filter is removing to me, or is mpeg4 avc's inloop filter the first perfect denoiser that never removes details by accident .
*.mp4 guy is offline   Reply With Quote
Old 17th June 2006, 09:46   #7  |  Link
futurex
Registered User
 
Join Date: Mar 2005
Posts: 155
manao: it's not that bad looking and the grain is not as obvious, it's just been zoomed in and then resized for greater visibility :-)

its a digital tv mpeg2 i captured, i'm sure the haloing is also present on the dvd when it gets released ;-)

im suprised you didnt notice x264's inloop filter is removing not only grain, but grain from his face, looks like he shaved!

i did an encode at 1800kbps, sharktooths matrix, no deblocking and it did preserve the noise for the most part, but i think it'll have to go 2200+ to be comparable to the mpeg2, but really 1200kbps was my limit until i get a bigger hard disk :-(
futurex is offline   Reply With Quote
Old 17th June 2006, 10:59   #8  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
Quote:
Originally Posted by futurex
i did an encode at 1800kbps, sharktooths matrix, no deblocking and it did preserve the noise for the most part, but i think it'll have to go 2200+ to be comparable to the mpeg2, but really 1200kbps was my limit until i get a bigger hard disk :-(
Is there too much blocking? Or is it that detail still isn't being preserved well enough?
*.mp4 guy is offline   Reply With Quote
Old 17th June 2006, 11:08   #9  |  Link
futurex
Registered User
 
Join Date: Mar 2005
Posts: 155
bit of both, but mostly because of detail. then again i'm kind of picky, maybe time to get a new hdd, they're pretty cheap. this doesnt happen with non-grainy sources and i can do about 1300to 1400kbps encodes which are quite close to the source
futurex is offline   Reply With Quote
Old 17th June 2006, 11:42   #10  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
Futurex : what is the quantizer of the frame you took the screenshot from ?

Quote:
I find it hard to beleive that you wouldn't have noticed the (quite evident) bluring present in the screenshot of x264
There's some bluring, I won't deny it. But nothing prevents you from also sharpening a bit during playback. And you can safely sharpen, for there are no artifact to enhance ( no noise nor blocks nor ringing )

Here's what it would look like with a proper noise added back :


As you can see, Lock can recover his weathered tan quite easily with a bit of noise added.
__________________
Manao is offline   Reply With Quote
Old 17th June 2006, 12:32   #11  |  Link
futurex
Registered User
 
Join Date: Mar 2005
Posts: 155
thanks manao, but i assume this would be done in an avisynth script (pp during playback may be troublesome for the pc) which then gets encoded to x264 so won't it end up with the same blurring effect/detail loss?

the problem is, it's the actual texture that is wiped out/blurred, which i fear cannot be recovered through any avisynth script :-(

Last edited by futurex; 17th June 2006 at 12:34.
futurex is offline   Reply With Quote
Old 17th June 2006, 12:40   #12  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
Here is the grain lost during the encoding :

And here's the grain I generated ( Addgrain, zoomed ) :


As you can see, there's not that much of a texture in the first screenshot, and none in the second.
__________________
Manao is offline   Reply With Quote
Old 17th June 2006, 13:58   #13  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
By chance, I've 2 pics of Locke on my USB-stick where I showed something to one of my collegues at work.

First: Screenshot from original mpeg2 source of "Premiere" (Pay-TV). Original is anamorph. This *should* be *supposed* to be the better source of them two.



Streamed from "Pro7" (Free-TV). Original is "only" 16:9 letterboxed, with a big "7" logo. This should be supposed to be the worse of them two sources.
Screenshot is from encoding to "outdated technology" (XviD) @ 1400 kbps, after some slight filtering.



Zooming you may do on your own.

(The "strange" AR is because of playback thru TV-out /w overscan compensation ... it's okay like that.)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 17th June 2006, 14:06   #14  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,348
This is a screenshot of the amplified difference between the source and a divx encoded version of a scene from the matrix revolutions (a virtually noisless source)


Notice how it looks like all that was lost in areas that contained texture was noise, but anyone who has viewed a Q4 divx file can tell that more then "noise" is removed from the picture.
*.mp4 guy is offline   Reply With Quote
Old 18th June 2006, 10:53   #15  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
The point I was trying to make is NOT: my XviD encodes look better than all you guys x.264 encodes ...

The point I was trying to make is this:

Encoding to a lossy encoder will lose information. Always. No way around that. Therefore, it's a valid strategy to slightly bump up those kinds of information we want to keep (detail), and reduce those kinds of information we don't want to keep (noise et al.) before feeding the source into the encoder. This greatly helps the encoder to produce an output more close to what we would like to have.
In particular this holds up for DVB broadcasts, at least for the ones I'm used to get from satellite: grain is distorted by the realtime recompression, detail is damped down and softened, additional artefacts have been introduced that shouldn't be there in the first place, and so on. (DVB in Germany is faaar away from DVD quality ... more close to that of a n00b's first DVD Rip, instead.)
For comparison ... in the thread Very good quality at 10000+ kbps the OP asks by what codec to achieve maximum results at 10k bitrates. However, he is also speaking about a "standard PAL broadcast". Now, it seems like he'll only come very close to the point where the broadcast originally was. Never beyond, and in fact still below. However I suspect that, when fondling the source with a little Avisynth, the final experience would be better than that of the original broadcast, instead of "just as good". At 5k bitrate instead of 10k, probably.

Sorry for the small excurse. But video encoding is a complex topic ... and if one is using only half of those puzzle pieces that were in the box, the puzzle will keep being holey.

P.S. In case anyone is wondering ... what I used for the LOST people, after cleaning-up & generalization has become known as "SeeSaw()".
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 18th June 2006, 17:31   #16  |  Link
Soulhunter
Bored...
 
Soulhunter's Avatar
 
Join Date: Apr 2003
Location: Unknown
Posts: 2,812
Related discussion... ^^


Bye
__________________

Visit my IRC channel
Soulhunter is offline   Reply With Quote
Old 19th June 2006, 06:22   #17  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
Here's a short (<10 sec) vid only source you can experiment on:

8.5mb

http://rapidshare.de/files/23464355/jl.zip.html
Pookie 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 08:47.


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