Log in

View Full Version : Upscaling PAL to 720p - colour question


iSeries
29th January 2012, 16:28
Hi,

I'm from the UK and I am in the process of moving to Canada.

I would like to re-encode my SD PAL DVD's to 720p with blu ray x264 settings. To do this I intend to use eac3to to slow the video / audio down (or rather restore the video / audio) to 23.976fps and then encode to 720p (as 576p24 isn't valid and 576p25 fake interlaced isn't likely to play smoothly on a 60hz TV).

However colorimtery is bothering me - doesn't SD video have a different colour matrix to HD video?

Thanks!

TheSkiller
29th January 2012, 16:48
Yes, it does. DVD-Video (basically anything in SD) uses Rec.601 coefficients while HD uses Rec.709. You need Colormatrix (http://forum.doom9.org/showthread.php?t=82217) to convert Rec.601 to Rec.709.
This will do it:
ColorMatrix(mode="Rec.601->Rec.709")

To do this I intend to use eac3to to slow the video / audio down (or rather restore the video / audio) to 23.976fps and then encode to 720p.Note that this will work only with sources that are entirely progressive 25 fps. If it's interlaced (or mixed) it will not give acceptable results.

Edit: Doesn't Bluray compliant 720p have to be either 50 fps or 59.94 fps (no 23.976)?

iSeries
29th January 2012, 16:55
Yes, it does. DVD-Video (basically anything in SD) uses Rec.601 coefficients while HD uses Rec.709. You need Colormatrix (http://forum.doom9.org/showthread.php?t=82217) to convert Rec.601 to Rec.709.
This will do it:
ColorMatrix(mode="Rec.601->Rec.709")

Note that this will work only with sources that are entirely progressive 25 fps. If it's interlaced (or mixed) it will not give acceptable results.

Edit: Doesn't Bluray compliant 720p have to be either 50 fps or 59.94 fps (no 23.976)?

Thanks, do you know of any GUI's that could make this a bit simpler? I've never used avisynth directly and wouldn't even know where to start.

23.976fps, 24fps, 50fps and 59.94fps are all valid for 720p.

hello_hello
29th January 2012, 17:22
Are you using any program in particular to convert your DVDs? Personally I'm not sure I see the point of upscaling when encoding, but knowing which program you use might make it easier to tell you how to convert the colors, or whether it can be done when using that program at all. MeGUI will do it reasonably easily, but I don't think it resizes up. It creates an Avisynth script to use when encoding so it shouldn't be hard to calculate the resizing needed and add it to MeGUI's script. Likewise it shouldn't be hard to add the colormatrix part. In fact I think you can setup a default script creator preset which will then add it to each encode automatically.

MeGUI uses eac3to for a lot of the work so it shouldn't be hard to get it to convert the audio correctly.

I recently learned colormatrix limits the levels to TV range by default. It's probably no big deal but to leave the levels untouched when converting the colors you need to stop it doing so.

ColorMatrix(mode="Rec.601->Rec.709", clamp=0)

iSeries
29th January 2012, 17:37
Hi,

Many thanks, will give MeGUI a look, although I've been kind of put off as it seems to be aimed at more advanced users.

I haven't re-encoded any SD material yet, I've only re-encoded blu rays using the command line with x264. Upscaling is not ideal but I don't really see a way round it - I'd like blu ray compatibility but 576p24 obviously isn't legal.

hello_hello
29th January 2012, 19:05
There's probably a bit of a learning curve with MeGUI but it's not too complicated and no doubt you'll be able to get help here if you need it. HDConvertToX might be more straightforward and I think it'll also let you modify scripts. There's several other programs but I don't know them well enough to know if they'll make upscaling any easier.

And yeah, I was being a little dumb with my first post. I can see why you'd want to upscale while converting PAL to 23.976.

Maybe a PC as a media player might be an alternative if you've got a huge DVD collection to convert. You could probably use ReClock to play PAL DVDs at 24fps and not have to bother with all that re-encoding. Given video cards are generally used for h264 decoding these days (in case you want to play HD video too) it wouldn't have to be anything overly flash. I use Reclock myself. I always convert to MKV but I don't see why it wouldn't work when playing discs.

Another alternative might be to use an MKV compatible Bluray player (one which understands anamorphic MKVs), remux all the vob files to MKV (no encoding) while changing the frame rate to 24fps and then you only have to worry about converting the audio. For that matter if you use an MKV compatible player you can probably ignore the Bluray "standards" if you decide to re-encode, change the frame rate to 24fps during the process and not have to worry about upscaling. A Bluray player shouldn't care what resolution an MKV might use, although as I generally use a PC for playback I've not tested mine to see how clever it is when it comes to colorimetry and playing MKVs. I'd hope it uses R.601 for standard definition and R.701 for HD but anything's possible.

Anyway, the above might give you some alternative ideas.

iSeries
29th January 2012, 19:49
Many thanks for all your suggestions, much to consider!

I do generally use my PC for playback (and have used Reclock), but I am striving for maximum compatibility across my playback devices and encode all HD material according to BD specs for backup purposes, and I'd like to do the same for SD stuff if at all possible, giving me the option to burn to disc should anything happen to my original discs.

Incidently I do have a blu ray players in Canada that can play MKVs and also M2TSs from a hard drive, but havent had the time to test it yet (I'm back in the UK now). One limitation of this player though is no HD audio from MKV's or M2TS files (limited to plain DD or DTS).

Another alternative to PC playback would be the PopBox V8 which I bought just before xmas. However this box is so buggy that its basically useless for now.

hello_hello
29th January 2012, 21:31
I did have one more thought which I can't test as I'm in PAL land so my Bluray player plays 25fps MKVs at 25fps. However I did discover that it's fairly dumb when it comes to playing MKVs via USB. Unlike playing discs, where it'll happily tell the TV to switch refresh rates according to the type of disc being played, even though it's a PAL player when playing MKVs it just uses a 60Hz refresh rate regardless (well I'm fairly sure it does).

That got me wondering if you might get lucky and find NTSC players are equally stupid, and just play 25fps MKVs at 24fps. It's a long shot I know..... I wonder if anyone in NTSC land has tested it.

Anyway if you go the re-encoding route I do recommend MeGUI. I actually find it fairly intuitive, but if you have problems there should be no shortage of help here. Given all your DVD encodes will have the same goal, once you've set up a couple of them and got the process of adding frame rate and color conversion down, the rest should be nice and easy.

MeGUI also has a target playback device option, with "Bluray" being one in the list. If you use it, you shouldn't have to do any extra thinking regarding player compatibility. You may also want to post in the AVIsynth forum to see if anyone's got any clever filters/script ideas to use when upscaling. There might be more clever ways of doing it than simply resizing. If you've got a lot of discs to re-encode it probably wouldn't hurt to spend a bit of extra time making sure you're doing it "right" before you start. If anyone does have any clever script ideas it shouldn't be hard to show you how to use them with MeGUI.

iSeries
30th January 2012, 06:22
Many thanks for your help hello_hello, I will give MeGUI a shot. I'm sure I'll get to grips with it :)