View Full Version : Do you use "Choose Best Resolution for Videos"
jmarshall
2003-10-12, 02:51
in order to get this option working as best as we can, i wish to determine how people use this option, and whether it looks good for them.
please try a bunch of different sized movies including some with width greater than 640 and height greater than 480 if possible. both 25fps and 24 or 29.97fps if you have them.
the more information we can gather, the better we can make the default output quality.
feel free to comment regarding why things look bad (if they do) here as well - including the type of tv you use will be useful, as well as the resolution + framerate of the video that looks bad.
thanks heaps for your help.
i use a 29" sony 4:3 tv using rgb input from the xbox, and 640x480 (which is what xbmc usually chooses as "best") looks worse on every video i've tried, there are noticeable jagged edges along lines, the picture looks sharper and better in 720x576. i think the option should be called "choose resolution closest to source" instead, and it should be off by default.
this may not be the place, but i have no replies and i'm in a panic...
how can i find out how xbmc changes resolution settings at a lower level? i've changed the resolution and now my xbox has no video at all...
i use it, but that's because i think the aspect ratios are slightly off in 720x576. 640x480 is jagged and pixely though, but that's easily fixable by turning on smooth.
the aspect ratio is only slightly off in 720x576, but it's enough to be noticable and i'm overly critical about these things. plus i find it distracting when trying to watch a video in 720x576.
if i watch a 4:3 video in 720x576 mode it's displayed at an ar of 1.22 when it should be 1.25.
if i watch a video with an ar of 2.375 in 720x576 it's displayed with an ar of 2.18 when it should be 2.22.
to change an aspect ratio to fit correctly in 720x576 you should multiply it by 0.9375 ( 1.25/1.333 = 0.9375)
e.g. 1.333*0.9375=1.25
2.375*0.9375=2.22
i'm pretty sure that's 100% correct, and it does explain the slight vertical stretch that i can see. what do you think jmarshall? oh, and this is only concerning avi videos, mpegs seem fine.
plus, i have a divx that's 848x480 where the last 10% of the picture is a repeat of the first 10% when played in xbmc.
actually the ar should be exactly correct in 720x576 as it is done now, we used the (1.33/1.25) ratio before, but the pixel ratio is actually defined as 59/54 for pal. see http://www.mir.com/dmg/aspect.html if you want the exact info. calibrate your edges the same in 720x576 and 640x480, does the ar *look* exactly the same?
it seems odd that you worry about a .02 ar variation, but then apply digital smoothing to get rid of the jagged edges in the badly scaled 640x480 mode, which to me would seem like a much greater reduction in quality...
i think some of it possibly is in my head, because i'm convinced it's wrong so i look for things that don't look right. i know, i'm a wierdo and i should just forget about it and enjoy the movie. :lol: but i am sure it's not correct and it bugs me to the point of being distracted by it when watching videos. if i pause a video and then do a comparison between both resolutions i can see the difference in ar. i do have to look for it, but i can see it.
i've left the edges calibrated to 0,0 for everything, as that's how i prefer it. if i then play a video with an aspect ratio of 1.33 should it play at 720x576 or 710x576?
tbh, i can't tell the difference when smooth is turned on or not, but then my tv is a lot smaller than yours.
jmarshall
2003-10-21, 00:49
burriko:
the aspect ratio should be 100% correct according to the standards as pointed out by poing.
if you are using 720x576 pal, and have the calibration all set to (0,0) -> (0,0) so that you are getting all the pixels, then a 4:3 aspect ratio movie (such as an avi with a frame size of 640x480) will be shown with size 702x576. this is the correct frame size (actually it's 702 54/59 pixels wide) that defines the pal 4:3 picture. note that the black bars (around 8 and a bit pixels either side) at the sides of the picture will not be seen, as most tv's have overscan of around 16 pixels either side.
in all likelihood (though i haven't checked so am not 100% sure), the xbox is rescaling the 640x480 screenmode up to 720x576 digitally. it's likely doing this slightly wrong, which is why you are seeing a difference in the two modes.
i am hoping to determine whether the scaling is done digitally or is done after the dac (ie in the analog domain) by playing some test videos, but i have been very busy and haven't had a chance.
thanks to those that have voted in the poll.
cheers,
jonathan
thanks for the info, both of you.
how come a 4:3 mpeg2 file is displayed at 720x576 then?
btw jonathan, not that it's important, but a 4:3 avi is displayed at 710x576, not 702x576 as you said. ???
jmarshall
2003-10-21, 02:53
mpeg2 based media at some key resolutions (dvd/svcd/vcd) use a pixel ratio the same as a standard tv (ie 59/54 for pal) because they were designed to be played on a tv screen. xbmc knows about this, and uses the correct pixel ratio when calculating the size of the output frame. it also autodetects and scales anamorphic sources if the aspect ratio info is correct in the file.
what was the frame size of the source avi you tested? following the code i submitted which corrected for the aspect ratios etc. a true 4:3 ratio frame size (640x480 for instance), will result in an output image of size 702.9 pixels by 576 pixels on a pal tv. also: how are you telling how big the output frame size is? (i haven't played with xbmc lately, so don't know how/where it displays this stuff).
incase you're wondering, here's the calculation:
foutputframeratio = finputframeratio * finputpixelratio / foutputpixelratio.
for an avi, finputpixelratio is 1.0. for a pal tv, foutputpixelratio is 59/54. thus, if finputframeratio is 4/3, foutputframeratio will be 1.22 near enough. multiply the height of the output frame (576) by this gives 702.9 pixels width as stated earlier.
cheers,
jonathan
thanks for the answer. i'm gonna stop asking stupid questions now, and wasting your time. :d
the frame size of the avi i was using is 512x384, which is of course exactly 4:3.
jmarshall
2003-10-21, 23:12
that's cool - it's only by questioning things that we can know for ourselves that they are working correctly. i don't pretend to have everything 100% correct - i have implemented it the best way i know how.
thanks for taking the time to look at it. btw: from where did you arrive at the 710 pixels wide number? is it onscreen in xbmc somewhere? (as i said earlier, i haven't played with xbmc lately and new code is being added/fixed every day at the moment.)
thanks,
jonathan
oops, i missed that bit of info out. it's displayed at the top of the screen when you press the button that changes between normal/zoom/stretch.
jmarshall
2003-10-22, 02:36
thanks, burriko, i'll check out where it is getting those numbers from, and correct if necessary.
i'm a pal user with my xbox set to pal60
720x576 always seems to look best to me. looks a bit jagged when xbmc switches to 640x480 (what is the advantage of using 640x480 anyway?)
i had an avi with a frame rate of 24.998fps - for some reason xbmc switched to pal60 - is that normal?
i tried an ntsc version of 'sum of all fears divx' which has 448k ac3 sound. the sound is completely stuttery with ac3 passthrough enabled but doesn't have any stutters with passthru disabled - though the audio goes completely out of sync after a while. :( if my xbox is set to 4:3, xbmc switches nicely to pal60 and the aspect looks right. however, if my xbox is set to 16:9, it doesn't switch to pal60 - though the 16:9 aspect seems right. the aspect option in the settings doesn't seem to have any effect.
xbmc is looking good but it still looks like there's loads of video playback issues to be resovled. good luck and keep up the great work! :)
jmarshall
2003-10-27, 06:29
xbmc has had some improvements made to it, and more are coming with respect to it choosing the best resolution.
640x480 should only be seen by a pal user if it's a pal60 mode. it used to be able to switch to a 640x480 mode when it was in pal50, but that is invalid and caused real issues with scaling - particularly vertically. currently, for a pal user there are 4 screenmodes available for it to choose out of: 720x576 and 640x576 pal50, and 720x480 and 640x480 pal60. it chooses the 640 wide modes based on the width of the video - this can probably be improved on a bit as well to optimize the quality. at the moment i haven't been able to tell the difference, though.
currently it decides if things should be in pal60 mode by checking whether the frame rate is an even divisor of 50. if it's not, it'll switch to pal60 mode. i'll improve this so that it compares the divisibility of both 50 and 60 and chooses the one that is closest - that should work for all the weird frame rates as well as the standard ones then.
and with regards to the widescreen switching: this will eventually be an option and needs a bit more testing. the original code stated that pal60 and widescreen should not be both enabled, that's why i left it as is. i have since changed this as most (all?) pal tv's capable of 16:9 can also do 16:9 at 60 hz (pal60).
the aspect option + resolution in the settings menu is just for the gui - this will be made clear eventually. note that you'll need to reboot after changing it for it to have any effect (and i'm not sure what effect it will have, other than setting the widescreen flag in the signal, which some widescreen capable tv's can pick up and auto-switch into 16:9 mode.)
i'm looking for testers to help me get this right - i only have 2 tvs (both pal 4:3, though 1 is capable of 16:9 compression mode) so it's hard for me to get it 100% right.
in particular i'm looking for people who have tvs that can sense the widescreen flag and autoswitch between 4:3 and 16:9 modes, and also people with pal hdtv or ntsc hdtv sets.
if you can help, please pm me.
jmarshall
2003-10-27, 06:33
redmist: with regards to the ac3, it's being worked on, and is currently being treated as the no. 1 priority by some of the devs. note that the main developer (frodo) does not have an ac3 decoder at present, so it's a bit tricky!
also, check your pm.
i've been thinking more about what's been said about aspect ratios in this thread, and i was wondering about the following situation.
say i have a 4:3 mpeg2 file with a resolution of 720x576, taken from a dvd. if i play this in xbmc it'll play fullscreen at 720x576 which is great. if i then encode it to divx with a resolution of 640x480 it'll play at 702x576, even though nothing has been cropped from the file.
surely that can't be correct?
jmarshall
2003-10-28, 00:50
if you encode a pal dvd to 640x480 with no cropping, then you are stretching the image slightly in the vertical direction (or compressing slightly horizontally). the 720x576 framesize is not a 1.33:1 aspect ratio (see gordian knot for instance) rather a (approx) 1.36:1 ratio. this is due to the fact that the "pixels" stored in the dvd are not 1:1, but 59:54 (or thereabouts).
thanks, that's what i suspected.
Dr_Colossus
2003-11-09, 02:21
the choose best resolution is good for most videos, but i find that fine control is nessesary for most of my videos (anime). they have hard subtitles and are basically useless with the option turned on. xbmc doesn't have a usable calibration yet (videos don't seem to pay any attention to the boundaries i set, well they do but not with the expected results) so i'm forced to use xbmp which is plenty robust. i also have a superstition about retaining the original size of videos, 640*480 for example i would set to something like 640*416 (416 because that seems to be the verticle resolution of my primary tv) in xbmp, multiples of 16 to minimize whatever quality degredation i might see from resizing. this is all probably silly but i think i get higher quallity video in the end. widescreen sources are even better because i can retain the size exactly in most cases.
in any case a usable calibration and aspect ratio controls are required before i play all my videos with xbmc.
this is on a ntsc xbox, using s-video on a 27" hitachi.
jmarshall
2003-11-09, 05:53
a useable calibration?
what is wrong with xbmc's current calibration for movies?
also, adjustment of aspect ratio can be done - it's just a matter of making it as nice as possible. for instance, i see little point in having a gui option that needs to be changed for every movie whose aspect ratio is off, then have to change it back for the next movie.
i'm thinking about a simple choice based system that can be altered via a button click (as zoom->normal->stretch currently is).
this could use some preset pixel ratios for the source, such as:
ratio from source file (for mpeg1/2 etc), 1:1, pal (128:117), pal anamorphic, ntsc (72:79), ntsc anamorphic, 1:1 anamorphic, stretch.
perhaps you and others have better ideas? if so, please let me know.
thanks,
jonathan
Dr_Colossus
2003-11-09, 11:37
i just found out why video calibration seemed useless, the calibration boundaries (by this i mean the graphical aid) are affected by the calibration of the ui. try this, calibrate the ui way out of wack then try to use the boundaries to calibrate the video, you'll see they're way off where the boundaries of the video overlay actually is. i've been recalibrating the ui in every build so every builds calibration has been useless to me. can't believe this bug has lasted this long.
jmarshall
2003-11-09, 23:42
thanks, i'll look into it.
it's likely "lasted this long" as the ui calibration defaults of (0,0) are fine for most people. a bug is only noticed if someone sees it and reports it.
it's on my todo list.
any ideas about the aspect ratio correction i mentioned?
any ideas about the aspect ratio correction i mentioned?
personally i like the ar stuff the way it is in xbmc. i guess it would be nice to have more options for troublesome videos that haven't been resized properly, but they're special cases.
i've been reading through this thread and also experimented a little in xbmc myself, and i'm still not sure the current method is the best possible. let's see if i can explain what i mean..
to begin with, i have a 4:3 tv. therefore i would of course like 4:3 content such as a 640x480 .avi-file to cover the whole screen without any black borders at the sides. this is possible to achieve if i calibrate the screen so that the black borders on the sides fall outside the visible area. (i've only used 720x576 pal 50 so far).
so far so good.. but now when i want to play 16:9 content such as a 640x360 .avi, it does not work as it should. because the calibrated area has the sides too far out, the video appears "zoomed in" as the left and right sides are outside the visible area, and to me it makes sense that the video should only be inside the visible area in this case.
so i guess my point is something like this.. shouldn't the area inside the calibration arrows always be considered the visible 4:3 area no matter the resolution and where they are placed? right now this isn't the case as the calibration never affects the aspect ratio of the shown picture.
a problem with this would of course be the previously discussed 720x576 movies, that should have their outermost left and right pixels outside of the visible area.. but perhaps this should be the special case and be handled like the mir.com site suggest: "to be displayed properly in a 4:3 screen or window, the frames should be cropped by 8 pixels on each side. "
i hope this makes any sense, i must admit i still find it a little confusing. :)
jmarshall
2003-11-14, 03:14
the only way you'll get black bars on the sides of a 640x480 avi file in xbmc is if:
1. they're encoded in the movie (unlikely)
2. your calibration height is too small, compared to the calibration width.
increasing the calibration width will do nothing to remedy this. you need to increase the calibration height. this will then force xbmc to fill the width of the screen first, thus any "black bars" will appear at the top and bottom - offscreen, seeing as you increased the height. note that now widescreen avi files will use the full width of the screen, which is then ok.
as for the calibration, an alteration for the pixel ratio may be added, assuming demand is there.
i am thinking of a large square drawn in the centre of the screen, which can be resized using the dpad/stick. this will default to being the actual pixel ratio in size (ie exact defaults) and will only need to be changed if necessary. a message on screen such as:
"resize this so that it is a perfect square on your screen"
should help people to understand what it means. the system will use this to determine the pixel ratio of the users tv.
the arrows will then allow overscan correction, just as they currently do now. a message can be displayed so that users know what to do here, as well.
i think this is a much better solution to the problem, as it allows perfect aspect ratios, whilst allowing people to also have perfect overscan settings.
any comments on this?
thanks for replying, i still have some questions though. :) here goes..
yeah that sounds right that i could avoid this effect by setting the calibration width exactly to the screen edges and raising the top instead. but that doesn't really solve the problem i think, just move it to the other side, because if i now play some imaginary 9:16-video or somesuch it will now lose it's top and bottom pixels. (same thing if i were to use zoom i think).
if you are using 720x576 pal, and have the calibration all set to (0,0) -> (0,0) so that you are getting all the pixels, then a 4:3 aspect ratio movie (such as an avi with a frame size of 640x480) will be shown with size 702x576. this is the correct frame size (actually it's 702 54/59 pixels wide) that defines the pal 4:3 picture. note that the black bars (around 8 and a bit pixels either side) at the sides of the picture will not be seen, as most tv's have overscan of around 16 pixels either side.
doesn't this mean that the same problem i was trying to describe will occur? if i have no calibration ((0,0)->(0x0)) the 4:3 640x480 .avi-file will indeed look correct as you say, because the overscan pixels at the sides will not be used. but if i play a 16:9 640x360 .avi, it will fill out the width and now be using those overscan pixels. but i don't want the actual picture from the 16:9 movie to be any vider than the 4:3 one because then i'm missing pixels that i'd rather have visible.
what i'm trying to get at i think is that your aspect ratio calculations are just fine, but the calibration needs to be altered to calibrate the visible 4:3 area instead of adjusting this slightly too wide pal area.
another thing with the current calibration is that i find it rather counter-intuitive. i think the cause is this: what i'm really calibrating is position (x,y) and size (just size, not width and height). which is three variables. but the calibration arrows define four variables (top x,y bottom x,y). so when i move the bottom arrow i can affect where the top of the picture is which i found very confusing. :)
the aspect ratio calibration that you suggest sounds like a good idea, but as you say it probably isn't needed as most tv's most likely have a correct ar already.
i haven't actually tried your suggestions though so it is quite possible that i'm still completely wrong, but i'll try it out tonight after work. thanks for your time anyway. :)
jmarshall
2003-11-16, 00:36
to be clear:
the calibration arrows have nothing to do with the 4:3 or 16:9 frame on screen. they simply define the overscan area of your television.
what you have to realise is that the piece you actually see on your television is probably not a 4:3 area. it certainly won't be the 4:3 frame as defined by the pal standards (which is 702x576 pixels) due to overscan. most likely it will not even measure 4:3 in ratio (feel free to get out the ruler). thus, accepting the users frame from calibration as the 4:3 frame is just plain wrong.
i'm sure you also realize that most of your divx videos etc. originate from a dvd, where some of the picture will be in the overscan area of the tv by design.
cheers,
jonathan
after some more experimenting i guess i must agree that you are completely correct. i did some ruler measuring as you suggested, and it turned out that my tv's visible area is almost exactly 4:3, but a video displaying a square is slightly too wide. this was the source of confusion i guess, as i tried to compensate for this with the calibration. but as you say the calibration has nothing to to with the aspect ratio.
so i guess what i really wanted is what you suggested earlier, an aspect ratio calibration. the idea of displaying a square and a message with "resize this so that it is a perfect square on your screen" sounds very good. sorry for wasting your time with my earlier ramblings. :)
AlCapone
2003-11-23, 17:54
how can i quickly change resolution in order to compare quality ?
(can use both pal & ntsc, dlp projector)
jmarshall
2003-11-23, 23:52
if you have a dlp projector, is it capable of 480p or higher?
if so, do you have an hdtv pack?
if your xbox is configured as pal (it's done in the eeprom) then xbmc can autoswitch to pal60 which is basically ntsc framerate and resolution but with the pal colour system. this is done by enabling the pal60 option.
the "choose best resolution" option only does 16:9 <-> 4:3 switching if you are a pal or ntsc user. hdtv users get the added benefit of switching to higher modes (720p etc.) based on whether the resolution of the movie justifies the switch.
hope this helps.
AlCapone
2003-11-23, 23:58
1024x768 max resolution, it shows any lower resolution not by downscaling it (would give poor quality), but by using less pixels, and zooming up the picture optically (motorized)
i use the "advanced" av cable.
videos look great on my 6.4" ntsc screen in my truck.. :)
i just added a new option called
'adjust framerate' or frame rate conversions
this allows perfect smooth playback of ntsc movies on an pal box or pal movies on an ntsc box
see this thread (http://www.xboxmediaplayer.de/cgi-bin/forums/ikonboard.pl?act=st;f=5;t=860) for more details
frodo
i had some problems with choose best resolution for videos with svcd's. some of these are encoded with black bars up and down, and to watch them on my widscreen tv, i need to enable zoom mode. this however creates a problem as the resolution chosen is a 4:3 pal one, this meens my tv switches to 4:3 mode.
when i choose zoom, it doesn't switch to a 16:9 resolution, which i think i should. this meens i can't use the feature.
thanx
joakim plate
owain_thomas
2004-01-28, 21:03
i've just got xbmc up and running (15th jan 04 build) and i've got to say the picture quality of divxs is appaling compared to v2.3 of xbmp i was using.
there are jagged lines over all the edges, it looks like its being displayed at a much lower resolution.
i'm watching on 36" tv at 16:9 480p via the hi def av pack.
i've tried the different options for resolution and filters as much as possible but nothing seems to get a pq even half as good as it used to be.
any suggestions?
owain
have you disabled all post processing filters?
if not, try that.
ts
Gamester17
2004-02-19, 12:31
does "choose best resolution for videos" detect if a video is ntsc or pal and take that into consideration before switch 16:9/4:3?
as an exampel 720x480 would be widesceen to pal but not to ntsc if you just look at the resolution of the video.
what i mean is if i start a 720x480 ntsc video on my pal xbox/xbmc/tv and have "choose best resolution" selected, will "choose best resolution" detect that as 16:9 or 4:3? it should be deletced as 4:3 since ntsc but if "choose best resolution" don't check for ntsc/pal and only check the resolution then it will think that 720x480 is 16:9, or?
Gamester17
2004-02-20, 13:30
looks like checking if the video is pal and ntsc is not taking into consideration, see this comment by frodo:first of all a bug was fixed concerning this feature yesterday.
second this option switches between 16:9 and 4:3 based
on the aspect ratio of the movie
if the aspect ratio of a movie > 1.53 then it will use 16:9
otherwise it will use 4:3
so for example
- 640x240 has an ar of 2.66 and will b played with 16:9
- 640x480 has an ar of 1.33 and will b played with 4:3
pal/ntsc is not taken in consideration. why? cause there is no clear standard for widescreen ntsc.
for example 740x480 is used both as 16:9 or 4:3 format.
frodo
Gamester17
2004-02-20, 13:31
i guess that another thing that need to be checked and taking in consideration is if video is anamorphic widescreen (http://www.dvdweb.co.uk/information/anamorphic.htm) or not
jmarshall
2004-02-23, 02:14
gamester + others:
what is taken into account is the output frame size of the video. this is after the in-built aspect ratio (of mpeg 1/2/4 or mkv or whatever else mplayer can read) has been taken into account.
eg. dvds that are anamorphically encoded - xbmc will see they're output frame size as 1024x576 (for pal), whereas dvds that are not anamorphic will be give xbmc am output frame size of 768x576.
we also use the frame rate of the film (best indicator of pal vs. ntsc) to determine whether pal50 or pal60 should be used on pal systems. note that ntsc xbox's cannot be switched to output pal without resetting the eeprom, which we don't (and won't) do.
after all that, we use the output frame size to do widescreen switching - this is based on minimizing black bars, which if you do the math turns out to be and ar of 8/(3*sqrt(3)) which is around the 1.53 as frodo wrote.
lastly, we take into account the users pixel ratio, zoom and stretch settings and so on to determine the actual frame size to use in order to get the desired display.
hope this helps,
jonathan