Log in

View Full Version : Any way to tell what --sar to use (ITU or non-ITU) for a DVD encode?


Pages : [1] 2

Logan9778
17th April 2017, 05:18
As the title.

I'm trying to encode one of my old Doctor Who dvd's to watch on plex, but I've realized, I don't know whether to tell X264 to use ITU or non-ITU SAR to get square pixels.

Is there ANY kind of program that can tell you whether it was recorded at ITU or non-ITU standards?

I'm using ITU for now, but its REALLY frustrating. It seems there would be a flag or such in the video. Or I guess they thought everyone would use a STANDARD like they should :p

:thanks:

Sharc
17th April 2017, 06:17
As the title.

Is there ANY kind of program that can tell you whether it was recorded at ITU or non-ITU standards?

:thanks:
No. Your eyes only.and/or the circle test.
Black left and right borders can be a hint for itu.

hello_hello
17th April 2017, 15:28
The rule of thumb is if there's a reasonable amount of black down each side (8 pixels or more) it's probably ITU (after the black is removed what's left should be around 4:3), otherwise if the picture goes right to the edge of the frame it probably isn't ITU. There's no rule though. For sources that were originally video tape such as classic Doctor Who, the chances of them being ITU are probably quite high.

Personally instead of ITU SARs, I use the mpeg4 SARs. They're very close to the same as ITU, they're mpeg4 compliant, easier to remember, and it turns out it doesn't matter if a 4:3 DVD is PAL or NTSC, the display aspect ratio is exactly the same (15/11 or 1.363637). The same applies to 16:9 DVDs. There's only one mpeg4 display aspect ratio for both PAL and NTSC (20/11 or 1.818182), assuming you're not cropping, or course.

A list of PARs/SARs:
https://forum.doom9.org/showthread.php?p=1058927#post1058927

If you happen to be using MeGUI you can add 15/11 and 20/11 as custom Input DARs in the Script Creator.

SeeMoreDigital
17th April 2017, 15:40
As the title.

I'm trying to encode one of my old Doctor Who dvd's to watch on plex, but I've realized, I don't know whether to tell X264 to use ITU or non-ITU SAR to get square pixels.

Instead of generating new AVC encodes, why not simply re-mux the DVD's MPEG-2 video (and audio) stream(s) into the .mkv container ;)

Ghitulescu
17th April 2017, 18:04
No. Your eyes only.and/or the circle test.
That is the true test - for there are movies that have been copied and/or edited under various conditions and media.
Black left and right borders can be a hint for itu.
All my British (usually BBC) series have their margins matted, parts anyway hidden in a true analogue SDTV system. Probably all of them look like having been sourced from tapes, although people told me many of them have been filmed on film. Maybe "exported" series are low quality?

Logan9778
17th April 2017, 18:27
Thanks Guys! I always learn more and more everytime I come here!

No. Your eyes only.and/or the circle test.
Black left and right borders can be a hint for itu.

Yeah, I forgot about borders. Hmm. It looks like they took a pic of the whole frame, out to the ragged edges, plus about 8 pixels left and right of the black stock.

Here's a pic from one of the VOB's.

https://picload.org/image/rcodgcla/vlcsnap-2017-04-17-12h43m04s13.png

What do you guys think?


Personally instead of ITU SARs, I use the mpeg4 SARs.

Ah, I thought I was using ITU, but it appears I'm already using the MPEG4 SARs. I've been using 12/11 for the PAL Doctor Who DVD's I have. Thanks!

Instead of generating new AVC encodes, why not simply re-mux the DVD's MPEG-2 video (and audio) stream(s) into the .mkv container ;)

I used to, but I REALLY HATE interlacing. That's why I started trying to learn AVISynth and its filters. I've found QTGMC running with AVISynth MT @ Placebo really cleans up the old Doctor Who video and does an excellent job of deinterlacing it. Encodes always look better than the original video. It appears it does a very light de-noise, which is nice, getting rid of some of the blotches, but leaving a lot of the grain. Plus, I can bob it, getting 50 FPS out of the video, which makes it smoother.

Maybe "exported" series are low quality?

American NTSC recodes are the worst. We seem to get everything as a redone second thought.

Sharc
17th April 2017, 19:11
Here's a pic from one of the VOB's.

https://picload.org/image/rcodgcla/vlcsnap-2017-04-17-12h43m04s13.png

What do you guys think?

This picture is already expanded horizontally by the player to 768x576 overall (forced DAR 4:3), it seems. You should post it without any resizing applied.
My best guess is that on the DVD it is 720x576 including the borders with ITU PAR of 1150:1053 (approx. 12:11).
However, what irritates me is the small bottom border, but unfortunately any top border is not visible in your picture.
If there is a top border as well it could mean a Generic PAR of 16:15 with a bit of zooming in and perhaps slight cropping ....

No pictures with a nice circle ?

SeeMoreDigital
17th April 2017, 19:26
I used to, but I REALLY HATE interlacing.
What playback devices are you using? If the MPEG-2 stream has been correctly flagged your playback device should be able to correctly 'de-interlace' the displayed images.

If you're able to. Please upload a few seconds of one of your sources?

Logan9778
18th April 2017, 00:13
@ Sharc - I redid the shots with DGIndexNV straight from some VOBs. I don't think these are stretched in any way. Should be 720x576.

Working with the video, there does always appear to be a pixel or 2 of black on top and bottom, which I usually crop out when encoding video.

In one of them, shot 5 I think, I can see the bottom of the frame coming up. Looks like there's some slight movement of the frame around. Happens to move at the sides as well, as the crop fails to keep out the black at times due to shifting frame.

Tried to get some good circles in them. Shot 8 is a pic of DGIndexNV info panel.

https://picload.org/image/rcodcirr/shot1.png

https://picload.org/image/rcodcira/shot8.png

https://picload.org/image/rcodcirl/shot6.png

https://picload.org/image/rcodciri/shot5.png

https://picload.org/image/rcodcidr/shot4.png

https://picload.org/image/rcodcidl/shot3.png

https://picload.org/image/rcodcidi/shot2.png

@SeeMoreDigital - I use Zoom Player, VLC, and MPC-HD. Eventually, I plan on putting these on Plex. One of the reasons I do QTGMC is that I also then use Simple X264 to crunch down the video to about half the file size, using CRF 18 and Very Slow setting.

Here's a minute of video from Planet of the Giants DVD. Converted to x264, but it should all be original VOB dimensions, 720x576, etc.


https://mega.nz/#!V6xkQCjb!WSWUsDp_89xI4keWtTHNUNFb85daeLUvXn6E6gJ2QVo

hello_hello
18th April 2017, 02:25
In one of them, shot 5 I think, I can see the bottom of the frame coming up. Looks like there's some slight movement of the frame around. Happens to move at the sides as well, as the crop fails to keep out the black at times due to shifting frame.

My personal cropping OCD forces me to stick to a few rules. One being I always crop for an exact 4:3 aspect ratio, or wider sometimes, but usually exactly 4:3. Never narrower than 4:3.

That means I invariably crop a bit of picture too, which helps ensure all the black is removed, except for the occasional DVD where the size of the borders changes dramatically. Then I'd use different cropping for different sections of the video.

I'd have to crop and resize your sample like so (assuming an mpeg4 Input SAR 12/11):

Crop(14, 4, -12, -4).Spline36Resize(640,480)

or some other 4:3 dimensions if resizing to square pixels. I'd bet a large amount of money there's no picture detail to be gained by resizing to a higher resolution than 640x480 though, given the source is interlaced.

The aspect ratio resulting from the cropping should technically be 1.3329, so there's a very tiny, almost unavoidable aspect error when resizing, but due to my personal 4:3 OCD, if not resizing I'd fudge the SAR just a little so the output DAR is still exactly 4:3. Instead of using 12/11 I'd go with SAR=1136/1041 and the output DAR should be 4:3. Damn OCD!

694 * 1136 / 1041 / 568 = 1.333333333333333333 :)

