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 > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th April 2013, 07:04   #1  |  Link
Alex-Kid
Antronio's DV ambassador
 
Alex-Kid's Avatar
 
Join Date: Mar 2006
Location: Santiago, Chile
Posts: 115
interlaced chroma issue and artifacts around avisynth subtitles

I hope this is the place to post these issues.

I'm finishing my DVD project, but there are some issues I can't solve.

I have worked all the project based on 480p60 video. This is the workflow I've followed:

NTSC DV-AVI (Cedocida) → QTGMC (bob deinterlace) → ...
...DENOISERS → SHARPENER → EDITION → SUBTITLES → ...
...REINTERLACE (separatefields.selectevery(4,1,2).weave)

First (16:9 top/bottom fields from lossless video):



I get chroma displacement when reinterlacing. When progressive (before reinterlacing), picture is fine, so I don't know if it's an inner issue of the YV12 interlaced chroma sampling. If I can't get rid of it, I think I can use a chroma smoother so it looks better.

----------0----------

Second (16:9 interlaced frame from MPEG-2 final encoding video)



I get this artifacts around hardcoded subtitles by avisynth internal filter after encoding MPEG-2 file. Before encoding, subtitle looks fine, so here I am lost and I don't know what to do. It seems the subtitle had an artifacts box around, even when the video bitrate is 9008 kbps. Every other zone in the picture looks good (when watched ).

I don't think video files are necessary, but I'll provide them if you need them.

Please help me solving these issues to finish the project. I have 2 or 3 projects more to come!

Saludos

By ALEX-KID
Alex-Kid is offline   Reply With Quote
Old 20th April 2013, 10:55   #2  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
Nothing is wrong actually, you just think it is because of the improper way you view your interlaced YV12 video.
By that I mean to view your raw YV12 video it has to be converted to RGB somehow. Because your video is interlaced this needs to happen in an interlaced manner. If you just view your AVS script result in, say, VirtualDub some Codec installed on your computer is requested to do the YV12->RGB conversion so that your video can be displayed. When this happens the chroma is getting scaled as if the video was progressive causing the issue you see, although it is not really there in YV12.

Solution: To preview your video properly add this to the very end of your script but be sure to remove or comment it out for encoding.
Code:
ConvertToRGB(interlaced=true)
Edit: But if you want to check your video with fields separated, put the SeparateFields() after the RGB conversion.

Last edited by TheSkiller; 20th April 2013 at 11:06.
TheSkiller is offline   Reply With Quote
Old 23rd April 2013, 20:30   #3  |  Link
Alex-Kid
Antronio's DV ambassador
 
Alex-Kid's Avatar
 
Join Date: Mar 2006
Location: Santiago, Chile
Posts: 115
TheSkiller, I thought it could be the reason, thanks for making it clear for me.

¿Anybody for the subtitle clock issue ?
Alex-Kid is offline   Reply With Quote
Old 23rd April 2013, 20:38   #4  |  Link
paradoxical
Guest
 
Posts: n/a
It simply looks like there wasn't enough bitrate to encode the text without artifacts along with everything else in the frame since there are noticeable compression artifacts all over that shot. Ringing around text is an issue with any block-based encoding scheme because of the sharp transitions.

Last edited by paradoxical; 23rd April 2013 at 20:41.
  Reply With Quote
Old 24th April 2013, 23:04   #5  |  Link
Alex-Kid
Antronio's DV ambassador
 
Alex-Kid's Avatar
 
Join Date: Mar 2006
Location: Santiago, Chile
Posts: 115
Quote:
Originally Posted by paradoxical View Post
It simply looks like there wasn't enough bitrate to encode the text without artifacts along with everything else in the frame since there are noticeable compression artifacts all over that shot. Ringing around text is an issue with any block-based encoding scheme because of the sharp transitions.
Ok, but the video has already 9008 kbps, I can't raise bitrate up much more for DVD compliancy.

¿Any other ideas? The video is processed in 480p and is very sharp too, so maybe (simple) reinterlacing can impact on encoding.
Alex-Kid is offline   Reply With Quote
Old 24th April 2013, 23:07   #6  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by Alex-Kid View Post
Ok, but the video has already 9008 kbps, I can't raise bitrate up much more for DVD compliancy.

