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 6th November 2008, 10:19   #1  |  Link
ACrowley
Registered User
 
Join Date: Apr 2006
Posts: 1,008
DVD Mpeg2 to Mpeg4AVC Colorspace TV-PC ?

Hi. Ive a question.

Usually i encode HD Content to x264 or VC1. So i dont worry about a colorspace converison on Bluray Sources.
I have not done any DVD encodws since 3 Years+ ...so im a little bit out

Now i have Mpeg2 Source from DVD again
Its PAL 720x576 ,16:9 (2,35:1 anamorph)

My Target is a x264 reencode.
I used dgindex to create a d2v.
The Picture looks a little to bright when the mpeg2 colorspace level plays on PC with PC Levels. It looks darker/correct into AVsedit/Vdub,dgindex but not when i play it with and after encoding..its to bright again. Its darker with CoreAVC PC Scale Option or with HaaliRenderer.
It looks ok with ColorYUV(levels="TV->PC")
I think its more a Playback/Render Problem with the YUV-RGB Output

Can i use ColorYUV(levels="TV->PC") without Problmes ? Maybe i play these encodes on a TV again in the Future.

Last edited by ACrowley; 7th November 2008 at 12:21. Reason: rule 12
ACrowley is offline   Reply With Quote
Old 6th November 2008, 13:06   #2  |  Link
Alex_ander
Registered User
 
Alex_ander's Avatar
 
Join Date: Apr 2008
Location: St. Petersburg, Russia
Posts: 334
DVD MPEG2 source is more likely BT601, DGIndex may read BT709 + * symbol by default (if no data of color space in mpeg header), so in case * is shown I'd use:

ColorMatrix(mode="Rec.601->Rec.709") # if necessary, with (,interlaced=true)

and would do nothing if no * symbol in DGIndex.
Alex_ander is offline   Reply With Quote
Old 6th November 2008, 14:00   #3  |  Link
ACrowley
Registered User
 
Join Date: Apr 2006
Posts: 1,008
Quote:
Originally Posted by Alex_ander View Post
DVD MPEG2 source is more likely BT601, DGIndex may read BT709 + * symbol by default (if no data of color space in mpeg header), so in case * is shown I'd use:

ColorMatrix(mode="Rec.601->Rec.709") # if necessary, with (,interlaced=true)

and would do nothing if no * symbol in DGIndex.
Ah ok....however..The colors/black levels are very bright. And when i set th decoder to TV to PC Scale its better. Also with the reencoded x64 (without colorspcae correction). Its correct again when i set CoreAVC to PC Scale.

Last edited by ACrowley; 6th November 2008 at 19:25.
ACrowley is offline   Reply With Quote
Old 6th November 2008, 17:50   #4  |  Link
ACrowley
Registered User
 
Join Date: Apr 2006
Posts: 1,008
Ok, im at Home...

The DVd Mpeg2 Source is BT470-2.B,G*..

i read often DVD Mpeg2 is 709 , or is it 601 ?

So what is correct and should i use colormatrix (xxxx)?

EDIT :
I have not used ColorYUV(levels="TV->PC") for my encode. I will correct the Levels at Playback via Decoder/renderer

Last edited by ACrowley; 7th November 2008 at 12:23.
ACrowley is offline   Reply With Quote
Old 7th November 2008, 18:08   #5  |  Link
Alcohor
Registered User
 
Alcohor's Avatar
 
Join Date: Jun 2007
Location: Portici - Napoli (Italy)
Posts: 11
Quote:
Originally Posted by ACrowley View Post

The DVd Mpeg2 Source is BT470-2.B,G*..

In this case you mustn't apply any conversion. As far i know, you should use colormatrix only when the colorimetry declared is ITU-R BT.709.
Alcohor is offline   Reply With Quote
Old 7th November 2008, 18:33   #6  |  Link
frank
Banned
 
Join Date: Oct 2001
Location: https://t.me/pump_upp
Posts: 811
Very important, don't use any RGB conversion!
Test your script with VirtualDub.