Logan9778
18th April 2017, 03:55
Lol, interesting. I might try something like that one day. Sure would solve some display problems. But yeah, there would have to be a LOT of different cropping for these old DW DVDs. The film seems to barely shift many times.

I'm pretty sure now that the --sar should be 12/11. I finally found a good circle facing me that I was happy with, then did some comparison shots with the un-stretched VOB, the Make MKV output @ 4:3 forced and the final X264 product at 4:3 forced. Have to force or otherwise it tries to calculate a display ratio of 704:574.

Circle looks pretty good. :)

https://picload.org/view/rcodiigl/drwhocircletest1211.png.html

And again, Thank you guys SO MUCH for your help!

Edit: Hmm, i did a test outputing a clip at --sar 12:11 and a clip at --sar:16:15. Forcing 4:3 AR on both videos, I couldn't tell the difference between them.

12:11 clip https://mega.nz/#!8jpQ0AIC!hRaqtP9iGWxobanJ_zVHG4hia_AcrDxfC5Ri_T_z3-Y

16:15 clip https://mega.nz/#!AnZnzbIS!7OC0aKFCnC0ujfEpv1JkBAbb0-C4FInrt0Uz7VFY8s8

hello_hello
18th April 2017, 07:06
Edit: Hmm, i did a test outputing a clip at --sar 12:11 and a clip at --sar:16:15. Forcing 4:3 AR on both videos, I couldn't tell the difference between them.[/url]

That's to be expected if they were cropped the same. They were encoded at the same resolution (704x572). The only difference is how they're stretched on playback due to the difference in pixel aspect ratio (SAR), but if you force the same display aspect ratio on playback, then they will be the same.