¿Any other ideas? The video is processed in 480p and is very sharp too, so maybe (simple) reinterlacing can impact on encoding.
You might try doing a low-pass filter on the video to help the compressibility. Otherwise if you're already at the max bitrate you can encode at you might just have to live with it.
  Reply With Quote
Old 25th April 2013, 00:12   #7  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
In the vane of every little bit helps.

Two tricks that can slightly reduce the bit demand for encoding text, 1. make the text and halo slightly transparent, this helps with motion estimation of objects moving behind the text. 2. use the interlaced mode of the antialiaser, this adds a subtle vertical blur to the characters, slightly lowering bits need caused by sharp edges.

With inbuilt Avisynth Subtitle filter :-
Code:
...
TextColor=$80E0E0E0 # 50% transparent 90% white
HaloColor=$C0404040 # 75% transparent dark gray
Subtitle(..., text_color=TextColor, halo_color=HaloColor, interlaced=True)
IanB is offline   Reply With Quote
Old 25th April 2013, 13:22   #8  |  Link
fvisagie
Registered User
 
Join Date: Aug 2008
Location: Isle of Man
Posts: 588
Also be sure to use two-pass encoding, to get the maximum out of the allowed bitrate.

Cheers,
Francois
fvisagie is offline   Reply With Quote
Old 25th April 2013, 20:24   #9  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by fvisagie View Post
Also be sure to use two-pass encoding, to get the maximum out of the allowed bitrate.
Having done lots of encoding with CCE, there is usually almost no real noticeable benefits between doing a maxed-out bitrate 1-pass CBR vs a 2-pass at the 9000kbps+ bitrates that Alex-Kid is using. Doing some level of filtering will do far more to help compressibility than 2-pass encoding.

Last edited by paradoxical; 25th April 2013 at 20:28.
  Reply With Quote
Old 26th April 2013, 08:04   #10  |  Link
fvisagie
Registered User
 
Join Date: Aug 2008
Location: Isle of Man
Posts: 588
Quote:
Originally Posted by paradoxical View Post
Having done lots of encoding with CCE, there is usually almost no real noticeable benefits between doing a maxed-out bitrate 1-pass CBR vs a 2-pass at the 9000kbps+ bitrates that Alex-Kid is using.
That's interesting. I'll look out for it with my next DVD encode. Although I use ffmpeg; do what extent have you experienced this with other encoders also?

Quote:
Doing some level of filtering will do far more to help compressibility than 2-pass encoding.
For sure. Although this does introduce a compressibility vs. quality loss trade-off.
fvisagie is offline   Reply With Quote
Old 26th April 2013, 14:15   #11  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by fvisagie View Post
That's interesting. I'll look out for it with my next DVD encode. Although I use ffmpeg; do what extent have you experienced this with other encoders also?
HCEnc was pretty similar. 2-pass might do something noticeable if we were talking like 4000 kbps, but at 9000+ kbps it's going to make negligible difference. 2-pass at 9000+ kbps and CBR at 9000+ kbps are going to look pretty much the same. The only thing the 2-pass would do is possibly make it so you could get a smaller file size while possible having similar quality, but since he's already looking to max out the bitrate that doesn't really seem to be a concern. A frame encoded at 9000kbps in a 2-pass encode is not going to somehow look magically better than if the frame was encoded with the same bitrate doing a 1-pass unless something is either broken or it makes stupid decisions in the 1-pass code.

Quote:
Originally Posted by fvisagie View Post
For sure. Although this does introduce a compressibility vs. quality loss trade-off.
Considering he's already seeing quite noticeable compression artifacts, it's not like it's going to get worse.

Last edited by paradoxical; 26th April 2013 at 14:19.
  Reply With Quote
Old 29th April 2013, 07:56   #12  |  Link
fvisagie
Registered User
 
Join Date: Aug 2008
Location: Isle of Man
Posts: 588
That makes a lot of sense, thanks.
fvisagie is offline   Reply With Quote
Old 30th April 2013, 00:01   #13  |  Link
Alex-Kid
Antronio's DV ambassador
 
Alex-Kid's Avatar
 
Join Date: Mar 2006
Location: Santiago, Chile
Posts: 115
Quote:
Originally Posted by IanB View Post
In the vane of every little bit helps.

