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 > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th December 2008, 08:17   #1  |  Link
SacredCultivator
Registered User
 
Join Date: Feb 2007
Posts: 185
Filter to make Clearer Subs

Dear Readers,

I hope this is the right section to ask this...

I was just wondering, if I'm encoding Subtitles (.ass) into a file (H264 in .mp4), the preview window comes out 'clear' but the completed product shows a lot of pixelation in the subs.

My script is as follows:

Code:
MPEG2Source("__vid__")
Tomsmocomp(-1,1,1) 
#tfm(pp=5,cthresh=3,mode=0).tdecimate()
Crop(left,top,right,bottom)
Spline36Resize()
Removegrain(2)
gradfun2db()
And I've tried disabling both the Remove + grad and no luck.
^Also, for the "resize" filter, I'm not too sure if the different ones make any difference, so if there is one that is suggested to replace the one I use, please share.

So I was wondering if I'm missing a filter that can enhance it to be like the preview.

Thanks.
SacredCultivator is offline   Reply With Quote
Old 15th December 2008, 08:21   #2  |  Link
Comatose
Registered User
 
Join Date: Dec 2007
Posts: 639
I'm confused. The TextSub line is missing, and left,top,right,bottom aren't defined, so I'm getting the feeling you aren't giving us the entire script :P
Comatose is offline   Reply With Quote
Old 15th December 2008, 08:24   #3  |  Link
SacredCultivator
Registered User
 
Join Date: Feb 2007
Posts: 185
Ooops that's my template ><

So yes all the information is fille din for the video
Code:
MPEG2Source("__vid__")
Tomsmocomp(-1,1,1) 
#tfm(pp=5,cthresh=3,mode=0).tdecimate()
Crop(4,0,-2,-0, align=true)
Spline36Resize(720,400)
Removegrain(2)
gradfun2db()

textsub("Path.ass")
Well taht should give the general idea.

Not sure if you can really tell from the pictures:
meGUI Preview:


Encoded Video:


---
If encoding method matters at all.. well I'm using Constant Quality at 19 for the video.
^Attempted a Constant Quantizer at 21 and the subs came out smoother, but I'm not too familiar with that method, as the fileout is MUCH larger than Constant Quality, but again the Subs are near perfect on that.

Attached my Preset up so you can check the H264 settings if needed.
Attached Files
File Type: zip meGUI Presets.zip (4.2 KB, 17 views)

Last edited by SacredCultivator; 15th December 2008 at 09:32.
SacredCultivator is offline   Reply With Quote
Old 15th December 2008, 14:32   #4  |  Link
Comatose
Registered User
 
Join Date: Dec 2007
Posts: 639
How did you take that screenshot? Use DGAVC + Avisynth and make sure you get the exact same frame (the entire frame please).
AvsP may make life a bit easier than using a media player to take the screenshot, if you don't have it already :P
Comatose is offline   Reply With Quote
Old 15th December 2008, 14:44   #5  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
subtitles as a principle introduce a large sharpness/contrast compared to the video it's going onto,
which often will introduce blocking/artifacts due to that.

if your end result is for viewing on the PC, you can just mux the video and subs together into a .mkv
only will need to hardcode the subs on for an end result that will be acceptable on standalone players.
(i'm not an expert on SA players, but afaik, none support .ASS)
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 15th December 2008, 15:25   #6  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
Quote:
Originally Posted by SacredCultivator View Post
into a file (H264 in .mp4),
afaik, DGAVC does not support mp4 yet...

and yeah, softsubs are great to have a great video quality and unaltered subs. For hardsubs, adding a semi-transparent greyish border sometimes helps reducing artifacts because the transition is not too brutal.
__________________
AnimeIVTC() - v2.00
-http://boinc.berkeley.edu/-
Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p)
thetoof is offline   Reply With Quote
Old 15th December 2008, 15:30   #7  |  Link
[P]ako
A geek wannabe
 
[P]ako's Avatar
 
Join Date: Apr 2007
Posts: 231
Change of font, some fonts (stylish ones) introduce more artifacting than others, and add more bitrate.
[P]ako is offline   Reply With Quote
Old 15th December 2008, 16:23   #8  |  Link
SacredCultivator
Registered User
 
Join Date: Feb 2007
Posts: 185
Indeed I want to continue using the .mp4 container and not .mkv, although I do know that for .mkv for hardsubs it is much clearer.

And I've tried a few more test encodes using Constant Quality, and when set at 1, it's perfect, but of course the size is ridiculous and now trying to see how high of a number I have to use to get it to be near perfection, although this doesn't matter much as the filesize is quite large in comparison to when I used 19.

So apart from changing the container / encoding method (As Constant Quantizer works), there aren't any filters that might help improve the quality of the subs to make them look more 'integrated' into the video?
SacredCultivator is offline   Reply With Quote
Old 15th December 2008, 16:34   #9  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
That's x264 who blurs your subtitle. Try using negative deblock settings, e.g. -3:-3.
roozhou is offline   Reply With Quote
Old 15th December 2008, 16:38   #10  |  Link
SacredCultivator
Registered User
 