Personally I'm not timid about the cropping. If eight pixels need cropping for much of the video on one side, but for a few sections it's 12 or 14 pixels, I'd just crop 12 or 14 from the lot. The extra picture would have been off the edge of the screen back in the CRT days due to over-scanning so you wouldn't have seen it anyway. It's only if the cropping varies by a lot more than that I start getting fussy about it.

Cropping sections differently isn't hard to do if you know the frame numbers of the sections you want to change. For example if you wanted to change the cropping for frames 50 to 100:

Trim(0,49).Crop(14, 4, -12, -4)\
++Trim(50,100).Crop(2, 2, -24, -6)\
++Trim(101,0).Crop(14, 4, -12, -4)

As long as each section is cropped to the same resolution, or if you're resizing, as long as each section is resized to the same resolution etc.

SeeMoreDigital
18th April 2017, 09:01
Here's a minute of video from Planet of the Giants DVD. Converted to x264, but it should all be original VOB dimensions, 720x576, etc.It really needs to be a segment cut from your MPEG-2 DVD source ;)

Sharc
18th April 2017, 09:10
Edit: Hmm, i did a test outputing a clip at --sar 12:11 and a clip at --sar:16:15. Forcing 4:3 AR on both videos, I couldn't tell the difference between them.
Of course you couldn't. When you force the playback to 4:3 the player ignores the pixel aspect ratio (--sar or PAR) and stretches the picture including any borders stubbornly to 4:3 (or 16:9). That is what standalone players usually do with DVD or Blu-ray discs. There exists only 4:3 or 16:9 for playback, nothing else. SW players like MPC-HC for example offer the choice between fixed DAR (4:3, 16:9 ....) playback or playback according the Pixel Aspect Ratio (--sar or PAR) signalling which is read from the header of the video stream or from the container. (Unfortunately the info in the stream header and container are even sometimes conflicting for poorly authored material).

At the end, the difference between ITU and "Generic" (non-ITU) pixel aspect ratio is 2.4% only, and the "uneducated" viewer will most probably never complain about the slight distortion when the wrong pixel aspect ratio has been picked. Even more so considering the fact that ITU-DVDs with left/right borders are typically played slightly (2.4%) too narrow (forced 4:3 or 16:9 including borders) on todays HDMI digital player+TV infrastructure anyway. Hence no reason for sleepless nights :)

Logan9778
18th April 2017, 19:29
Yeah, thanks. Oh, my aching head :p I need to study AR again. But, it's probably going to force 4:3 on something like Plex anyway, isn't it? MPC-HC always reports PAR for 704x572 no matter what I force, so I can't tell what its doing. Zoom Player tells me forced 4:3 is 1.333 of course, and when I set it to source, I get 1.343 which is rounded AR for 704x572. So its taking the top and bottom crop into consideration as well. Should it be doing that?

But the worse part is, I don't think the aspect ratio is correct in any of the DW shows itself! There are NO round circles! Everything seems to be distorted! Doesn't matter if its VOB, MPEG pulled out with Make MKV, or the X264 encode. It's all the same as far as I can tell. Except for the ONE circle on the Dalek I found.

I need to find a new DVD where the circles are really round to test on.

Sharc
18th April 2017, 20:03
Now you are confusing me....
On DVD the objects are always distorted. I haven't seen a DVD with square pixels. It is always the player which cares for a undistorted playback, either by playing it as 4:3 or 16:9, OR according to the Pixel Aspect Ratio of the video stream.

Please upload a few seconds of the original .vob.

SeeMoreDigital
18th April 2017, 21:57
...It is always the player which cares for a undistorted playback, either by playing it as 4:3 or 16:9, OR according to the Pixel Aspect Ratio of the video stream.Indeed ;)

Logan9778
19th April 2017, 02:53
What I mean is, some of the circles still look distorted at 1.333 (forced 4:3) or at 1.343 (12:11 PAR). It's weird. I downloaded Mpeg2cut2 that will cut and pull out clips of the Mpeg2 stream from the .vob so I will upload some clips from it.

https://mega.nz/#!BzQ0mIaB!Hynp1jvLEF_Sovvxlqq-umuRpdbmK4GdY2E7qPKbOUo

https://mega.nz/#!wrJwgJqR!A2xHEBrlYknmksEL-PQuXl1BdfQAMxPjS4ImmbxIE0M

On the first clip, notice the black circle with the white X. It looks pretty off at 12:11 or forced 4:3.

On the second clip, the bottom dial looks distorted as does the circles on the elevators floor indicator. The decending lift doesn't look quite circular.

Mpeg2cut2 had some interesting AR's to view the vob with, and I tried 1.5 in particular. This made some of the dials look more circular, and the elevator floor indicator. However, the lift looked completely off.

What do you guys think?

EDIT: Hmm, I'm trying Hello_Hello's "Crop(14, 4, -12, -4).Spline36Resize(640,480)" to see how it comes out.

hello_hello
19th April 2017, 04:19
Don't forget you're not cropping to exactly 4:3, so if you force a 4:3 aspect ratio after cropping, you're distorting the picture a little. Your sample was 704x572.

