View Full Version : DAR/PAR/Mpeg4 modifier and Anamorphic AVI's
jmac698
24th February 2010, 20:25
Hello,
I'm trying to make proper anamorphic avi's (with xvid, mpeg4modifier).
In fact, I do have them... using autogk I just set force to 4:3. Upon playback, if I have to set my player to 4:3 and my tv to 16:9, so player does nothing to the video and the tv does the stretching.
Unfortunely for real 4:3 programming I have to switch the tv to 4:3.
Now, a better way. Just fix those old avi's with mpeg4modifier and setting PAR to 16:9 and DAR to 16:9. That was my best guess anyhow. I read alot about dar/par/sar and I'm still not sure how to set them properly, what is the effect of the other settings.
For reference, these are the options presented in MPEG4 modifier:
PAR
1:1
4:3 Pal (should be equivalent to 16:15)*
4:3 Ntsc
16:9 Pal (should be 8:9)*
16:9 NTSC
custom
DAR
4:3
16:9
1.85:1
2.35:1
custom
Can you give me a working formula of input vs output dimensions based on Par/Dar? That would make it perfectly clear.
*Consumer Electronics Association (March 2008). "CEA Standard CEA-861-E: A DTV Profile for Uncompressed High Speed Digital Interfaces."
This standard, which is the basis for HDMI, specifies 16:15 (1.0666) as the Pixel Aspect Ratio of 4:3 576i/p and 8:9 (0.888) as the Pixel Aspect Ratio of 4:3 480i/p.
There are other PAR values floating around, but this is the only one that is relevant as I watch over HDMI. I can't really be sure without testing, but due to scaling to my 1368x768 panel, *nothing* is ever shown in proper aspect on my TV. I've seen all sorts of cropping issues *sigh*
ps I do plan to make a test video and test every combination on my 4 devices. So far VLC does show some differences, so does a bluray player, but not a dvd/divx player. I'll just use the bluray player or wdtv anyway.
jmac698
26th February 2010, 05:22
These are the results of a test with Mpeg4Modifier, in an attempt to create correct and usable anamorphic AVI's (with xvid/divx).
I created a plain xvid of 720x480, then ran it through Mpeg4Modifier in all combinations, then noted the PAR/DAR as reported by both Mpeg4Modifier or MediaInfo afterwards.
Then I played each file in VLC in order to determine the final resolution. VLC will play the files stretched (un-anamorphic) as appropriate.
Working backwards, we can confirm exactly how these settings of Mpeg4Modifier are working.
Once the proper settings are determined, we can then play test files on various media devices. If the device stretches the file properly, this is a great result - next a guide can be written to make working anamorphic avi's, and capture the full quality of the source material. Finally I can post test videos, to determine which devices reliably play these special anamorphic AVI's.
The first column is the option which was clicked in Mpeg4Modifier. The second column is the readings when the file was read back into Mpeg4Modifier. The 3rd column is the DAR as reported by Mediainfo (this value always corresponds to that reported by Mpeg4Modifier, except in some cases Mpeg4Modifier reports no value).
The last column is the actual video dimensions as displayed by VLC 1.05. It represents the "square pixel" or unsqueezed dimensions. Even though these dimensions sometimes exceed 720x480, on a real TV it would be scaled down to fit within 720x480. In other words, these dimensions give the final aspect ratio as displayed
Setting PAR DAR Mediainfo_DAR VLC_Dimensions
none 1:1 1.5:1 1.5:1 720x480
DAR=2 4:3 2:1 2:1 960x480
DAR=43 8:9 4:3 4:3 720x540
DAR=169 32:27 16:9 16:9 853x480
DAR=185 37:30 1.85:1 1.85:1 888x480
DAR=235 1:1 1.5:1 720x480
PAR=2 2:1 3:1 3:1 1440x480
PAR=4:3 4:3 4:3 720x528
PAR=16:9 16:9 4.615:1 872x480
jmac698
26th February 2010, 08:54
I have the answer. When played back in VLC, the formula is:
w1=(PAR>1?PAR:1)*w
h1=(PAR<1?1/PAR:1)*h
Where w/h is the file's actual dimensions and w1/h1 are the displayed dimensions.
PAR is the only factor which stretches the video; it is calculated from DAR if you set only DAR in the program. The formula to calculate PAR from DAR is:
PAR=DAR/(W/H)
The program has some built-in values for PAR; they are follows:
NTSC 4:3 PAR=10:11
NTSC 16:9 PAR=40:33
PAL 4:3 PAR=12:11
PAL 16:9 PAR=16:11
To properly make an anamorphic avi, encode with AutoGK, force aspect 4:3, run modifier, select DAR 16:9. That is my guess now, aspect ratios are quite complicated. Ideally I want to prove that for specific players, this setting gives exactly the same video as a widescreen DVD would in the same machine, regardless of any standards or theories.
jmac698
26th February 2010, 10:32
Compatibility Testing
-VLC respects preset and custom PAR
-A bluray player had 3 reactions; a plain file always displays as 1:1 pixels. Any 4:3 settings (PAL/NTSC) always forces 4:3 aspect. Any 16:9 settings always forces 16:9 aspect.
-A Divx player alway played fullscreen, regardless of PAR or dimensions.
Wilbert
26th February 2010, 16:13
To properly make an anamorphic avi, encode with AutoGK, force aspect 4:3, run modifier, select DAR 16:9.
I'm not sure you still have problems ... So i will just add some remarks.
If your source has square pixels (i'm not sure whether that's the case when reading your posts above) then it is not possible to make an anamorphic avi (without reencoding and resizing the video).
If your source is squeezed (say dvd 720x576 @ 16/9), you can set the pixel aspect ratio (PAR) setting to 16x9 in XviD. (I mean, there shouldn't be any need to use modifier after encoding.)
When setting DAR in mpeg4modifier, it will calculate the corresponding PAR (by using the formula your posted) and set that in the video stream. (DAR itself is not supported in MPEG/ASP.)
jmac698
26th February 2010, 21:41
Wilbert,
Thanks for your comments.
In fact, I did a test with AutoGK on an original anamorphic source.
The resulting actual dimensions were 640x272. Mpeg4Modifier reports square pixels. Therefore, AutoGK did not produce an anamorphic video by default.
My suggestion is now:
-open anamorphic source in AutoGK
-set Advanced Settings to fixed width, 640, original soundtrack
-press ctrl+F9
-select force mpeg matrix, select Override input AR, select 4:3
-select 2G size
-when finished, use Mpeg4Modifier, save new version with PAR 16:9 (NTSC/PAL as appropriate to you)
-result will play properly in VLC, some devices. When it looks improper, use the player software to force 16:9 aspect. For device, set video type to "4:3 TV" and adjust your TV to "Widescreen" mode. This gets the unstretched video to the TV and lets the TV finally stretch it.
Warning! This only works for full 16:9 anamorphic films. 2.35:1 films will not work this way, they end up vertically streched, as there is no working 2:35 flag that works in any devices I tested (computer players can still be made to work, however).
In such cases, you can use fixed width of 720 to get more quality.
Note2: AutoGK cannot make a 720x480 video. If you choose fixed width 720, it makes 720x540 (or so) to maintain it's idea of aspect.
jmac698
26th February 2010, 21:55
Oops, I tested 2.35:1 as well. It does work; my mistake. I feel the quality is noticeably sharper as well. The default which creates 272 pixels high is quite small.
jmac698
26th February 2010, 22:07
One more thing - you can now set 720 fixed width always. This final version is 720x416 compared to starting at 640x272, an amazing 53% better resolution in vertical. This is the first time I've done this (I dunno why??) but it looks amazing. The best xvid I've ever seen.
Wilbert
27th February 2010, 01:14
In fact, I did a test with AutoGK on an original anamorphic source.
The resulting actual dimensions were 640x272. Mpeg4Modifier reports square pixels. Therefore, AutoGK did not produce an anamorphic video by default.
Ok, perhaps it's not possible in AutoGK to set your target PAR. You can set it in the XviD settings, so i suspect you can set it in GKnot too (although it's years ago when i played with it). Of course, you should not resize when you do that. Can you set the Aspect Ratio tab in the XviD settings within GKnot": http://www.doom9.org/index.html?/xvid-vdub-final.htm ?
jmac698
27th February 2010, 01:49
I'm not able to read that link? I don't know how to stop autogk to adjust custom settings. I tried some searching, but no results yet. I'm aware there's some tools that are autogk helpers.
Anyhow, perhaps I can use some other tool. Are you able to help with my other thread, for a replacement to autogk?
I was looking for something as simple but just a few more options, like this one obviously.
jmac698
27th February 2010, 01:50
and yes I see the aspect ratio tab in xvid settings.
Motenai Yoda
27th February 2010, 12:06
i've made one calculator that show the dar
http://www.digitalexpression.it/forum/index.php?showtopic=1099
b66pak
27th February 2010, 16:10
@Motenai Yoda thanks a lot...
_
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.