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 26th September 2015, 12:59   #161  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,743
Here are the results : I encoded in 720*480 @ 25p, added pulldown with DGpulldown (I checked the line 25 --> 29.97) and made a dvd with Muxman.
Tested on 3 players all set on 1080p : none displayed 50 hz !
Oppo and Pioneer output 60p, Sony outputs 24p !?

edit : if I disable 24p in Sony's setup (no instead of auto, there is not yes or force), it outputs 60p.
I can force 50p in Oppo's setup (which calls it PAL) ; that's probably the best way to look this kind of dvd but curiously I didn't notice difference compared to 60p output (when Multi-system is selected in Oppo's setup).

Last edited by Music Fan; 26th September 2015 at 13:39.
Music Fan is offline   Reply With Quote
Old 26th September 2015, 13:21   #162  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Interesting. Not much smartness then.
It seems like the Sony applies standard IVTC with decimation.
Sharc is offline   Reply With Quote
Old 26th September 2015, 13:32   #163  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,743
I don't know what it does but 24p has no sense, that should be 50 or 60p.
I edited my previous post to add some informations.
Music Fan is offline   Reply With Quote
Old 26th September 2015, 13:50   #164  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Hmmm.... Isn't your 25p source a speed-up 24 film?
Maybe the Sony is smarter than we thought... ;-)

At the end, the answer may again be: "It depends on the player".
Sharc is offline   Reply With Quote
Old 26th September 2015, 14:21   #165  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
Quote:
Originally Posted by Music Fan View Post
Here are the results : I encoded in 720*480 @ 25p, added pulldown with DGpulldown (I checked the line 25 --> 29.97) and made a dvd with Muxman.
Tested on 3 players all set on 1080p : none displayed 50 hz !
Oppo and Pioneer output 60p, Sony outputs 24p !?

edit : if I disable 24p in Sony's setup (no instead of auto, there is not yes or force), it outputs 60p.
I can force 50p in Oppo's setup (which calls it PAL) ; that's probably the best way to look this kind of dvd but curiously I didn't notice difference compared to 60p output (when Multi-system is selected in Oppo's setup).
is this like soft telecine?

broadcast doesn't support this AFAIK.
huhn is offline   Reply With Quote
Old 26th September 2015, 14:57   #166  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,743
Quote:
Originally Posted by Sharc View Post
Hmmm.... Isn't your 25p source a speed-up 24 film?
Yes.

Quote:
Originally Posted by Sharc View Post
Maybe the Sony is smarter than we thought... ;-)
No because it was encoded in 25p (with assumefps(25) in the script) and nothing can tell the player that the orignal speed was 24p, even the mpeg-2 encoder has no way to know it.
The script ouputs the same kind of signal than if I had de-interlaced 50i to 25p.
If I had done changefps(25) instead of assumefps(25), in this case ok, a frame would be duplicated and the player could detect it, but it's not what I did.
Music Fan is offline   Reply With Quote
Old 26th September 2015, 14:59   #167  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,743
Quote:
Originally Posted by huhn View Post
is this like soft telecine?
Yes, DGPulldown don't re-encode, it only add flags.
Music Fan is offline   Reply With Quote
Old 26th September 2015, 15:12   #168  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Quote:
Originally Posted by Music Fan View Post
Yes.


No because it was encoded in 25p (with assumefps(25) in the script) and nothing can tell the player that the orignal speed was 24p, even the mpeg-2 encoder has no way to know it.
The script ouputs the same kind of signal than if I had de-interlaced 50i to 25p.
If I had done changefps(25) instead of assumefps(25), in this case ok, a frame would be duplicated and the player could detect it, but it's not what I did.
I can only guess that the Sony player has seen the flags and then defaulted straight to 24, assuming that this is the most likely case. Just speculating.
Sharc is offline   Reply With Quote
Old 26th September 2015, 15:16   #169  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,743
I also believe this.
Music Fan is offline   Reply With Quote
Old 26th September 2015, 15:22   #170  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
Did you inspect the .ifo and .vob with e.g. ifoedit? Anything unusual? These contain also instructions for the playback.

