This project is read-only.

issue with video resize settings in saved preset

Dec 9, 2010 at 3:17 PM

i've recently started ripping bluray discs as well as dvds to my media centre, but as i only have an SD screen (and i'm running out of storage space) i've been downresing these HD vids to SD. as per usual DVD standards i've been resizing them to 720x576 and keeping the pixel aspect ratio as 1:1 so that it the display resolution remains in the correct aspect ratio


so the settings i use are :

width: 720

height: 576

PAR: 1:1


and it tells me something like

storage resolution : 720x576

display resolution : 1382x576


so that's all good so far. i've saved this to a preset "downres HD" so i can recall it easily, but when i load a new input video and add it to the queue without checking the settings first, the resulting encode has the incorrect aspect ratio.

if i check the settings after loading a new input video, then i see this :

storage resolution : 720x576

display resolution : 720x576


if i then click the radio button for "display width" and then back to "pixel aspect ratio" the settings update correctly, and then i can add the encode to the queue and it works as expected. so to ensure the HD videos encode correctly, i have to go into settings and force the settings to update, then it's OK. so it would be great if this worked without having to do that!



Dec 10, 2010 at 12:22 AM

That's odd. Are you using Custom Anamorphic?

I would expect 720x576 and a PAR of 1:1 to result in a display resolution of 720x576. If it's telling you 1382x576, that's the problem. I'll play with this and see if I can find out what's screwing up.

Dec 10, 2010 at 1:19 AM

yeh, custom anamorphic, i'm trying to store much larger videos into a 720x576 storage (as i only have SD display).

what i want is to store the video, whatever its resolution, in 720x576 and for it to then display correctly at the original resolution. so far, typing "1:1" into the PAR setting is what achieves that. i agree that it doesn't seem logical, i was poking around trying to figure out how to achieve this, and that was what gave me the correct results. so i just accepted that as the way to do it.

the immediate problem for me is that this doesn't persist across a "save preset" - encoding a string of videos using the same settings gives incorrect results, unless i go into the settings and click the radio buttons to force it to update (as if i'd just typed it) for each encode.

so perhaps it's working correctly when the preset is saved/recalled, but incorrectly when the controls are used - which is why i get the results only when i use the controls, because they at least tell me what they're going to do, so even if they're doing the "wrong" thing, i'm at least in control of it!







Dec 10, 2010 at 2:35 AM

I'm not getting the problem you're describing. When I put in 1:1 for the PAR it always results in a storage resolution the same as the display resolution. When I switch to display width and back to PAR, it updates the PAR values to those on the source video, as expected.

But anyway if your objective is just to save space, you don't need to fiddle with this custom anamorphic stuff. Just slap a max width on there, use loose anamorphic and you should be fine. It will keep the aspect ratio correct and your videos will be a lower resolution and lower file size (if you're using the same quality target). The only reason DVDs try to put everything into the same storage resolution (and change the PAR around based on the desired aspect ratio) was to make it simpler to decode the picture. If you're watching from a PC or basically any device that can play .mp4s or .mkvs, you don't need to do that.

Dec 10, 2010 at 12:32 PM

the reason i was messing with the aspect ratio is because if you set the width to 720 then you end up with it being stored in something like 720x380 which is quite small indeed. i guess i can just set the width to 1024 or something for a compromise.

what i was originally doing is trying to store the movie in 720x576 (as most of my DVDs are) but still display it correctly at 1340x576 or whatever, by using custom anamorphic.

i've since loaded up HB to see how it handles custom anamorphic, and it seems to work as expected in HB, the reason being that adjusting certain controls causes other controls to also update accordingly. this doesn't happen in VC so it produces odd/unexpected results.


here's the difference :

i'm using a bluray rip of The Dark Knight here, which is currently 1920x800

in HB, i load up the file, go to picture settings. to achieve my original aim of squeezing this into a 720x576 box, i choose the custom anamorphic, and set the width and height to 720x576. "keep aspect ratio" is already enabled, so i leave that. automatically the display width updates to 1380, and i get shown the resulting display size of 1380x576. PAR controls are disabled as the "keep aspect ratio" is enabled.

