View Full Version : 1080i to 576i
Mole
3rd January 2012, 04:05
I have a 1080 50i source which I'd like to make into a PAL DVD and keeping it interlaced.
What approach would be good?
Would something as simple as this do:
SeparateFields()
Spline36Resize(720,288)
weave()
Or should I deinterlace it first to 50p using for example TDeint, then resize down, then make it interlaced?
TDeint(mode=1)
Spline36Resize(720,576)
separatefields()
selectevery(4,0,3)
weave()
Or should I just make it into 25p?
nhope
3rd January 2012, 04:34
I use TDeint, exactly as you have done. Others will tell you that Bob() is good enough when you're going to downscale this much but I've had better results with TDeint. It's faster if you downscale the width before the TDeint.
After the downscale you may well want to do some low pass filtering to deal with line twitter. The following script contains a blur-sharpen routine suggested by Didée in this post (http://forum.doom9.org/showthread.php?p=1492392#post1492392) when we were discussing downscaling very-challenging footage to 480i. I find the results of the blur-sharpen very difficult to assess. You really need to burn a couple of tests to DVD and decide how much blur-sharpen you need.
Spline36Resize(720,height)
TDeint(mode=1)
Spline36Resize(width,576)
# Low-pass filtering to deal with twitter, moire etc.
blur(0.0,1.0)
sharpen(0.0,0.75) # Adjust 2nd value between 0.5 and 1.0 to taste
# Following 4 lines are alternative to previous 2 lines. They do more filtering for problem footage
#blur(0.0,1.0)
#sharpen(0,0.51)
#blur(0.0,1.0)
#sharpen(0.0,0.85)
SeparateFields()
SelectEvery(4,0,3)
Weave()
Mole
3rd January 2012, 04:44
Good idea bout resizing down to 720 first. Didn't think of that.
Will try out as you suggested.
BTW, you in Thailand too?
nhope
3rd January 2012, 06:26
Oops, I meant downscale the width first (now edited). The code was correct though. Yes, I'm in Bangkok.
Mole
3rd January 2012, 06:32
Yeah, I thought so too because initially I read what you wrote and was thinking wtf, then I looked at the code and it's right.
Emulgator
3rd January 2012, 23:48
hd2sd() would be another option.
Mole
4th January 2012, 01:34
Interesting. Will check it out. Thanks!
henryho_hk
4th January 2012, 11:42
Or something with chroma placement correction: http://forum.doom9.org/showthread.php?p=1177125#post1177125
And you may consider, for more "correct" aspect ratio, resizing to 704x576, and then optionally pad 8 pixels to the left and right making it 720x576.
Mole
4th January 2012, 12:28
you mean like adding 8 pixel of black bars left and right? nah...
704x576 is still a valid DVD resolution, but I'm not sure if anamorphic is valid for this resolution.
If I remember correctly, anamorpic is only valid for 720 not 704 or 352 horizontal size.
hmm.. wait a minute... it's ANAMORHIC, so when you play it back, it will be resized to 1024x576 or whatever resolution the TV supports which will make it 16:9 regardless. In fact, putting any black bars anywhere would make it WRONG aspect.
Mole
4th January 2012, 12:33
I think I'll go for hd2sd(DeintMethod=0) which according to readme is Yadifmod + NNEDI2
The output looks OK to me and so is the speed.
henryho_hk
4th January 2012, 12:58
You can make a sample 1080 clip with a square or a circle, "convert" it to SD with your favourite method, and then test it in your target playback device.
720x576 PAL 16:9 is "wider" than 1920x1080 HD.
Mole
4th January 2012, 13:11
Can you point me with any links to a more in-depth explanation about this?
As far as I understand, 1920x1080 is 1:1 squared pixels while 720x576 anamorphic widescreen would have non squared pixel and upon playback it will have to be resized to correct aspect.
In other words, if the source was exactly 16:9 and you resized down to 720x576 (or 720x480 for that matter) upon playback, the picture would have been resized back to 16:9. How can it then be "wider"???
Mole
4th January 2012, 13:13
What about 1280x720? Is it also the same situation?
720x576 is "wider" than 1280x720 as well?
ajk
4th January 2012, 13:26
My understanding is that 704 is the more correct amount of actual image area based on the old analog standards. The 16 extra pixels in 720 are supposed to be black or "garbage" not really intended for viewing.
Mainly this does seem to be the case when looking at a DVD coming from a film source, or older TV/VHS recordings. But sometimes one does see 720 width material that does use all of the sides for proper image data.
In any case the overscan on a TV covers either case and the error in aspect ratio is not too noticeable. But for the time being in my own encodings I would stick with 704 pixels of actual image.
1280x720 and 1920x1080 are both exactly 16:9 with square pixels.
henryho_hk
4th January 2012, 13:53
Actually, it all depends on the player devices.
Mole
4th January 2012, 15:00
In this age of digital TVs I think there's no need to worry about overscan anymore.
I believe a LCD/Plasma TV connected to a player through HDMI/DVI should not perform any overscan at all and will show the full frame.
Ghitulescu
4th January 2012, 15:19
In this age of digital TVs I think there's no need to worry about overscan anymore.
I believe a LCD/Plasma TV connected to a player through HDMI/DVI should not perform any overscan at all and will show the full frame.
It will overscan both analog signals (it includes here the YUV HDTV, unless it has a specific option to deactivate it) and SD signals of all kinds.
You may test your equipment with test charts, like this one (http://www.cinedrome.ch/hometheater/testpatterns/Overscan.jpg). You'd be surprised.
TheSkiller
4th January 2012, 18:49
That whole 704<->720 thing has nothing to do with overscan. Yes, due to overscan you will never see the edges of the frame anyway, even on a LCD/Plasma screen but overscan is not the reason for it's existence, it's aspect ratio: the width the image should be to cover the area that represents a perfect 16:9 or 4:3 shape. This area is 704 pixels wide.
For an ITU compliant DVD you have to scale your 16:9 HD square pixel input to 704 width (for both PAL and NTSC DVDs). If you scale to 720 your DVD is not ITU compliant and will be slightly too wide when played back with ITU compliant hardware wich all standard DVD players are (Bluray players playing back such DVD are a different story...).
You can encode at either 704 pixels which is allowed for DVD just like 720 is, or you can padd to 720. The latter is not required and doesn't yield any benefits, I'd recommend to encode at 704x480.
Mole
5th January 2012, 02:11
The problem is as I said earlier, according to DVD specifications, anamorphic widescreen 16:9 can only be at horizontal resolution at 720.
704 and 352 can only be 4:3.
So I don't think I have a choice than to encode at 720 to be fully within spec.
It's such a small percentage that it's really not noticeable.
Also, are you saying then that ALL the movies released as anamorphic 16:9 at 720x576/480 are not ITU compliant???
Isn't it ironic then that the DVD specifications only allow anamorphic widescreen 16:9 to be only at 720 and not 704???
ajk
5th January 2012, 07:29
But you always have a choice to encode at 704 pixels of image + 16 black pixels.
Mole
5th January 2012, 07:50
Well, I hate black borders, period. I'd rather chose a picture which fills the entire frame and live with a tiny bit amount of aspect error (which can vary depending on playback device anyway).
I connect my TV to my PC and play whatever on it using software, so overscan is not an issue for me anyway.
Ghitulescu
5th January 2012, 08:07
Yes, on PC input most, probably all TV, perform underscan.
Do you object at the black borders in real cinemas? ;)
Mole
5th January 2012, 09:06
Well, in the cinemas it's obviously not visible while on a TV it is..
Gavino
5th January 2012, 10:36
Do what they do in cinemas then, hang some adjustable curtains round your TV screen. :D
Mole
5th January 2012, 11:04
Actually since I do have a choice, I'll simply resize with a tiny almost unnoticeable amount of skewed aspect.
If you are so serious about getting it right, maybe we might as well mention the fact that 23.976, the audio pitch is slightly lower since it has been speed down a tiny bit from 24fps or even worse, PAL 25 fps with an noticeable higher pitch.
In fact, slightly off topic I don't really understand why they just keep it at 24fps on BD nowadays in the age of digital TVs and PAL/NTSC is just a thing of the past and died with CRT TVs.
Instead they still either keep making it 23.976 or even worse, 25 and the audio has to be botched accordingly.
Also, does the BD specification allow for 60p or 50p?
Technically, any hardware capable of recording 50i or 60i should also be able to record in 60/50p. Well... except maybe it'd require a faster DSP in order to be able to handle and process the 2x amount of video data.
ajk
5th January 2012, 11:53
Blu-Ray allows for 50p and 60p but only in 720, not full hd. I suppose they may extend that in the future, however, with 3D films that need more bandwidth. Perhaps multi-layered discs or something.
2Bdecided
5th January 2012, 12:44
The problem is as I said earlier, according to DVD specifications, anamorphic widescreen 16:9 can only be at horizontal resolution at 720.
704 and 352 can only be 4:3.The only reference I've seen for 704 not allowing 16x9 is a badly written wikipedia article that could be interpreted to mean this. Do you have the actual DVD specifications?
704 is fine for 16x9, and avoids 8 pixels of black, and small aspect ratio errors somewhere or another.
I can't imagine who would design an MPEG decoder specifically to break that functionality, even if it wasn't in the DVD spec. Indeed, lots of other resolutions that really aren't in the DVD spec are widely supported in DVD players because they're called out in DVB - and the same few MPEG decoder cores are used the world over.
bob()
spline36resize(704,576)
#sharpen a little here if you want e.g. sharpen(0.5) or sharpen(0.5,0) or something far cleverer
blur(0,1)
sharpen(0,0.5)
assumetff().separatefields().selectevery(4,0,3).weave()
A better deinterlacer than bob is only visible if the output is SD progressive, or not blurred for CRT compatibility. If you think about it, the picture is already far sharper vertically than horizontally - because it's displayed at the equivalent of 1024x576 from only 704x576. 704x396(!!!) would have equal resolution either way. Bob already gets you at least 540 lines, which you have to blur further to avoid flicker/twitter on interlaced displays, and subjectively it's probably still sharper vertically than horizontally even after that. Depends how it's displayed I suppose - CRT, badly deinterlaced panel, or excellently deinterlaced panel.
Good luck getting a DVD MPEG-2 encode that faithfully preserves a decent downscaled HD source. It's never sharp enough, and it's always full of artefacts (IMO, compared with the lovely HD source!).
Cheers,
David.
TheSkiller
5th January 2012, 16:27
I agree with 2Bdecided, 704 and 352 are not limited to 4:3 on DVD, at least not for all practical applications. As pretty much nobody here really has the full official DVD spec documents, I'd say that simply implying "it works" is good enough. From the MPEG decoders point of view inside the DVD player, there is zero difference between a 4:3 flagged stream in 704 and a 16:9 flagged one.
It's such a small percentage that it's really not noticeable.I respect that everyone has his personal level of "not noticable" but the error here is 2.54%, and it is visible on perfect round objects and shapes. I made a comparison for that some time ago, here it is again:
http://img855.imageshack.us/img855/3677/errorpresentation.png
Also, are you saying then that ALL the movies released as anamorphic 16:9 at 720x576/480 are not ITU compliant???No, I'm not (although lots of commerical DVD are indeed not, it has been discussed here), but the point is just because a DVD is 720 pixels wide and does fill all those 720 pixels with picture does not automatically mean it's not ITU compliant aspect ratio wise.
I will give you an example how this is possible.
If you really want to stick with 720 and do not want any borders (like 704 embedded in 720) while still resizing ITU compliant, then simply make the whole 704x480 frame bigger (width and height) so that it reaches 720 pixels width. This will naturally cut off a negligible amount of picture at the top and bottom (which might be black bars anyway for Hollywood movies in 2:39:1 or so).
#ITU compliant downscale of 1080i HD to DVD 720x480 without any borders
Your1080iHDSource()
Bob()
Spline36Resize(720,480, 0,12,0,-12)
...
In other words, if the source was exactly 16:9 and you resized down to 720x576 (or 720x480 for that matter) upon playback, the picture would have been resized back to 16:9. How can it then be "wider"???
See, that's exactly what's not happening when being played back in ITU compliant standard DVD-player hence the picture needs to be resized the way we recommend you.
Playing it back on a PC is a whole different story, but going for a borderless 704 encode overcomes any possible aspect ratio related problems regardless where the DVD is played back.
Mole
5th January 2012, 20:30
You know what, it must be my eyes, but those 2 rounds looks exactly the same to me. 2.54% is minuscule. In a normal movie there is no way you'd be able to tell that a car or a person's face is 2.54% off... unless of course you are always aware of this fact in your mind. I bet if nobody told you, you wouldn't be able to tell unless the video happen to be of a perfect circle or something.
But thanks for letting me know of this fact, even though it won't change my mind anyway.
2Bdecided
6th January 2012, 14:59
...but if you can do it right or wrong, and both are equal effort, why would you do it wrong?
I agree it's very unlikely to notice a 2.5% error on a commercial recording. However, on a home movie, a 2.5% fatter or thinner person (or you) might be just noticeable. It is on a photo of someone you know.
I think TheSkiller and myself have been in the same old threads here where we and others have figured out that using 704 instead of 720 solves several potential problems, and creates none.
It doesn't matter to me what you do - I'm not going to watch the result - but it makes life slightly easier IMO + IME, and I'm all for making people's lives easier, even if I won't see the benefit myself.
Cheers,
David.
Mole
6th January 2012, 16:11
To be honest, initially I was going to go for 704, but not really because of the aspect, but it'll make the picture slightly smaller which will give a slight better quality at same bitrate. (I suppose it would probably make about same noticeable impact as 2.5% difference in aspect, but smaller pic=higher quality hands down..)
But my worry is that since I've read many places that the DVD specification only allows for 720 as anamorphic, I'm not taking the chance. In case there are cases where people may play it on a player which for some reason refuse to output as anamorphic and instead as 4:3 because it's 704 regardless of the aspect rate set.
So I'm going to go for the option which I'm confident will output as anamorphic without worries.
Also, I still refuse to agree that 2.5% difference in width is noticeable.
2Bdecided
6th January 2012, 18:23
But my worry is that since I've read many places that the DVD specification only allows for 720 as anamorphicMany places? I've only seen it here...
http://en.wikipedia.org/wiki/DVD-Video#Frame_size_and_frame_rate
...and from people quoting that.
I think the wikipedia author misunderstands. The point is that the 352 pixel resolution formats shouldn't be used for anamorphic (think how blurred they'll be), and so are not supported.
More to the point, there are several DVD authoring packages out there that will re-encode non-DVD-compliant video at the drop of a hat. Not one of them re-encodes anamorphic 704x576 to 720x576. Not one of them even flags it.
But if you want to base your videos on what someone wrote on wikipedia, without a reference to back it up, it's up to you.
Cheers,
David.
Mole
6th January 2012, 18:32
Actually, I've never even read that wiki article before.
It's been written here for several years now:
http://www.videohelp.com/dvd
I think it's been there maybe even before wikipedia existed when they were still called vcdhelp
OK, so you are saying that "somebody writes without reference to back up" but then I've not seen any reference contrary either.
So instead of trusting other places (even without any reference) I should instead believe some dude on a forum.
I'll be on the safe side till somebody shows proof that the DVD standard do actually supports it.
2Bdecided
6th January 2012, 19:13
The irony being that that's partly written from the DVDdemystified DVD FAQ and points to it for more details. That FAQ seems to say the opposite (listing 16x9 PARs for the 352 pixel video formats!).
However, you are correct. Look at this...
http://forum.videohelp.com/threads/163162-704x576-DVB-MPEG2-not-valid-for-DVD
So there you go - there is at least one DVD player (Pioneer DV-545, pre-2001 AFAICT) which won't output 16x9 from 704x576 pixels. I have learnt something!
Given that all ATSC and DVB standards allow 704x480/704x576 as 16x9, and hundreds of millions of STBs in the USA and Europe process exactly this, and no DVD players use the kind of multi-chip solution common pre-2001 (they all use SOCs - usually from companies who also make STB SOCs), it's probably quite safe to use this today, but I can now fully understand why you would not want to.
Interesting that no DVD authoring tools pick up on this. muxman, DVD architect, Video Re Do/TV Suite etc all pass it through without question.
This raises a problem. There's no 16x9 encoding option that gives the correct aspect ratio on PCs and DVD players, and plays on all early DVD players, and plays on PCs without black bars. Pick your poison.
For myself, I'll stick with 704 where its easier (and always for 4x3) - but for any commercial release, it seems 720 is essential with 16x9 content to maintain widest compatibility. Now I find how OCD I really am: can't bare the thought of encoding black bars, but can't bare the thought of deviating from ITU either. Don't really want to crop+expand either. Oh dear!
EDIT: I have a few posts recommending 704 to go and fix!
Cheers,
David.
Ghitulescu
6th January 2012, 22:14
You know what, it must be my eyes, but those 2 rounds looks exactly the same to me. 2.54% is minuscule. In a normal movie there is no way you'd be able to tell that a car or a person's face is 2.54% off... unless of course you are always aware of this fact in your mind. I bet if nobody told you, you wouldn't be able to tell unless the video happen to be of a perfect circle or something.
Well, the human mind is a bit more conscious of its surroundings as one might think. Inperceptible jitter in music can cause headaches. But, as always, one might be more sensible/sensitive than the other. Once one will learn what to look for when assessing the DAR/PAR, he won't need perfect circles, just motion. Circles are the bestk, but there are many other "imperceptible" things that help an awareful mind to get the perfect PAR of 1:1.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.