Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 31st December 2012, 01:02   #2801  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Code:
2255 [AVS Script Creator] resize is enabled by default in the profiles (only for new profiles)
     [AVS Script Creator] suggest resolution is automatically pre-selected when doing a resize
     [AVS Script Creator] DAR changes also triggers a recalc of the "Aspect Ratio Error"
     [AVS Script Creator] avoid upsizing (if disallowed) when "Clever (TM) anamorphic encoding" is used
     [AVS Script Creator] some minor cosmetics / changes
2254 [Update] fixed a crash if the proxy has been enabled without server address
Zathor is offline   Reply With Quote
Old 31st December 2012, 02:03   #2802  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by Zathor View Post
When doing a non-anamorphic encode the target SAR is 1:1 (square pixel). Therefore the input video must be converted also to SAR 1:1 to get the aspect ratio error:
720x576 with an aspect ratio of 4:3 has a SAR of 16/15 which results in 768x576 in SAR 1:1. Therefore you have an slight error with 640x480.
Maybe I'm just being dense, unless there's rounding involved when doing the math which is causing a slight aspect error to be displayed, but even so 768x576 and 640x480 are both exactly 4:3.

(576/768)*640=480 or
(720/576)*(16/15)*480 = 640

However you do it, it comes out exact. StaxRip and the Yoda Resize Calculator both agree. MeGUI has always seemed to give slightly different results to other programs. Generally only by a couple of tenths of a percent I think, but I'm sure it always has. Many times I've opened a "strict" anamorphic encode and compared it to the original DVD and thought the aspect ratio was off by a pixel or two. I'd always assumed it's the way MPC-HC resizes, but now.....

There's another little oddity in the "trust what MeGUI is telling me" department. It seems to happen regularly when opening video containing square pixels (I haven't played with anything else much yet). For example I just opened a 640x480 AVI and enabled resizing but left it on 640x480. MeGUI displays a slight aspect error (it's only around 0.16% but it's there). The only way to correct it is to manually select the input aspect ratio (1.333) and then adjust the resizing or cropping. Once you return the the cropping back to zero or the resizing back to 640x480, MeGUI will then display a zero aspect error as it should.