now if i adjust the display width, the storage height gets adjusted automatically to keep the aspect ratio. likewise, if i adjust the storage height, the display width also gets adjusted automatically. it looks like the storage height and the display height are locked together here, so any adjustment made to one setting will affect other settings automatically, with the aim of keeping the storage height and the display height the same, and maintaining the aspect ratio.

basically, it's all fairly simple and it quickly looks like it's going to work as expected. also, i can save this in a preset, and it will work as expected on any video of any size, and produce the output i expect.


i do the same in VC: load up the file, go to picture settings, and the controls i get look like this :

width (not set) height (not set)

max width (not set) max height (not set)

so already i'm not sure which controls here will work, or how exactly they will work. HB only offers width and height controls.

also i have to choose a new setting between "display width" or "PAR", if i choose "display width" i can also enable/disable "keep aspect ratio" as a separate option. if i choose "PAR" then that is disabled, obviously. but it is not clear what will happen if i choose "display width" and then "keep aspect ratio: off" as this combination is not even possible in HB!

in HB we do not choose between "display width" and "PAR". these controls are enabled or disabled by our only choice - we choose "keep aspect ratio" on or off, if it's on then we use the display width. if it's off then we specify a custom aspect ratio in the PAR setting. this makes a lot more sense!

so anyway.


if i set the width and height to 720x576, as this is my intended storage resolution. the default setting is "PAR" which comes up with 479:480 here (almost 1:1), giving an output res of 720x576. if i now choose "display width", "keep aspect ratio" now gets enabled. but "display width" is currently set to zero, so my output is 0x0. however, i can now change this display width to 1380 and get the result i want - a display res of 1380x576 - but I had to guess numbers until i found the one that gave me the biggest display res possible from my chosen storage res. in HB this control updated automatically, i can still change it if i want, but it didn't default to zero. it defaulted to the setting which gave me the biggest display res possible. also, having to "find" the correct display width means that this setting cannot be saved as a preset, and used quickly for videos of all different sizes. i will have to go into this setting each time, and choose the correct display width, for every video i encode.

also its confusing because the order of control is backwards (choosing display width vs PAR, instead of choosing aspect ratio on/off)

however, it still gets more confusing!

the problem that i first noticed, that made me post this thread (the problem that you couldn't replicate) is that i was not using the display width setting, and guessing the number - i hadn't figured out to do that yet. instead, i choose the "display width" option, but now disable "keep aspect ratio". now, i choose "PAR" again. when i do this, i can now set the PAR to 1:1, and when i do this i get the output i desire - 1380x576. this is clearly very odd behaviour, and i only found this because i didn't know how to get the output i wanted (the controls didn't make a lot of sense) and only by pressing things at random did i get this output!

i think the problem is largely two things, firstly that controls do not adjust themselves automatically like in HB, and second, that we should not be able to choose "display width" or "PAR" but this should be chosen by the "keep aspect ratio" setting.






Dec 15, 2010 at 2:46 AM

the plot thickens:

i'm back to encoding some DVD rips, but VC won't give me any correct aspect ratios on anything with loose or strict anamorphic after messing around with custom anamorphic. all of this can be fixed by restarting VC so it's no major issue, i found this because it was in the middle of encoding so i continued poking around when stuff stopped making sense - and found that no amount of loading my various DVD-rip presets, or loading different input DVDs, would give me correct results any longer. i seemed like there's a setting not being loaded or reset when this happens.


for example, here's what it's gave me for the Akira DVD

input: storage 720x576 - PAR 1.42 (64/45) - display 1024x576

anamorphic: loose

output: storage 720x576 - PAR 7/3 - display 1680x576

clearly, this is wrong! switching to strict anamorphic gives similarly incorrect output results.

i tried several other DVD rips, and they all show similar symptoms, and reloading my various presets doesn't seem to help either.


i can apparently fix this without restarting VC, by switching back to custom anamorphic after reloading both the input DVD and my usual preset (which uses loose anamorphic), when i switch to custom anamorphic the adjustable PAR settings come up identical to the PAR shown on the input (in this example 64/45). so i now switch back to loose anamorphic, and it gives me the correct aspect ratio. so i guess the problem lies with some other settings not being recalculated or reset under certain circumstances.

all of this is most easily fixed simply by restarting VC, so it's clearly not a major issue, and as it is i'm probably the only user to have gone delving into custom anamorphic anyway!

