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 7th December 2008, 17:11   #1  |  Link
AntiJw
Banned
 
Join Date: Jun 2008
Location: Too north/cold
Posts: 63
Rather sharpen in realtime?

Hey,
I've noticed (some time ago) that sharpening the video before encoding with x264 raises avg.quants. Does this mean that the video gets more complex, and that I should rather sharpen in realtime (when I'm watching the encoded video) to save bitrate?

Last edited by AntiJw; 7th December 2008 at 17:49. Reason: added: (when I'm watching the encoded video)
AntiJw is offline   Reply With Quote
Old 7th December 2008, 17:40   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Does this mean that the video gets more complex, and that I should rather sharpen in realtime to save bitrate?
Wouldn't sharpening increase the bitrate (if you were using CRF mode) ? It's similar to adding noise/detail

By the same reasoning that is why we use smoothers/degrainers on movies (e.g. anime) to reduce bitrate

I'm not sure what the "realtime" component of your statement has to do with it? Or am I misunderstanding you?

Last edited by poisondeathray; 7th December 2008 at 17:43.
poisondeathray is offline   Reply With Quote
Old 7th December 2008, 18:03   #3  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by poisondeathray View Post
I'm not sure what the "realtime" component of your statement has to do with it? Or am I misunderstanding you?
He wonders whether he should shapren before encoding -or- at playback time. The latter would have to be done in real-time, of course.

And yes: Sharpening before encoding will cost additional bits. So with CRF you'd have to expect a bigger file at a given value -and- with 2-Pass you'd have to expect more artifacts at a given bitrate.
Nevertheless you have to keep in mind that details, which were lost during the encoding process, are gone forever. No sharpening filter can magically re-create detail at playback time!

Therefore I'd test various Psy RDO and Psy Trellis settings and maybe lower the Inloop Filter a bit, before actually deciding to use a sharpening filter.
The more crispiness/detail you can preserve in the encoding step, the less sharpening (pre- or post-processing) will be required...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 7th December 2008 at 18:11.
LoRd_MuldeR is offline   Reply With Quote
Old 7th December 2008, 18:04   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
OK for playback...It makes sense now (Thx. Lord Mulder, I see that he added that...)

Just my opinion, but I think you would get better quality and control over doing the sharpening before. You are sharpening during decoding the original input source to encode, vs. sharpening on playback of a lower quality encode so some details are already lost. You are more prone to undesired artifacts. The downside is that it takes more CPU (encoding time) and uses higher bitrate to sharpen before encoding

Also if your PC is old/slow, sometimes sharpening during playback is not an option with h264 HD content.
poisondeathray is offline   Reply With Quote
Old 7th December 2008, 18:20   #5  |  Link
AntiJw
Banned
 
Join Date: Jun 2008
Location: Too north/cold
Posts: 63
Thanks, I think I'll do very light sharpening when I'm encoding (but not on 1080p), because some people don't like sharpening (instead of sharpening much in advance, I can set higher bitrate, as a result of not sharpening when encoding). I've read that Psy-trellis got some artifacts if setting too high value, so I don't want to overdo that.
I think sharpen is good to do in advance on low-res video, but I'm mostly encoding HD-video.

When wanting sharpened picture I can also use spline64resize (sharper result than spline36resize).

poisondeathray: Yeah, sry, I forgot the word "playback" :P

Last edited by AntiJw; 9th December 2008 at 10:40.
AntiJw is offline   Reply With Quote
Old 7th December 2008, 18:29   #6  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by AntiJw View Post
I've read that Psy-trellis got some artifacts if setting too high value, so I don't want to overdo that.
You need to be careful, yes. Too strong Psy Trellis or too strong Psy RDO will introduce new artifacts. But the same applies if you apply too strong sharpening.

It's a trade-off and you'll need to find the combination that looks best for your eyes...

(Note: When you apply pre-sharpening to your source, you must always look at the compressed video. Not at the uncompressed filtered source!)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 7th December 2008, 18:37   #7  |  Link
AntiJw
Banned
 
Join Date: Jun 2008
Location: Too north/cold
Posts: 63
Okey, thanks again. I assume --psy-rdo 1.0:0.5 is a good general value.

Last edited by AntiJw; 7th December 2008 at 22:07.
AntiJw is offline   Reply With Quote
Old 10th December 2008, 05:33   #8  |  Link
Ranguvar
Registered User
 
Ranguvar's Avatar
 
Join Date: Feb 2007
Location: ::1
Posts: 1,236
I did some Psy-RDO tests a while back on HD stuff, posted here... 1.0:1.0 is pretty hard to beat, except the odd source where psy-trellis fails miserably. But that's not often.
Ranguvar is offline   Reply With Quote
Old 10th December 2008, 07:20   #9  |  Link
AntiJw
Banned
 
Join Date: Jun 2008
Location: Too north/cold
Posts: 63
Quote:
Originally Posted by Ranguvar View Post
I did some Psy-RDO tests a while back on HD stuff, posted here... 1.0:1.0 is pretty hard to beat, except the odd source where psy-trellis fails miserably. But that's not often.
Okey, thanks. Do you know what type of artifacts psy-trellis may produce (so I know what to look for, without making too many comparisons), on HD-material? And can you categorise
the "odd source" (is it anime/cartoon or grainy sources or other)?
AntiJw is offline   Reply With Quote
Reply

Tags
quants, realtime, sharpen, sharpening, x264

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 09:44.


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