Log in

View Full Version : MeGui: Convert 720p Video to PAL DVD


Hobojobo
12th January 2014, 22:29
I recorded a movie via SAT. It is in 720p.
I want to convert it to PAL-DVD (anamorp) with MeGui.
MeGui shows me a input DAR of 16:9. Correct.

When I choose Clever anamorphic encoding, it is resized to 720:400?
Or should I resize it manually to 720:576?

Right now I am a bit thick in the head.

Thank you in advance.

Zathor
13th January 2014, 21:26
Please post a sample.

hello_hello
14th January 2014, 14:42
I recorded a movie via SAT. It is in 720p.
I want to convert it to PAL-DVD (anamorp) with MeGui.
MeGui shows me a input DAR of 16:9. Correct.

When I choose Clever anamorphic encoding, it is resized to 720:400?
Or should I resize it manually to 720:576?

Right now I am a bit thick in the head.

Thank you in advance.

That sounds about right. MeGUI doesn't let you choose the height when using anamorphic encoding so you can't use MeGUI to do "unusual" resizing. MeGUI is picking what it thinks is the appropriate height for the chosen width. So for 1280x720 it'd want to resize to 720x400 (or 720x404) if you change the mod setting to mod2.

The script creator tab should have this at the top, if anamorphic encoding is enabled:

# Set DAR in encoder to 16 : 9. The following line is for automatic signalling
global MeGUI_darx = 16
global MeGUI_dary = 9

As long as the DAR is 16:9 you can change the resizing to anything you like....
720x576, 720x300, 400x860...
It doesn't matter. You should end up with an anamorphic encode using the DAR in the script tab and whatever resolution (resizing) you added. Just change the resizing before loading the script for encoding.

Alternatively, rather than use anamorphic encoding you could simply resize to 720x576, and in the x264 encoder configuration, change the "Force SAR" setting (under the miscellaneous tab) from "Default" to "16:11".
A kind member posted the various SAR's (pixels aspect ratios) here:
http://forum.doom9.org/showthread.php?p=1058927#post1058927
I think setting a "16:11" SAR should give you a Bluray compliant PAL 720x576 encode.

Now for the stuff which confuses me:
The source is 16:9, but 16:9 "PAL" is actually a little wider than 16:9, therefore while resizing to 720x576 with a 16:11 SAR, the encoded picture will be stretched a little, so technically the 1280x720 picture should be resized to 704x576 with an 8 pixel border each side: Like this:

Spline36Resize(704,576)
AddBorders(8,0,8,0)

Or if you don't want the black borders:

crop(0, 8, 0, -8)
Spline36Resize(720,576)

Either of the above should result in a Bluray compliant "PAL" encode which doesn't distort the picture (or very little) if you don't use anamorphic encoding and set the SAR to 16:11 in the x264 encoder configuration.

And.....
I'm not exactly sure how it works, but if you encode 25fps video with a 720x576 aspect ratio while selecting Bluray as the target playback device, MeGUI (or x264) will try to "correct" the SAR for you. It'll either use 12:11 or 16:11 (maybe according to whichever is closest) but resizing a 720p video to a 720x576 resolution with anamorphic encoding enabled to create a script with the DAR set to 16:9, resulted in the following (from MeGUI's log file):

--[Information] [15/01/14 12:12:27 AM] resolution: 720x576
--[Information] [15/01/14 12:12:27 AM] frame rate: 25/1
--[Information] [15/01/14 12:12:27 AM] aspect ratio: 16:9 (1.778)
--[Information] [15/01/14 12:12:27 AM] target device selected: Blu-ray
--[Information] [15/01/14 12:12:27 AM] changing --keyint to 25 as required for the selected device
--[Information] [15/01/14 12:12:27 AM] detected --sar 64:45
--[Warning] [15/01/14 12:12:27 AM] assume --sar 16:11 as only 16:11 or 12:11 are supported with a resolution of 720x576 for the selected device.

The result of anamorhic encoding with a 16:9 DAR in the script would have been:

(720/576) x (64/45) = 1.77777777

But for PAL Bluray compliance the SAR was changed to 16:11

(720/576) x (16/11) = 1.81818181

Obviously the second SAR stretches the picture a little, hence resizing to 704x576 while adding black borders to the sides or resizing to 720x576 while cropping a little from the top and bottom to compensate (if you elect to use the Bluray compliant 16:11 SAR).

Hobojobo
16th January 2014, 11:28
Thank you for your answers and the information. :)

I resized the video from 720p to 720x576.
I encoded the resized video to a dvd conform mpeg2.
Then took IfoEdit to build a vob structure and set the picture format to 16:9.

The outcome looks right.