Join Date: Feb 2007
Posts: 185
Hmmm sorry, which filter would that be? As I'm not too sure if I have it or not =X
SacredCultivator is offline   Reply With Quote
Old 15th December 2008, 16:45   #11  |  Link
wyti
Insane Encoder
 
wyti's Avatar
 
Join Date: Feb 2008
Location: Lausanne (Switzerland)
Posts: 142
it's not a filter, but a setting of x264 (--deblock -3:-3 in the command line)
I think that a filter who improve the quality of the subtitles doesn't exist, cause the only way i know to descrase bitrate, is to blur yourself the subtitle...
the subtitle are in a perfect quality when they are hardsubbed into the video (before encoding), and any filter that you may apply to them would give a worse result before encoding.
__________________
Only two things are infinite, the universe and human stupidity, and I’m not sure about the former.
wyti is offline   Reply With Quote
Old 15th December 2008, 16:45   #12  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,219
Maybe its just me, but I think the encoded image looks sharper than the preview image, or at least just as good.
Zarxrax is offline   Reply With Quote
Old 15th December 2008, 16:49   #13  |  Link
SacredCultivator
Registered User
 
Join Date: Feb 2007
Posts: 185
@wyti: Thanks will give that a try right now.

@Zarxrax: Yes it is 'sharper' but in doing that, it makes the pixelations stand out more.

(And yeah wasn't toos ure how to capture it, as when taking those screenshots, it isn't as noticeable as watching it (FullScreen).)

---
EDIT:
Okay tried with the deblocker and it didn't really so much in respect to improving the subs.

And the two filters I use (Remove / grad) don't really affect the Subs do they as again I didn't notice much when I disabled the two.

Last edited by SacredCultivator; 15th December 2008 at 17:08.
SacredCultivator is offline   Reply With Quote
Old 15th December 2008, 19:05   #14  |  Link
DigitalDeviant
Registered User
 
DigitalDeviant's Avatar
 
Join Date: Sep 2003
Posts: 267
The subtitlles in the preview image appears stretched vertically so there is some resize going on somewhere after the subtitles. This might account for some blurring. Also as [P]ako said, the fancier the font the higher the chance that it won't look good after encoding.
__________________
"Do everything by hand, even when using the computer." - Hayao Miyazaki
DigitalDeviant is offline   Reply With Quote
Old 15th December 2008, 19:11   #15  |  Link
SacredCultivator
Registered User
 
Join Date: Feb 2007
Posts: 185
Hmm not too sure on the stretching given that I did set the "textsub" at the end of the script so not too sure where that resize would come from.
SacredCultivator is offline   Reply With Quote
Old 15th December 2008, 19:15   #16  |  Link
wyti
Insane Encoder
 
wyti's Avatar
 
Join Date: Feb 2008
Location: Lausanne (Switzerland)
Posts: 142
Maybe during encoding ? did tha output have the same resolution than your source ?
__________________
Only two things are infinite, the universe and human stupidity, and I’m not sure about the former.
wyti is offline   Reply With Quote
Old 15th December 2008, 19:19   #17  |  Link
SacredCultivator
Registered User
 
Join Date: Feb 2007
Posts: 185
Yes same resolution as what I resized it to.
SacredCultivator is offline   Reply With Quote
Old 15th December 2008, 20:26   #18  |  Link
DigitalDeviant
Registered User
 
DigitalDeviant's Avatar
 
Join Date: Sep 2003
Posts: 267
OK, nvm it was the resizing done by the image host. Can you post a screenshot at the native resolution since your pics are 761 and 911 pixels horizontal and it's hard to try to compare pics of such different resolutions?
__________________
"Do everything by hand, even when using the computer." - Hayao Miyazaki
DigitalDeviant is offline   Reply With Quote
Old 15th December 2008, 20:44   #19  |  Link
SacredCultivator
Registered User
 
Join Date: Feb 2007
Posts: 185
Okay here you are:

Preview in meGUI:


Encoded File:


Yes the video is grainy as well, but more so just concentration on the Subtitles.

And again only 'filters' I use thusfar are
Removegrain(2)
gradfun2db

Settings wise, I don't have deblocking enabled, and AQ is set at 1.0

---
Sharktooth suggested I turn on deblocking at -2,-1, and disable AQ and this did help although the filesize was increased.
SacredCultivator is offline   Reply With Quote
Old 15th December 2008, 21:21   #20  |  Link
wyti
Insane Encoder
 
wyti's Avatar
 
Join Date: Feb 2008
Location: Lausanne (Switzerland)
Posts: 142
Quote:
Originally Posted by SacredCultivator View Post

Sharktooth suggested I turn on deblocking at -2,-1, and disable AQ and this did help although the filesize was increased.
he's right, aq have difficulties to keep sharp edges, but may help with the overall quality of the clip.

you can disable psy-rdo / psy-trellis too if you use them,

otherwise, the only things you can do is increasing bitrate / use slower settings / more filtering the source to make it more compressible (stronger denoising...)
__________________
Only two things are infinite, the universe and human stupidity, and I’m not sure about the former.
wyti 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 05:10.


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