I think maybe there's too much rounding happening when calculating the input aspect ratio although I'm not sure how it works. For me, opening a 704x384 AVI displays an input aspect ratio of 1.833, which is correct, but when enabling resizing it displays a 0.142% aspect error at 704x384. Changing the input display aspect ratio to 1.832 (which unless I'm going mad MeGUI actually did itself once) displays the same aspect error at 704x384. With an input aspect ratio of 1.834 the aspect error changes to 0%, but the problem is that's not the input aspect ratio MeGUI chooses when opening the file.
Once again too, changing the input aspect ratio has no effect on the aspect error being displayed until cropping or resizing has been adjusted.

Cheers.

Edit: I just saw your previous post. I see input aspect ratio changes now cause the aspect error to be recalculated.

Last edited by hello_hello; 31st December 2012 at 02:14.
hello_hello is offline   Reply With Quote
Old 31st December 2012, 02:43   #2803  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Quote:
Originally Posted by hello_hello View Post
Maybe I'm just being dense, unless there's rounding involved when doing the math which is causing a slight aspect error to be displayed, but even so 768x576 and 640x480 are both exactly 4:3.
Yes, there was a rounding problem which resulted in 767x576 causing the error. If will upload a fix in the next minutes.


Quote:
Originally Posted by hello_hello View Post
Many times I've opened a "strict" anamorphic encode and compared it to the original DVD and thought the aspect ratio was off by a pixel or two. I'd always assumed it's the way MPC-HC resizes, but now.....
This aspect error calc is completely new an has only the SAR calculation in common with the internal functions for anamorphic encodings. Of course they may be wrong as well - but in that case they are wrong for years. Nevertheless when you find a reproducable problem in that part I will have a look as well.

Please try 2256 and let me now if everything is fine.
Zathor is offline   Reply With Quote
Old 31st December 2012, 04:09   #2804  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
How its possible??

Yoda calc and me, obtain the same result than is very different to showed by megui.

EDIT: Ok http://forum.doom9.org/showthread.php?t=22497
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite

Last edited by Overdrive80; 31st December 2012 at 04:26.
Overdrive80 is offline   Reply With Quote
Old 31st December 2012, 10:45   #2805  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
MeGUI calculates it in this way:
AR Error = 1-((Input Width*Output Height)/(Output Width*Input Height)) (which is the same as in http://forum.doom9.org/showthread.php?p=130085#post130085)
Which is in this case:
AR Error = 1-((714*480)/(704*480))=1-(714/704)=-0,014204545454545=-1,4204545454545%

You and Yoda are calculating it:
AR Error = 1-((704*480)/(714*480))=1-(704/714)=0,0140056022408964=1,40056022408964%

Which one is correct?

You can say (with simplified values) that 100 is 33% larger than 75 - and 75 is 25% smaller than 100. So both are showing a correct aspect ratio error but the point of view is different. Staxrip for example is using the same as MeGUI. Which is the most common point of view? I can change it if required.

Last edited by Zathor; 31st December 2012 at 10:51.
Zathor is offline   Reply With Quote
Old 31st December 2012, 11:37   #2806  |  Link
Shevek
Registered User
 
Join Date: May 2008
Location: Kent, UK
Posts: 154
Hi Zathor,

Here is the patch to use system proxy if a username is not supplied:

http://pastebin.com/yaEMEcUc

I have tested this here at work this morning and it works

Of course this may require a stable build release otherwise those who rely on it won't be able to get the revision which fixes it
Shevek is offline   Reply With Quote
Old 31st December 2012, 11:45   #2807  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Thanks - does this also work when using a proxy without user name / password? Or do I need to include a new setting if no credentials, specified credentials or default credentials should be used?

Last edited by Zathor; 31st December 2012 at 11:48.
Zathor is offline   Reply With Quote
Old 31st December 2012, 11:52   #2808  |  Link
Shevek
Registered User
 
Join Date: May 2008
Location: Kent, UK
Posts: 154
Quote:
Originally Posted by Zathor View Post
Thanks - does this also work when using a proxy without user name / password?
Ah, I'm not sure.

Perhaps we should have an additional checkbox "Use System Proxy"

Actually, thinking about it, the system credentials include the URI of the proxy so it needs to work differently anyway.

Should be:

Code:
Use Proxy?:-

    Yes: - Use System Proxy?:-

        Yes:- use CredentialCache.DefaultCredentials

        No: prompt for url/port/uid/pwd
How easy is it to add a new flag to settings?

EDIT: I've found the MeGUISettings class - I'll have a play

Last edited by Shevek; 31st December 2012 at 11:57.
Shevek is offline   Reply With Quote
Old 31st December 2012, 12:12   #2809  |  Link
Shevek
Registered User
 
Join Date: May 2008
Location: Kent, UK
Posts: 154
Is the Sourceforge repo not up to date for read only checkouts?

I am only seeing up to 2232 on 9th Dec and there have been many more commits since then...
Shevek is offline   Reply With Quote
Old 31st December 2012, 12:15   #2810  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Quote:
Originally Posted by Shevek View Post
Perhaps we should have an additional checkbox "Use System Proxy"
Maybe a combobox with all the 4 settings (no proxy, system proxy, proxy with and without user/pwd)

But isn't there a way to remove this whole part in the settings and use the system proxy (= IE proxy) setting all the time?
Zathor is offline   Reply With Quote
Old 31st December 2012, 12:20   #2811  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Quote:
Originally Posted by Shevek View Post
Is the Sourceforge repo not up to date for read only checkouts?

I am only seeing up to 2232 on 9th Dec and there have been many more commits since then...
Use https://megui.svn.sourceforge.net/svnroot/megui for gthe checkout. There has been a move to a new repository which I have missed.
Zathor is offline   Reply With Quote
Old 31st December 2012, 12:45   #2812  |  Link
Shevek
Registered User
 
Join Date: May 2008
Location: Kent, UK
Posts: 154
Quote:
Originally Posted by Zathor View Post
Maybe a combobox with all the 4 settings (no proxy, system proxy, proxy with and without user/pwd)
Good idea

Quote:
Originally Posted by Zathor View Post
But isn't there a way to remove this whole part in the settings and use the system proxy (= IE proxy) setting all the time?
Hmm, yes that's true. It's a .Net application so it will always have access to the IE settings, as both Chrome and Firefox do. I'll do some more testing on my work and home PCs and ensure that this will work in both situations.

Quote:
Originally Posted by Zathor View Post
Use https://megui.svn.sourceforge.net/svnroot/megui for gthe checkout. There has been a move to a new repository which I have missed.
Great, I now have the latest code, tx!
Shevek is offline   Reply With Quote
Old 31st December 2012, 14:05   #2813  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Quote:
Originally Posted by Shevek View Post
Great, I now have the latest code, tx!
I have switched my productive repositories. From now on all my commits are in svn://svn.code.sf.net/p/megui/code
Zathor is offline   Reply With Quote
Old 31st December 2012, 15:04   #2814  |  Link
Shevek
Registered User
 
Join Date: May 2008
Location: Kent, UK
Posts: 154
Hi Zathor,

It will need to be the multiple options as there could be some users out there who use proxy servers which require a separate log in from their system account (i.e. windows clients on a network that uses a unix/linux proxy server)

Proposed solution:

Replace global setting "usehttpproxy" with an enum setting "HttpProxyMode":
public enum ProxyMode { None = 0, SystemProxy = 1, CustomProxy = 2, CustomProxyWithLogin = 3 }

On Settings form remove the checkbox and replace with drop down with options from the enum

None, SystemProxy = address/port/uid/pswd disabled
CustomProxy = address,port enabled, uid/pswd disabled
CustomProxyWithLogin = address/port/uid/pswd enabled

Logic in UpdateCacher.cs and UpdateWindow.cs updated to build proxy settings based on HttpProxyMode

How does that sound? I'll get on with coding this and provide a patch.

Let me know if you want anything tweaked.
Shevek is offline   Reply With Quote
Old 31st December 2012, 15:51   #2815  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Sounds good. Looking forward to your patch!
Zathor is offline   Reply With Quote
Old 31st December 2012, 16:10   #2816  |  Link
Shevek
Registered User
 
Join Date: May 2008
Location: Kent, UK
Posts: 154
Having problems opening the Settings form

Code:
Could not find type 'MeGUI.core.gui.TargetSizeSCBox'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.
Have you seen similar?

I'm using VS2010 on Windows 7 x64 (both fully patched)
Shevek is offline   Reply With Quote
Old 31st December 2012, 16:13   #2817  |  Link
Zathor
Registered User
 
Join Date: Nov 2009
Posts: 2,405
Switch to the x86 platform in VS. This happens also for me when x64 is enabled (and I do not know why).
Zathor is offline   Reply With Quote
Old 31st December 2012, 16:27   #2818  |  Link
Shevek
Registered User
 
Join Date: May 2008
Location: Kent, UK
Posts: 154
Ah, that's fixed it
Shevek is offline   Reply With Quote
Old 31st December 2012, 17:00   #2819  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Quote:
Originally Posted by Zathor View Post
You can say (with simplified values) that 100 is 33% larger than 75 - and 75 is 25% smaller than 100. So both are showing a correct aspect ratio error but the point of view is different. Staxrip for example is using the same as MeGUI. Which is the most common point of view? I can change it if required.
Yeah, I noticed after for this reason, I edited the post with the link. Really I think that you method is more proper, only I want know that happens it.

Thanks
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite
Overdrive80 is offline   Reply With Quote
Old 31st December 2012, 17:29   #2820  |  Link
Shevek
Registered User
 
Join Date: May 2008
Location: Kent, UK
Posts: 154
Hi Zathor,

Here is the patch:

http://pastebin.com/BW9dmF9k

It should be applied in the trunk folder

It includes a new helper class core/util/HttpProxy.cs as the proxy is used in both core/gui/UpdateCacher.cs and core/gui/UpdateWindow.cs
Shevek is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.