Edit:
Just as a sidenote: When I do a 2:1:1:1:1 hard-pulldown (Changefps(30)) in avisynth and decimate it with tdecimate() without specifying the framerate explicitly it also defaults to 24 fps. In order to get 25fps output I need to specify tdecimate(mode=2,rate=25), or fdecimate(rate=25).

Last edited by Sharc; 26th September 2015 at 15:53.
Sharc is offline   Reply With Quote
Old 26th September 2015, 17:03   #171  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
Quote:
Originally Posted by colours View Post
Using interlaced chroma sampling is exactly the same as not doing anything special to the chroma, unless we're talking about one of those formats with oddball interlaced chroma sampling. (DV is one of them, I think?)
It's not the same, I am not talking about chroma placement (like DV vs MPEG2). It's about how the chroma was downsampled from (usually) 4:2:2 to 4:2:0 for DVD encoding. I'm sure you know this can be done in two ways

ConvertToYV12(interlaced=false)
and
ConvertToYV12(interlaced=true).

For a progressive video, one would use interlaced=false, right? The problem is, if you encode (or rather flag) the video interlaced the player might do something like this to upsample the chroma for playback:

ConvertToYUY2(interlaced=true)

Now that will result in the CUE (chroma upsampling error) if you used ConvertToYV12(interlaced=false) rather than ConvertToYV12(interlaced=true) for downsampling to 4:2:0.



Quote:
Originally Posted by colours View Post
(Also, I just did a search on CUE and the first few results were from like 2001. How is this still a concern in 2015?)
At that time it was a concern because many hardware players were simply lacking a progressive chroma upsampling method. They used an interlaced one, no matter what.

It is potentially still a concern today in the case described above, but this time it's not the hardware's fault but user error.


CUE (down: p; up: i)


Correct (down: p; up: p)


Also correct (down: i; up: i)

Last edited by TheSkiller; 26th September 2015 at 20:19.
TheSkiller is offline   Reply With Quote
Old 27th September 2015, 05:41   #172  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 308
Quote:
Originally Posted by TheSkiller View Post
It's not the same, I am not talking about chroma placement (like DV vs MPEG2).
Neither was I—I was pointing out that if we assume that we can just Weave() together fields and have correct chroma siting (this is true of the "standard" 4:2:0 interlaced chroma siting), then there's nothing special that needs to be done if we can assume the playback setup isn't completely broken.

Okay, that's actually a huge bunch of "if"s chained together and we all know playback setups can be broken in very creative ways, but honestly I think the solution should be to fix them (or at least get people to stop buying shitty DVD players etc.) rather than messing with things on the mastering side.

Quote:
Originally Posted by TheSkiller View Post
It's about how the chroma was downsampled from (usually) 4:2:2 to 4:2:0 for DVD encoding. [snip] Now that will result in the CUE (chroma upsampling error) if you used ConvertToYV12(interlaced=false) rather than ConvertToYV12(interlaced=true) for downsampling to 4:2:0.
My ten minutes of Googling led me to believe that the term "CUE" is meant specifically for the problem of upscaling the chroma fields with the wrong offsets, not for a mismatch of interlaced/progressive resampling. The latter's not as big a problem and can be worked around on the mastering end just by using a low-pass filter prior to interlacing (or widening the support of the downscaling filter when converting from 4:2:2/4:4:4/RGB to 4:2:0).

A playback setup is not required to be able to detect and reverse pulldown, so this application of a low-pass filter is the only way to guarantee that the chroma will correctly render on playback, regardless of whether the content is really interlaced (50/60 temporally distinct fields) or pulled-down. In practice it's probably safe to assume some sort of field matching will be used and that progressive chroma upsampling is done after all the deinterlacing and field matching nonsense, so you could just ignore this issue entirely. If it still uses interlaced chroma upsampling after deinterlacing or field matching, then that obviously falls under the category of "your setup is broken so we won't support it".
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!