Standard PAL DVD is BT.601 encoded.
Then Alex_ander is right:
Set
ColorMatrix(mode="Rec.601->Rec.709")
before encoding to HD content.
BT709 means extended color space.
frank is offline   Reply With Quote
Old 8th November 2008, 10:11   #7  |  Link
ACrowley
Registered User
 
Join Date: Apr 2006
Posts: 1,008
Quote:
Originally Posted by frank View Post
Very important, don't use any RGB conversion!
Test your script with VirtualDub.

Standard PAL DVD is BT.601 encoded.
Then Alex_ander is right:
Set
ColorMatrix(mode="Rec.601->Rec.709")
before encoding to HD content.
BT709 means extended color space.

As i say, the untouched Source Video has correct dark Levels when i set the Decoder output PC levels. And ofcourse the rerencode also does.

You can see it when the Movie starts. The Black is no Black cause its more grey and milky.
Only ColorYUV(levels="TV->PC") can fixes it encoding. Or i can fix i with the Decoder/Renderer. So its more a Playback/Decoder/Renderer Thing with the YUV-RGB Output, isnt it ? ColorMatrix(mode="Rec.601->Rec.709") has no Effect on this Problem

EDIT:
Ok, here are the Images :

1 : not corrected Output


2. corrected Output (PC Scale)


Its corrected like Screen 2 when i encode it with ColorYUV(levels="TV->PC"). Or whnei enable TV 2 PC Range in a Player/Renderer etc

Last edited by ACrowley; 9th November 2008 at 09:51.
ACrowley is offline   Reply With Quote
Old 8th November 2008, 17:06   #8  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
Could it be that your mpeg-2 decoder is scaling the levels to pc levels on playback, and that the colors with the lighter dark (default) are the true colors? Are you aware that usually mpeg-2 decoders scales the colors?
Terranigma is offline   Reply With Quote
Old 8th November 2008, 18:50   #9  |  Link
ACrowley
Registered User
 
Join Date: Apr 2006
Posts: 1,008
Quote:
Originally Posted by Terranigma View Post
Could it be that your mpeg-2 decoder is scaling the levels to pc levels on playback, and that the colors with the lighter dark (default) are the true colors? Are you aware that usually mpeg-2 decoders scales the colors?
No, the Playback is obviously with TV Levels. Because the Picture always get from bright to darker when i enable PC Range iny any App/Decoder etc. Its a typical....

The Picture from dgindex looks identical to the brighter one.
MPC HC Decoder (and other decoders like Nero,Arcsoft etc) looks identical/very bright one And darker whenTV- PC Level Output is enabld is enabled. Or with HaaliRender Output with PC Levels enabled. Also the x264 reencode (without Levels TV-PC) looks bright. And It looks darker with PC Level enabled in CoreAVC

Im pretty sure the darker picture is correct cause it doesnt look right to me with these milky black Levels

All my DVD are looking so milky and bright on my PC ...except with TV to PC Level output, Haali Renderer, ffdshow restricted to RGB Outpout ,or with MPC Shader Editor 16-235 to 0-255, etc .

So the Question is what should i do ? Is it a good Idea to use ColorYUV(levels="TV->PC") in my AVS for reencoding or not ? I mean i can change it through Playback via Decoder/Renderer

Last edited by ACrowley; 9th November 2008 at 09:36.
ACrowley is offline   Reply With Quote
Old 8th November 2008, 19:37   #10  |  Link
Terranigma
*Space Reserved*
 
Terranigma's Avatar
 
Join Date: May 2006
Posts: 953
Quote:
Originally Posted by ACrowley View Post
The Picture from dgindex looks identical to the brighter one.
Of course it does. So why do you assume it's not correct then? Do me a favor and encode your video to mpeg-2 and play it back with mpclassic and check out the bright and dark levels. What do you get? But if you want to stick with the same scaled colors that mpc uses, then use tv->pc.
Terranigma is offline   Reply With Quote
Old 9th November 2008, 06:42   #11  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
Hmmm, I must admit that I don't really get all those coefficient thingies, so here comes a dumb post:
(the thread title is exactly what I want to achieve)