i just figured it's all symptomatic of some issues with the settings in this section, and the more information i can give you the easier it will be for you to track them down.



Dec 15, 2010 at 3:43 AM

Weird, I'm not seeing that problem. I'm messing around with Custom and it's always correct when I go back to Loose or Strict. Perhaps you can send me your preset file? Maybe you could send me a starting preset file (%appdata%\VidCoder\UserPresets) and the minimum steps needed to get it into this weird configuration?

Also I understand what you're trying to do here. VidCoder's model is to have a preset be independent of the source video: you can load whatever video you want and it won't mess around the values you've put in so only the preview input and output change. In general if you want a value to change based on other inputs, you just leave it blank. The idea is that it's consistent and re-usable across different inputs. So things like changing around values based on the aspect ratio of the input video don't work out that well. I'm sure there's some way to fix it, though. In the meantime, though, might I suggest re-thinking your determination to store everything with the same storage resolution? I don't believe it will actually improve your space efficiency for any desired level of quality.

Dec 15, 2010 at 3:03 PM

i can send you the starting preset now. it's doing some encodes so i'll have to wait til i can restart it before i can recreate the steps needed to get into that strange place :)

as far as i can tell, that model as you describe it is how VC should work best, but it doesn't seem to behave that way in practice. the reason i discovered this problem is because when i first downsized an HD video, i saved that setting as a preset and encoded another 3 vids with it, and the remaining 3 vids came out wrong, as the input dimensions were different. by contrast, in HB i was able to create a preset that does this in seconds, and it works flawlessly. every vid i put through it comes out exactly as expected with no further interaction required. i've not managed to get anything like that in VC - anything i'm downsizing at the moment using custom anamorphic, i am adjusting the settings manually each time.

actually i've just realized the main reason i'm having a problem. the setting i'm adjusting manually for each input is "display width" and here is why :

i specify the input dimensions of 720x576, custom anamorph, keep aspect ratio on - this alone should cause the vid to be encoded in the DVD-sized storage, and still play correctly. doing just this in HB achieves exactly that, and i can save it as a preset and re-use it across many inputs.

the reason i have problems in VC, is because when i choose the above settings it also provides me with a fourth setting which MUST be specified - it defaults "display size" to zero. if i try and remove this setting so that VC can calculate it automatically, it becomes reset to zero again. this means that unless i manually specify this setting, my output is 0x0, so this setting MUST be must be updated manually. and that's the problem - for every input video, i have to go into the preset and adjust the display width accordingly.

it needs to be possible to leave this setting blank, so that in accordance with your model as you explained it to me, when it's left blank then VC should recalculate this setting automatically. this is the reason my preset works in HB - it recalculates the display width according to the input PAR, so that the storage height and display height are the same. for example, many vids stored at 720x576 display at 1024x576 - HB calculates the "1024" for me. in VC i have to manually change the display width for each input, until i get the same output value for storage height and display height.

i can see the point, that if something is manually specified by the user then it should not be touched by VC - that makes sense, and is a good idea - but here is a setting that cannot be touched by VC, ever, and that's why there's a problem. it demands user interaction, no matter what.

of course, it does seem odd that if we choose to specify "display width" from the radio button, we can then leave it blank. but then, this is another way that these controls don't really make sense when we can choose "do we adjust aspect ratio?" with a radio button separately from "do we keep aspect ratio?" on a checkbox :)

i really think you should remove the radio button, so it's the same as in HB - because what we have here is ONE choice - "do we keep aspect ratio?" - and it makes absolutely no sense to be able to change this in two different places, both from a radio button and from a checkbox, and it is especially strange that it is possible to create a conflicting setting here - i can enable it on the radio button (by choosing "display width"), and simultaneously disable it on the checkbox - what does VC do with the aspect ratio then?! i am fairly certain that the other problems i've had where the controls stop making sense altogether (as per my above post with loose anamorph stretching things to double width) have begun from having the choice "do we adjust aspect ratio?" both enabled and disabled simultaneously.