Two tricks that can slightly reduce the bit demand for encoding text, 1. make the text and halo slightly transparent, this helps with motion estimation of objects moving behind the text. 2. use the interlaced mode of the antialiaser, this adds a subtle vertical blur to the characters, slightly lowering bits need caused by sharp edges.

With inbuilt Avisynth Subtitle filter :-
Code:
...
TextColor=$80E0E0E0 # 50% transparent 90% white
HaloColor=$C0404040 # 75% transparent dark gray
Subtitle(..., text_color=TextColor, halo_color=HaloColor, interlaced=True)
Thanks for the tip but, due to high motion scenes, subs tend to disappear and complicate reading, even with little transparency. Interlaced mode of subtitle filter is already turned on.

I was wondering if building a subtitle mask and applying antialias filters would gain some more compressibility.

Quote:
Originally Posted by fvisagie View Post
Also be sure to use two-pass encoding, to get the maximum out of the allowed bitrate.
I already use 2-pass encoding with HCEnc. I even set Adaptive Quantization with a value of 3, but it doesn't seem to work well with hardsubbing.

As a final thought: I've seen many DVD scenes with high motion but clean subtitles. I know HCEnc is a very good encoder and I've used it for a long time to encode my miniDV tapes. But this is the first time I do enough processing steps to enhance the picture and find that HCEnc doesn't seem to handle it well, even at very high bitrate.

I must also say that I used lossless encoding for intermediate steps.
Alex-Kid is offline   Reply With Quote
Old 6th May 2013, 15:00   #14  |  Link
paradoxical
Guest
 
Posts: n/a
Are you sure that those DVD scenes aren't using forced subtitles to achieve that? If you are authoring for DVD it might just be better to create a subtitle track and set it as a forced stream. That way you will get clean subtitles and since they can't be disabled it will achieve the same effect as hard-subbing.
  Reply With Quote
Old 10th May 2013, 07:32   #15  |  Link
Alex-Kid
Antronio's DV ambassador
 
Alex-Kid's Avatar
 
Join Date: Mar 2006
Location: Santiago, Chile
Posts: 115
Quote:
Originally Posted by paradoxical View Post
Are you sure that those DVD scenes aren't using forced subtitles to achieve that? If you are authoring for DVD it might just be better to create a subtitle track and set it as a forced stream. That way you will get clean subtitles and since they can't be disabled it will achieve the same effect as hard-subbing.
Now that you mention it, I am not sure if those subs were hard or soft, but I have to admit that it's a very good idea. Thank you!
Alex-Kid is offline   Reply With Quote
Old 15th May 2013, 14:42   #16  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
The clock in your screenshot is definitely not a softsub because softsubs are not affected by lossly video compression. They are not part of the picture, they are overlaid on top of it.
But nevertheless softsubs on DVD are limited to 4 colors for a given subpicture, hence they are not as smooth but with the right technique they will look just fine.
TheSkiller is offline   Reply With Quote
Old 15th May 2013, 15:21   #17  |  Link
paradoxical
Guest
 
Posts: n/a
Quote:
Originally Posted by TheSkiller View Post
The clock in your screenshot is definitely not a softsub because softsubs are not affected by lossly video compression. They are not part of the picture, they are overlaid on top of it.
But nevertheless softsubs on DVD are limited to 4 colors for a given subpicture, hence they are not as smooth but with the right technique they will look just fine.
The pictures above weren't what he was talking about. He mentioned he had seen other DVDs that had similar overlaid subtitles that didn't show compression artifacts. Which is why I mentioned that they could just be forced subtitles.

Quote:
As a final thought: I've seen many DVD scenes with high motion but clean subtitles.
  Reply With Quote
Old 23rd May 2013, 18:08   #18  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
I see decoding faults already in the source fields (the red car's door frame).
The other field's chroma is leaking in.
So if you reinterlace these you will get chroma faults anyway.

Before trying to mend this:
Find the faulty decoder. It is system dependent.

For instance: If you run XP and use AviSynth using DirectShowSource,
you have a good chance to be connected to quartz.dll, qdv.dll. These do introduce chroma decoding faults with DV-AVI.
Once you go through VD (using internal dvsd VfW), on the same system you get proper decoding.
On Win7 DirectShow decodes DV properly regarding chroma, but may therefore drop the first frame, making any cut offset by one.

And with Cedocida I ran into faults as well, I can not tell why, just dropped it. Have to try again once.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is online now   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 01:13.


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