Last edited by colours; 27th September 2015 at 05:52.
colours is offline   Reply With Quote
Old 27th September 2015, 12:09   #173  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,743
And how to apply a low-pass filter with Avisynth ?
Music Fan is offline   Reply With Quote
Old 27th September 2015, 12:44   #174  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
blur(1).sharpen(0.3).blur(1).sharpen(0.3)
kolak is offline   Reply With Quote
Old 27th September 2015, 14:45   #175  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
Quote:
Originally Posted by colours View Post
Neither was I—I was pointing out that if we assume that we can just Weave() together fields and have correct chroma siting (this is true of the "standard" 4:2:0 interlaced chroma siting), then there's nothing special that needs to be done if we can assume the playback setup isn't completely broken.
I agree, nothing needs to be done.


Quote:
Originally Posted by colours View Post
In practice it's probably safe to assume some sort of field matching will be used and that progressive chroma upsampling is done after all the deinterlacing and field matching nonsense, so you could just ignore this issue entirely. If it still uses interlaced chroma upsampling after deinterlacing or field matching, then that obviously falls under the category of "your setup is broken so we won't support it".
Yes, but if you are using a traditional plain ol DVD-player without any progressive scan, just Scart, the player wouldn't do anything more sophisticated than ConvertToYUY2/RGB(interlaced=true) whenever the stream is flagged as interlaced.
Now my point is, the player is not doing anything wrong there, really. Whenever you put something non-interlaced on a DVD and yet flag it interlaced, you should downsample the chroma to 4:2:0 the "interlaced way". I'm rather sure in the end that's probably almost the same as applying a vertical low-pass on the chroma, so we kind of agree that something needs to be done.

Last edited by TheSkiller; 27th September 2015 at 14:47.
TheSkiller is offline   Reply With Quote
Old 27th September 2015, 15:30   #176  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,743
Quote:
Originally Posted by kolak View Post
blur(1).sharpen(0.3).blur(1).sharpen(0.3)
Ok, and why does it act as low-pass ?
Music Fan is offline   Reply With Quote
Old 27th September 2015, 16:18   #177  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,843
Ask Didee, it's his idea and it works.
kolak is offline   Reply With Quote
Old 27th September 2015, 16:35   #178  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,997
blur() reduces details and sharp transitions by removing high frequencies = lowpass filtering

You could also downscale (and then upscale) the picture. Scaling applies a lowpass filter in order to prevent aliasing.
Sharc is offline   Reply With Quote
Old 27th September 2015, 17:26   #179  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 308
Quote:
Originally Posted by TheSkiller View Post
Whenever you put something non-interlaced on a DVD and yet flag it interlaced, you should downsample the chroma to 4:2:0 the "interlaced way". I'm rather sure in the end that's probably almost the same as applying a vertical low-pass on the chroma, so we kind of agree that something needs to be done.
I'm not entirely convinced by this, actually. Going by the very same pictures you uploaded, it's clear that even with the stronger colour fringes, the p-down/i-up pic looks less bad than the i-down/i-up pic.

Let's disregard the idea of using a low-pass filter for the time being. By using interlaced downscaling, there would be two steps causing aliasing in the whole chain (both downscaling and upscaling), whereas with progressive downscaling, the only step that causes aliasing is the interlaced upscaling step. There's no obvious reason to believe that the aliasing caused by interlaced upscaling and by interlaced downscaling should magically cancel out, so progressive downscaling should be preferred.

With a low-pass filter applied, all of this becomes moot if we use a sinc filter (zero aliasing in either step!), but since we don't actually use sinc filters for low-pass filtering or resampling (lolringing + lolslow), to minimise aliasing we should still use progressive downscaling. (Also, we can combine the resampling and low-pass filtering steps into one by adjusting Dither_resize16's fv parameter.)

I think there might be a better way of downscaling than either normal progressive downscaling or interlaced downscaling if we know that it'll be interlace-upscaled later on, but I'm a bit too busy to work out the details at the moment.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!
colours is offline   Reply With Quote
Old 28th September 2015, 10:48   #180  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
Quote:
Originally Posted by colours View Post
I'm not entirely convinced by this, actually. Going by the very same pictures you uploaded, it's clear that even with the stronger colour fringes, the p-down/i-up pic looks less bad than the i-down/i-up pic.
OK, those lines I drew in Paint aren't very good at showing the aliasing. So I re-did the test with this chroma zone plate.


down: p; up: i


down: p; up: p


down: i; up: i
TheSkiller 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 18:14.


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