it would make much more sense, if we have "keep aspect ratio" checkbox enabled, then we can adjust the display width setting (or leave it blank!), and the PAR setting is greyed out. then, if we disable "keep aspect ratio", then PAR setting becomes available as well (should always be possible to adjust display width here, this should never be greyed out). this is what HB does, and it works. we need to be able to leave display width blank so that VC handles it. this would be simple and logical, and would work as a preset across many inputs.




Dec 15, 2010 at 4:31 PM

But you don't have to keep your old aspect ratio when using Display Width. There are actually many different modes for Custom Anamorphic to work in:

1) Have a certain storage size and a certain PAR
2) Have a certain storage size and a certain display width: the PAR is automatically changed to get this width
3) Have a certain storage size and automatically change the PAR to get the original aspect ratio back
4) Have a certain width and a certain display width, and automatically adjust the storage height and PAR to keep the original aspect ratio

I don't think that doing away with the radio button would make things simpler. The PAR radio button is just for when you want to say: give me THIS pixel aspect ratio no matter what. The display width is for everything else. When you're fiddling with the display width, the PAR input fields are just along for the ride: they don't matter to the user anymore. You can see what the resulting PAR would be like in the output preview anyway.

Now currently I can't do #3, but I think your suggestion would cover it. Allow Display Width to be blank, then if Keep Aspect Ratio is checked, automatically figure out the correct display width at encode time to do that.

Dec 15, 2010 at 6:15 PM

i've figured it out!!

the unusual behaviour i've been describing only happens if you adjust these settings while VC is encoding. i have tried over and over to recreate these problems after restarting VC, and could not. all the controls worked pretty much as expected, which was surprising and a little annoying! so i started some more encodes, and carried on poking around...aha!

to re-create the behaviour:

open a DVD file, use a preset and begin the encode. leave the encode running while proceeding with next steps.

then, open an HD size video, click to edit the settings, choose custom anamorphic. adjust storage dimensions to 720x576. adjust display width to 1024. output results should be normal at this stage. close the settings window.

open the same HD video a second time. click to edit the settings. click "revert" and "yes" to the prompt. now choose custom anamorphic again. look at the output results! i've just done this three times, in all cases the output results were very different from what was expected.


Dec 15, 2010 at 6:55 PM

in fact, i suspect it doesn't matter what input sources you use. i wrote to load a DVD, then load an HD video, because that's what i'd done.


to address your other points :

i can see now what is going on thanks to the "option 2" from your list. this is the one choice that HB doesn't give you, as HB assumes that unless you input a chosen PAR, then you would want the aspect ratio of the encode to be maintained. this is also what i assumed, as it seems most logical - i cannot envisage a scenario whereby someone would want to change the display width but not the height, and to end up with an arbitrary aspect ratio not of their choosing. however, there is always someone who will try unusual things and it is not for us to decide why they should or should not be able to do that! it is always better to allow more choice...

i still believe the layout of the controls here is confusing, with the radio button and checkbox that both seemingly do the same thing (i can see now that they do not - but this is REALLY not very clear), because the radio button dictates the state of the checkbox - if the radio button is on PAR, then the checkbox is greyed - when in fact the checkbox should dictate the state of the radio button. this is because the first choice we are making is "do we want to keep the aspect ratio", and as it's higher up the page it's a "major" setting, the choice we make here affects how we will choose the later "minor" settings, which are further down the page. it is counter-intuitive for a minor setting to affect our ability to change a major setting higher up on the page - the current order of controls has the radio button behaving as the major setting, controlling the other features, when it is a minor setting that we will choose ONLY if we want to specify a custom PAR.

what we would need is if the checkbox is enabled, the radio button is locked to display width, and only if the checkbox is disabled can we make a choice between display width and PAR. but afaik it's not possible to disable only certain choices from a radio button - it is either enabled or disabled as a whole, which i guess is why we've ended up with this confusing layout. i'm going to think some more on how this can be improved. i understand now how the controls here work, but only after lengthy explanation from yourself - they are not intuitive. it would be better to have a layout that everyone can understand easily (the HB layout is simple and obvious, but does not provide for option #2 in your list).



Dec 15, 2010 at 7:19 PM

actually, it could be possible to lock the radio button from the checkbox. the labels "display width" and "pixel aspect ratio" will have to be separate from the radio button control, and the labels on the radio button control can be left blank. that way when the radio button is locked, the labels themselves do not also go grey - we still need to read the words "display width" if the radio button is locked.