704 * 12 / 11 = 768
768 / 572 = 1.343

704 * 16 / 15 = 750.9
750.9 / 572 = 1.313

Either way, if you force exactly 4:3 after cropping, you're distorting the picture.

That's what I was saying about deliberately cropping until you have 4:3, otherwise you won't have 4:3. There's no reason why it has to be 4:3 after cropping, but set 12/11 or 16/15 as the pixel aspect ratio (SAR - sample aspect ratio, in mpeg4 terms) and the shape of the pixels won't change, but the over-all display aspect ratio might, depending on the cropping.

You're correct. The dials look a bit squished either way, but it could just be a perspective thing (it can be deceiving) or the aspect ratio could have been messed up on the way to DVD. It happens. I've got Stargate SG1 DVDs where the Stargate is the shape of a football in a few shots.

https://s1.postimg.org/qk2lmce8f/ss2.gif

I only resized it quickly using the player (if you open a 4:3 DVD with MPC-HC and tap the 6 key on the numeric keypad once, you stretch to pretty much ITU resizing, and the 5 key resets it), but the final scene in your second mpeg2 sample looks very ITU to me.

https://s12.postimg.org/5wjxk5ll9/ss1.gif

Don't stress too much. I can tell you from experience nothing but insanity comes from it. Pick a SAR and go with it.

hello_hello
19th April 2017, 04:35
Yeah, thanks. Oh, my aching head :p I need to study AR again. But, it's probably going to force 4:3 on something like Plex anyway, isn't it? MPC-HC always reports PAR for 704x572 no matter what I force, so I can't tell what its doing.

704x572 is the resolution or storage aspect ratio, not the picture/display aspect ratio.

Because expressing aspect ratios as the shape of the pixels isn't very intuitive, MPC-HC converts it to a display aspect ratio.

https://s18.postimg.org/wtob9emft/ss3.gif

704x572 (192:143)

192 / 143 = 1.343
or
572 * 192 / 143 = 768
768 / 572 = 1.343

Admittedly that's not always particularly intuitive either, but it'd make less sense if MPC-HC displayed 16:15 or 12:11 as the aspect ratio for a 4:3 video.

Sometimes the aspect ratio shown next to "Video Size" is different to the aspect ratio listed in the video stream. That's because the video stream aspect ratio mightn't result in the video being resized to whole pixel dimensions, so the "Video Size" aspect ratio is rounded to whole pixels.

hello_hello
19th April 2017, 12:24
I forgot to mention it earlier but try this calculator. When you enter the cropping it calculates the new display aspect ratio for you as well as calculating the aspect error if you happen to be resizing. Plus it can help to wrap your brain around aspect ratios.