- Source is NTSC DVD
- DGIndex tells me BT.470-2 B,G*
- It looks better with ColorYUV(levels="TV->PC")
- I want to convert to RGB and back to YV12 for filtering purposes
= what the hell should I use?? (filters, settings, order...)

Code:
mpeg2source("file.d2v")
colormatrix(mode="????", interlaced=true)
ColorYUV(levels="TV->PC") #Can Ylevels/Smoothlevels be used here and why would it be good/bad?
#YV12 filters
ConverttoRGB(matrix="????")
#RGB filters
ConverttoYV12(matrix="????")
If I have an avi source without the original DVD (to avoid any rule 6 strike, it is an old (bad) rip I made for myself from a DVD I had bought and that my cat scratched to death that I'm trying to restore) that needs coloryuv(levels="TV->PC") to look good, should the same mode/matrix be used as the example case above?
__________________
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 9th November 2008, 07:27   #12  |  Link
ACrowley
Registered User
 
Join Date: Apr 2006
Posts: 1,008
When you havent change it in your DVD reencode...then you need the same Color Conversion four you avi reencode as for the Source..

But as i say....i dont chnage the Luma Ranges/TV-PC Levels for now...you can change the Output in your Decoder/Renderer when you play those Files.
However... it looks ok on my TV when i change the luma to ColorYUV(levels="TV->PC"), no Problems, but im, not sure...i dont want get Problems in the Future when i play those reencode on a Standalone/TV LCD

Would be fine if somebody can give a Hint . Change Luma Range Level to ColorYUV(levels="TV->PC") or not on DVD Sources ?
ACrowley is offline   Reply With Quote
Old 9th November 2008, 17:35   #13  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
But as i say....i dont chnage the Luma Ranges/TV-PC Levels for now...you can change the Output in your Decoder/Renderer when you play those Files.
That would be my advice. Make sure that the renderer does the [16,235]->[0,255] conversion when converting to RGB, or use a different renderer if that's not possible.
Wilbert is offline   Reply With Quote
Old 10th November 2008, 03:40   #14  |  Link
thetoof
Sleepy overworked fellow
 
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 933
Quote:
Originally Posted by ACrowley View Post
When you havent change it in your DVD reencode...then you need the same Color Conversion four you avi reencode as for the Source..
Sure, but my question was more about the coefficients usage when performing such a conversion (+ YV12-RGB-YV12).
__________________
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 10th November 2008, 10:45   #15  |  Link
ACrowley
Registered User
 
Join Date: Apr 2006
Posts: 1,008
Quote:
Originally Posted by Wilbert View Post
That would be my advice. Make sure that the renderer does the [16,235]->[0,255] conversion when converting to RGB, or use a different renderer if that's not possible.
Ok...

I use ffdshow for Playback, EVR Custom with RGB32 Output with HQ YUV12 to RGB Conversion/ Contrast Standard. So theres no Problem with the TV Levels

Or i use MPC HC with EVR custom and Shader 16-235 -0-255

But what is if i change it in my Reencode with ColorYUV(levels="TV->PC"), can it be a Problem on SAP/TVs ? Will it be to dark on those Devices ?

I have no SAP Player to test it. But it looks not wrong on my 720p LCD TV connected to my PC.

Last edited by ACrowley; 10th November 2008 at 11:04.
ACrowley is offline   Reply With Quote
Old 10th November 2008, 12:11   #16  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Does some playback software over correct? From MPEG-2, on my PC it looks like VLC does the 16-235 > 0-255 conversion accurately, while Power DVD makes the blacks blacker, the whites whiter, and the colours more saturated. Windows Media Player probably uses the Power DVD decoder, and certainly looks the same. VirtualDub matches VLC.

I've seen the same discrepancies with MPEG-4 AVC on another machine, but can't remember what software was in use.

Cheers,
David.
2Bdecided 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:21.


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