i do believe the controls should be changed in this way. the first, "major" choice we make is "do we adjust the aspect ratio", then the later, "minor" choice is "how will we adjust the aspect ratio now that we have decided to change it". if we answer "no" to the major choice, we will never even reach the minor choice. yet the current layout has the minor choice determining whether or not we can even change the major choice, which is backwards and very unintuitive.

so i think the controls should behave like this :

by default "keep aspect ratio" should be enabled (this is surely the most common choice people will make here). because this is enabled, the radio button should be greyed out, and locked to "display width". the PAR settings should also obviously be greyed out. the display width control should be left blank initially, and an appropriate display width should be calculated by VC in the output results. we can also input our own display width here, and any changes made will be reflected in the output results. deleting the display width entry should then revert to VC calculating the width as before.

if "keep aspect ratio" is then unchecked, the radio button should be unlocked and we can choose how to adjust the aspect ratio either by changing the width or the PAR. if the radio button is set to display width, then the PAR controls are greyed out. if the button is set to PAR, then the display width is greyed out.

NOW, it should not be possible to leave the display width empty anymore - it we have unchecked "keep aspect ratio" it is because we have chosen to specify a setting of our own, so it makes no sense for that setting to now be left blank: what would happen? so we need to set a default value that the user can change (which is the current behaviour of this control)

however, it also makes no sense for that setting to default to zero (as is the current behaviour). because nobody will EVER want a video with a display size of 0x0 (i hope!). so when unchecking "keep aspect ratio", the default setting for "display width" should be the same as is calculated by VC to maintain the aspect ratio as before. if the user then changes this setting, the aspect ratio will of course be lost. of course, we can also change the radio button to PAR, and specify our own PAR and again these can not be left blank.

i hope this helps - i do think VC is a fantastic piece of software, a big improvement over the HB interface, and i use it a lot - my only wish here is to help improve the software, i do not wish to upset anyone by suggesting all these changes!



Dec 16, 2010 at 5:01 AM
Edited Dec 17, 2010 at 6:01 AM

I had actually already fixed the Display Width starting at 0.

You make a good point about the important choice being whether or not to keep the aspect ratio. I thought about it some too and your suggestion sounds exactly like what I was thinking of doing. I'll try to get those changes into the next version.

Dec 17, 2010 at 8:31 PM

Here’s the preset I’ve been using

From: RandomEngy [email removed]
Sent: 15 December 2010 16:32
To: James King
Subject: Re: issue with video resize settings in saved preset [vidcoder:237741]

From: RandomEngy

But you don't have to keep your old aspect ratio when using Display Width. There are actually many different modes for Custom Anamorphic to work in:

1) Have a certain storage size and a certain PAR
2) Have a certain storage size and a certain display width: the PAR is automatically changed to get this width
3) Have a certain storage size and automatically change the PAR to get the original aspect ratio back
4) Have a certain width and a certain display width, and automatically adjust the storage height and PAR to keep the original aspect ratio

I don't think that doing away with the radio button would make things simpler. The PAR radio button is just for when you want to say: give me THIS pixel aspect ratio no matter what. The display width is for everything else. When you're fiddling with the display width, the PAR input fields are just along for the ride: they don't matter to the user anymore. You can see what the resulting PAR would be like in the output preview anyway.

Now currently I can't do #3, but I think your suggestion would cover it. Allow Display Width to be blank, then if Keep Aspect Ratio is checked, automatically figure out the correct display width at encode time to do that.

Dec 17, 2010 at 9:10 PM

Looks like something got messed up with your post.

Dec 18, 2010 at 3:02 PM

weird, i didn't post that on here, i replied to your email with the xml file attached

oh well, i don't think the preset has much to do with the problem with custom anamorphic settings going weird anyway - it seems fairly reproducable as long as there's an encode process running

Dec 18, 2010 at 6:59 PM

I have the display width/keep display aspect UI changes done. After I get back from break I'll take a look at the encode weirdness and maybe do a release.

Jan 7, 2011 at 3:07 AM

The changes are in 0.8.0. Never did get a good repro on the messed up Custom Anamorphic settings while encoding, but then again I only tested after I did the overhaul on that area.