YodaResizeCalculator.zip (https://files.videohelp.com/u/210984/YodaResizeCalculator.zip)

hello_hello
19th April 2017, 12:41
I thought I'd accidentally deleted it, but I found it hiding when I looked again. It's a newer version of the calculator that as far as I know was never officially released, but it includes mpeg4 in the drop down PAR list.

YodaResizeCalculator 0.4.0.1.zip (https://files.videohelp.com/u/210984/YodaResizeCalculator%200.4.0.1.zip)

Sharc
19th April 2017, 14:01
I had a look at the elevator clip. Taking the elevator floor at the end of the clip as a reference circle it appears that the the pixel aspect ratio is indeed slightly off the kilter. It seems to be 1.125 rather than 1.09 (12:11). But as Hello_Hello mentioned the perspective could be misleading.
You can try the following script (which doesn't crop anything) to get the circle exactly back for both 4:3 playback and for PAR signalling:

DirectShowSource("C:\......\VTS_02_2_2.MPG")
tdeint(mode=1,order=1) #bob (deinterlace) the interlaced clip before resizing
spline36resize(720,546).addborders(0,14,0,16)
Now encode with --sar 16:15.

Have fun!

P.S.
And be careful with MeGUI for setting the --sar 16:15. Don't select Bluray-Compatibility, otherwise the --sar 16:15 will always and silently be overwritten by 12:11, even though you set Force SAR 16:15.

Sharc
19th April 2017, 16:40
...I downloaded Mpeg2cut2 that will cut and pull out clips of the Mpeg2 stream from the .vob .....
Just for your info: you can extract a segment from a .vob with DGIndex as well. Simply select the range with the brackets [.......] and save.

Sharc
20th April 2017, 08:10
I refer to my post #23 here (https://forum.doom9.org/showpost.php?p=1804291&postcount=23).
Thinking about it, the Pixel Aspect Ratio of your uploaded elevator clip VTS_02_2_2.mpg is 1.125 which is 9:8. This is exactly the inverse of NTSC 4:3 Generic PAR of 8:9 !
So either something has been messed up when this DVD was transferred from NTSC to PAL in an attempt to restore it to square pixels or whatever, or mpeg2cut2 (which I don't use) did some processing (resizing) of the original .vob.
Any idea?

Edit:
So you could actually encode with x264 --sar 9:8 without any resizing. It works, but it is beyond any standard. If your player follows the --sar the playback will be undistorted. However, when you force 4:3 playback you will get a distortion of about 6%. Therefore I recommend to resize it properly e.g. according to post #23.

Logan9778
20th April 2017, 08:45
Sorry, nope! I don't think the cutter did anything. Things in this video are just freaking strange. Some circles seem 1.333 or very close. Other's seem to be about 1.45 DAR. Its like they cut out parts of other video and stuck them in. Like it's been photoshopped. And yeah, I get the feeling this is not from original film, or if its even a standard PAR. How did you get the 1.125 par? I was wondering about that.

I did finally see how you guys are using Yoda's Resize Calculator. I never understood the calculators till now. What is the benefit of resizing though? I do see a very slight amount of noise and data loss from the resize.

Sharc
20th April 2017, 09:20
How did you get the 1.125 par? I was wondering about that.

2 methods here:

Method 1: (quick and dirty)
- Navigate to the picture with the circle e.g. with DGindex.
- with a pixel ruler, measure the horizontal and vertical diameter of the "circle" (ellipse)
- Divide the vertical by the horizontal => PAR
For your clip I am getting approx. 356/316 = 1.127

Method 2:
- Stretch the picture horizontally e.g. via Avisynth until the ellipse becomes a perfect circle,
e.g. spline36resize(x,576) #your original height is 576 pixels
- change x until you get a nice circle (check with pixel ruler or overlay a true circle)
- PAR=x/original width (in your example the original width is 720)
For your clip I got a circle for x=810 => PAR = 810/720=1.125

You can do similar with VirtualDub of course. Just be a bit careful with "any" player as it may do some unwanted processing.

Sharc
20th April 2017, 09:37
... What is the benefit of resizing though?
For example:
- Make it look the same (undistorted) for forced DAR or PAR signalling playback (post#23)
- Make it compliant with a video standard (resolution, PAR ....)
- Crop off dirty borders or head-switching noise; add the borders back or resize for standards compliance.
- make it playback device compatible

hello_hello
20th April 2017, 09:50
I did finally see how you guys are using Yoda's Resize Calculator. I never understood the calculators till now. What is the benefit of resizing though? I do see a very slight amount of noise and data loss from the resize.

Technically encoding anamorphically is probably the best method (crop & set the original SAR, no resizing) as after cropping it encodes the remaining video "as-is".

Technically the next best method would be to resize to square pixels by stretching the width but without resizing the height (after cropping).

Third best would be to resize to some other square or anamorphic pixel dimensions.

Don't forget the calculator can help you crop to a particular aspect ratio (ie 4:3). You don't have to resize, and if you're not, just ignore the calculated aspect error (it doesn't apply) and set the original SAR.

The only disadvantage to anamorphic encoding is if you have a player that ignores aspect ratios in MKV/MP4 files. The media player in my TV ignores them, as does one of the Bluray players in my house (when playing video via USB), so I resize everything to square pixels. That way there's no worrying about it always displaying correctly.

I find for interlaced content you can usually get away with resizing down a bit (after de-interlacing). It's a bit like 1080i vs 720p. You can usually de-interlace the former and resize down to 720p without losing much detail, if any. By resizing down you generally save some bitrate for a given CRF value, or you can use a lower CRF value and increase the encoding quality. If all resizing down costs you is noise, that's probably not a bad thing.

And I quite like the sharpening effect that can result from resizing with Spline36, most of the time.
https://forum.videohelp.com/threads/378501-Resolution-Bitrate-and-Quality#post2444902

They're probably the main pros and cons. However you prefer to do it is probably the right way. :)

Logan9778
23rd April 2017, 07:25
Thanks guys! In the end, I decided to just keep doing what I was, as Plex seems to not try and force 4:3, and keeps the video at aspect as-is, with just cropping.

Logan9778
28th May 2017, 21:46
Hey guys, if anyone is interested, just found something neat. The old Gspot program will tell you the PAR of a VOB file. Just confirmed the old Doctor Who is indeed 16:15 PAR. :)

Sharc
28th May 2017, 22:44
We are all tool believers, aren't we?
As has been said many times there is no tool which can determine the PAR (PixalAspectRatio) of a DVD reliably because it is neither written in the stream nor in the container nor anywhere else.
So what GSpot probably does is it applies the formula PAR=DAR/SAR. In your case PAR = 4:3/(720:576) = 16:15. That's all, but not the whole truth and is typically misleading as soon as borders are added. There is no other way to find out the true PAR than the circle (or square) test as shown in previous posts.

Logan9778
28th May 2017, 23:13
Yeah, but the more and more I look at the DVD, I'm becoming convinced it's 16:15. Unfortunately, the circles in it are just all over the place, ratio wise.

I've pretty much given up with the circles in it. I'm just trying to make the MKV and the original VOB look the same in MPC.

Edit: Eh, your probably right, crazy MPC looks like its gone back to displaying the DVD at 12:11 now. Ugh. But I did just manage to find a circle looking straight at me. Like someones looking through a scope in a video game. Now to try and measure it. I'm having problems with Photoshop, but I just saw MATLAB has a program to pick out perfect circles. I will try to see what that does.

hello_hello
29th May 2017, 06:41
Don't forget those old Doctor Who episodes aren't the originals. Probably little of the original video tape survives. I was watching a DVD extra a while back explaining how episodes were filmed for distribution by playing the original video tape and literally pointing a film camera at a TV screen, and those films were sent to other countries for airing, where they were often cut for censoring etc. Many of the early episodes now come from recovered film recordings, a few are from very early home video recordings, and some from other sources, and not always the same source per episode. I think the latest restoration process also includes some sort of frame/field interpolation to give them the original "video" look again, and from the little I've seen, under the circumstances the end result has been fairly good, but it isn't surprising the aspect ratio might have been fudged now and them.

The aspect ratio fudging seems a bit obvious in your samples, once you're looking for it, so maybe it's a pity nobody picked up on it, or maybe someone did before it was restored and originally it was much worse? Who knows.

I don't know where the aspect ratio information is stored on DVDs but sometimes a player will get it wrong if you're just opening the vob files directly. Some of the extras on your DVD would no doubt be 16:9.

Have you tried using Irfanview for the circle test? It doesn't "detect" circles as such but it has a "paint" plug-in that either comes standard or as part of the plugins pack. Probably most image programs have a similar function, but you can draw perfect circles by selecting the circle function and holding down Ctrl+Shift while you drag the mouse, so you can click on the centre of an object that should be round and drag the mouse to draw a perfect circle around it. Holding down shift while dragging with the rectangle function selected draws perfect squares.

hello_hello
29th May 2017, 10:36
I remembered the name of the interpolation process they use. It's called VidFIRE (https://en.wikipedia.org/wiki/VidFIRE) (Video Field Interpolation Restoration Effect). According to Wikipedia, it's not used for much else aside from old Doctor Who.

I'll confess I'm somewhat dubious as to how effective it'd be for those old Doctor Who episodes though. Even after restoration they're still quite noisy and there's plenty of motion blur so I don't know if it'd make much difference. I guess the way to find out would be to de-interlace one with QTGMC to 25fps and then again to 50fps to see if it's easy to tell them apart.

The couple I've seen were actually NTSC DVDs where they'd taken the freshly restored video and field blended them for 29.970fps, and that looked really good.... :(

Logan9778
30th May 2017, 03:22
Yeah, thanks. These old movies are just a hot mess. Circles seem all over the place. They'll look right at 12:11 PAR and then look bulged in another spot. I guess all DVDs are 16:15 PAR at FAR x PAR = DAR, or at least seem to be. Just gives you 4:3.
I'm still trying to understand ITU and Non-ITU. As far as I can guess, I'm guessing that the ITU ones are the old DVDs that were meant for CRT TVs with rectangular pixels and 704 horizontal display. So the video is stretched to 720 with 704 horizontal showing the whole video and the black bars going off the screen as overscan. With non-ITU, the whole video is supposed to be shown in the 720 horizontal with no overscan. Anyone know if I'm right? Really trying to understand why ITU and non-ITU are different.

QTGMC is really nice. It does a great job clearing up some of the noise and garbage when you set it to Placebo, and really doesn't take up that much CPU.

And yeah, I think a LOT of these old videos are from video tape and broadcasts captured from TV. Not film. I have a Faulty Towers DVD that has horrible ghosting because you can tell its from some old captured broadcast where the signal bounced and hit the antenna a couple of times.

hello_hello
30th May 2017, 09:40
The way I understand it, the analogue ITU spec is the basis for determining the PAR when sampling an analogue signal and converting it to digital (there's no pixels in an analogue image). The upshot is, only 704 of the width ends up contributing to the 4:3 aspect ratio, so you'd crop 8 pixels from each side and what's left would be 4:3.
For PAL, I think it works out to roughly a width of 703 and a PAR of 59/54, which doesn't work in the digital world so 704 and 12/11 are used instead.

Digital square pixel sampling would use 4:3 worth of square pixels, ie 768x576, and I guess that's where the difference is, because if you resize that to 720x576, then resize it back on playback using the ITU method you end up with 786x576, so it's slightly stretched.

This is an interesting read, at least in respect to 4:3 analogue vs digital. http://lurkertech.com/lg/video-systems/#pixelaspect

I tend to go with mpeg4 or ITU PARs for 4:3 and generic PARs for 16:9.
I've compared quite a few old PAL 16:9 DVD encodes resized to square pixels based on a non-ITU PAR (64/45) with newer HD versions, and I can only recall a couple of times where there was an ITU vs non-ITU difference in the aspect ratio. Mostly, they've been the same.
The 4:3 DVDs I have tend to be video sources originally and are most likely ITU. Film transferred to 4:3 DVDs might very well be a different story, along with old sources such as Doctor Who that've gone through an extensive digital restoration process.

Sharc
30th May 2017, 11:06
About Sampling Rate and Pixels see also here.

https://forum.doom9.org/showpost.php?p=1686753&postcount=17

Actually (or unfortunately) studios can squeeze and distort a picture almost to their liking. As long as they pad it with borders to standard DVD resolution and declare its DAR as either 4:3 or 16:9 no player will ever complain.

hello_hello
30th May 2017, 16:05
Now I've read it again, the way the currently used PARs are explained on the page I linked to seems to be easy way to look at it.
It says the industry had settled on a convention of sampling analogue 480i at exactly 12 3/11 MHz, and 576i at exactly 14.75 MHz, so because the ITU spec says a line contains exactly 720 pixels, the sampling rates being used in the real world are divided by the sampling rate in the ITU spec for the real world PARs.

For NTSC that's 12 3/11 MHz / 13.5 MHz = 10 / 11 (640*11/10=704)
For PAL that's 14.75 MHZ / 13.5 MHz = 59 / 54 (768*54/59=702.9) which I assume for mpeg4 would be the "fudged" to 12/11 to round it to 704.

Logan9778
31st May 2017, 01:04
Thanks guys! I THINK I'm beginning to understand it now! :p Let me mull over this new info.

Edit: I'm working on one of my Fawlty Towers DVDs and it has 16 pixel wide black bars on both sides. So I re-calculated PAR assuming 688 pixels width was the actual video, and came out with 48:43 PAR. 12:11 never did look exactly right. Circles are looking a lot better! I'm beginning to think some of the time, wider or thinner bars than 8 pixels wide might mean a custom PAR. I just can't believe how they did whatever they felt like in putting these videos to DVD. Even the old CRTs wouldn't have played some of them at correct AR.

Thanks again for the info! It sure gives me a new way of looking at PAR.

Ghitulescu
31st May 2017, 07:42
Good that you mentioned BBC.

BBC used a different approach.

The digital frame sizes are 788 and 1050 respectively (PAR=1), for they include also what BBC calls blanking. The extra pixels are usually painted black.

Resize then to 788/1050 then cut the black borders and you'll end with some strange number of pixels but quadratic.

Sharc
31st May 2017, 08:09
I'm beginning to think some of the time, wider or thinner bars than 8 pixels wide might mean a custom PAR.

Caution! Don't take this as a rule. The video can be cropped and borders become then wider than 8 pixels. Cropping does however NOT change the PAR. Only resizing will affect the PAR.
Circle test, circle test, circle test ..... ;)
I just can't believe how they did whatever they felt like in putting these videos to DVD. Even the old CRTs wouldn't have played some of them at correct AR.
Absolutely. One can find all kind of crap, especially with old transfers. The studio monkeys sometimes just didn't know what they were doing.

hello_hello
31st May 2017, 15:38
Edit: I'm working on one of my Fawlty Towers DVDs and it has 16 pixel wide black bars on both sides. So I re-calculated PAR assuming 688 pixels width was the actual video, and came out with 48:43 PAR. 12:11 never did look exactly right. Circles are looking a lot better! I'm beginning to think some of the time, wider or thinner bars than 8 pixels wide might mean a custom PAR. I just can't believe how they did whatever they felt like in putting these videos to DVD. Even the old CRTs wouldn't have played some of them at correct AR.

I wouldn't say it means a custom PAR was used as such as there's no logical reason for doing so, but I'll have to drag my Fawlty Towers DVDs out for a look because now you've mentioned it I have a vague memory of the grandfather clock face (next to the stairs) never looking quite round, even when using an ITU PAR. Are those "remastered"? I can't remember off the top of my head, but if they were remastered in a square pixel format before resizing for DVD, maybe someone stuffed up.

They wouldn't be the first DVDs with a large amount of black down the sides though, and sometimes it changes from scene to scene. My Men Behaving Badly DVDs are all over the place. I remember a few sections with well over 30 pixels of black down one side, but the picture aspect ratio still looked normal.
In those situations I'd crop the extra black and some extra picture from the top and bottom until what's left is 4:3 again, as that way it can be resized to the same 4:3 square pixels dimensions as the rest of the video.... if you're resizing to square pixels.... which I do.

Quite a while ago I encoded the extras from a Bluray. They were mostly SD, but many of them contained scenes from episodes, so I thought I'd resize them and compare the aspect ratio to the HD versions. An mpeg4 PAR wasn't right. If I remember correctly generic 16:9 resizing was much closer to the HD versions, although not perfect. That's the only time I've compared them like that, but it made me wonder if the mpeg4 PARs for SD Blu-ray are being ignored the same way ITU is for DVD.

Logan9778
1st June 2017, 18:14
Good that you mentioned BBC.

BBC used a different approach.

The digital frame sizes are 788 and 1050 respectively (PAR=1), for they include also what BBC calls blanking. The extra pixels are usually painted black.

Resize then to 788/1050 then cut the black borders and you'll end with some strange number of pixels but quadratic.

Thanks, I'll try that.

Looking back at the Doctor Who's I've been trying to do, and they are also Waayyyy past 12:11 PAR stretch. As you said Sharc, I think in the end it's just circle test, and try to calculate out the real PAR. The amount of black bars doesn't seem to matter on most, except maybe Fawlty Towers.

hello_hello
2nd June 2017, 04:39
Thanks, I'll try that.

I don't know where that theory came from, but it wouldn't make any difference.

ITU and mpeg4 resizing both give you 786 x 576 (or 1048 x 576), with the aspect error for the mpeg4 PAR being slightly higher, but still only 0.07%. Resizing to 788 or 1050 instead obviously only increases the width by 2 pixels, or just under 0.2%.

I could understand the BBC using 788 instead of 786 as it's mod4, but 1050 is mod2, so that doesn't seem like it'd be the reason.

I doubt you'll ever find the "real" aspect ratio for those DVDs, especially for episodes that were reconstructed from different sources. The aspect ratio probably would have been fudged differently throughout.
I recall seeing something on how one of the old Jon Pertwee series was restored. Apparently the only colour copy in existence was an old home VCR recording, but there was a sharper black and white film print, so they overlayed the colour from the video onto the film version, except the film version had been made by pointing a film camera at a TV screen, and back then TV screens were far from flat, so the film version had to be warped a little to match it to the VCR recoding. That probably wouldn't have been enough to fudge the aspect ratio noticeably on it's own, but back in the very early days I wonder how the TVs would have been calibrated before they were used to record the film version. Probably by playing a video while a technician fiddled with the picture width until it looked about right.

Ghitulescu
2nd June 2017, 07:44
I could understand the BBC using 788 instead of 786 as it's mod4, but 1050 is mod2, so that doesn't seem like it'd be the reason.
The reason is the blanking, and these are the figures BBC herself provided to contractors.
BBC tried all her time to enforce some standards, but not always was successful. BBC has her own audio level, her own frame sizes, her own Teletext/Videotext codings etc... not too different from the others but enough different to make "perfectionists" cry.

hello_hello
2nd June 2017, 11:20
I'm a bit confused by this. The ABC describes a 702 pixel width as a "legacy" format.
The info below adds up to the whole 720 pixel width containing picture, but what's the result of the "digital Betacam format" part of the spec. Is it the same as analogue where the aspect ratio is a little wider than 4:3 (only 704 width), or is it 4:3 in and 4:3 out when it's digital? If the latter is the case and the same process is used for DVDs, they'd have an exact 4:3 or 16:9 aspect ratio too, I assume.

From 2011 (pdf link): http://www.abc.net.au/tv/independent/doc/ABC_Delivery_Specs_Aug_2011.pdf

Introduction
The following specifications are based on current and commonly accepted standards. The ABC thanks the BBC, Free TV Australia (Federation of Australian Commercial Television Stations), SMPTE, EBU, ITU, Dolby Laboratories and the Sony Corporation.

STANDARD DEFINITION
2.2.1 The Supplier shall deliver the product as a Standard Definition Television (SDTV) videotape recording in the Digital Betacam Format. The video tape recording shall be 625 lines at 25 frames per second and interlaced 2:1 (576/50i). This shall be in agreement with the specifications of Recommendation ITU-R BT. 601-5, SMPTE 259M (as revised).
2.2.3 All SDTV programs produced using modern digital equipment shall have narrow horizontal blanking, ie. active vision shall be 720 horizontal pixels wide. Legacy programs with 702 pixel wide vision (wide horizontal blanking) will also be acceptable. A single program shall have consistent blanking throughout.
2.2.4 All SDTV widescreen programs shall have 720 pixels x 576 lines active picture area

Ghitulescu
2nd June 2017, 13:41
2.2.4 All SDTV widescreen programs shall have 720 pixels x 576 lines active picture area
The whole line is, after proper 4:3/16:9 DAR, 788 pixels wide in 4:3 and 1050 in 16:9.

hello_hello
2nd June 2017, 15:41
I don't understand how you get 788 pixels from that. I don't see any mention of aspect ratio, only that there's 720 pixels of active picture. I'm not saying after resizing to a "proper" 4:3 it wouldn't be 788 pixels wide, but there's nothing there to indicate that's how it should be resized, or it should be wider than 4:3 (ie 788x576) before it's resized for 720x576 PAL.

It probably is the way it should be done, but the question is, is that the way people are doing it, or is it common for an exact 16:9 image to be resized to a 720 width.

Logan9778
3rd June 2017, 18:42
Lol, I pretty much gave up as well on finding the "real" aspect ratios. I'm pretty much just going by circles now, and trying to work out a decent PAR. BBC just seems to be HORRIBLE. They should hire one of you guys to teach them the meaning of the word "aspect ratio".