I've just got myself a 5g (video) iPod, and am converting divx videos to mp4 (the stupid thing doesn't support / play divx). Doing this has just made me more curious about the topic. I have a few questions: (a) If the video I have is encoded at say (for example) 624 x 352, is there any point in re-encoding it at a resolution higher than this? (this is a bit of a funny resolution, no?) (b) If the video I have is encoded at say (for example) 1Mbps, is there any point in re-encoding it at a bitrate higher than this? (c) tell me about bitrates... and the difference between CBR and VBR? I'm encoding @ 768kbps (and 640 x 360 for 16:9 material) with pretty good results. (d) I've been told that the product of resolution must be less than 230400 ("bandwidth") (H x W < 230400), and that (H x W)/256 < 900). I'm confused. cheers for any help.
There is no real point in upsizing, although it does allow you to choose the resize algorithm used. For instance a device might upsize using nearest neighbour or a bad bilinear resize. You can choose to use lanczos or whatever. Still for an ipod, there is no point in encoding greater than the screen's resolution. Whatever that is. When re-encoding to a lossy source, you loose quality, so a higher bitrate can make sense. Definatly if you are upsizing. CBR or VBR have nothing really to do with bitrate, well other than how it is distributed. The bitrate is simply the amount of bits per second. 768kbps = 768 kilo bits per second. CBR = Constant Bitrate, that means that (as much as possible) every second of video is 768kbps. VBR is variable bitrate, that means that the bitrate varies, but if the file is 768kbps, then it is 768kbps. But that is just an average. A dark still scene could be 300kb/s where as a high motion action scene could be 2mb/s. Confused about what exactly? H * W < 230400, but 230400 / 256 = 900 so the two statements are the exactly the same. Few points though. DivX (the video codec, not container) = MPEG-4 Part 2, which the ipod supports, just needs to be in an mp4 container. Also needs to be SP only I believe. Still if your DivX file doesn't use any ASP features, that means that you can simply remux. No need to convert. The max resolution supported I believe varies. eg. You can have higher resolution MPEG-4 than AVC. You should where possible stick with mod16 resolutions. 360 is not mod16.
hey celtic_d - thanks for the (very decent) reply! ok now I'm a total n00b when it comes to digital computer video... I'm going to ask you about some of the things you said... (i) 1st paragraph sorry? why would I want to do this? I'm sorry but I don't understand a lot of what your first paragraph says. you can encode things at a higher res than the ipod screen, as the ipod has video out. it can handle mpeg4 with any res where H x W < 230400 (pixels). (ii) 2nd paragraph ("...when re-encoding to a lossy...") lossy source? so there's no connection between bitrate of original and the output of the conversion? I don't understand the point of encoding at any higher than the original. It's not going to get any better quality... (iii) 3rd paragraph so if I do a conversion to 768kbps CBR - this is just an average? I just need to implement some trial-and-error to see if CBR is better for me than VBR? (iv) confused about what this BANDWIDTH is and where it comes from... what it means and how a certain bandwidth would be chosen. (v) fifth paragraph so why would Apple have chosen to play only files in this mpeg4 "container"? what is SP? what is ASP? what is mod 16? sorry for all the questions, but I want to learn as much about this as possible. also - I've downloaded a few divx's (tv shows) and they're all in 624 x 352. Is this some kind of "standard"?
Like I said, you get to pick the resize used, rather than the device. For instance if I used a HTPC to playback a DVD and upsized it to HD resolution rather than letting the TV do that. Since the TV almost definatly uses a lower quality resize. Well, yes if you are using the TV out, then a higher res would make sense. No, it is never going to be better quality, however when re-encoding lossy to lossy, the encoder has to preserve old artifacts, whilst trying not to introduce new ones. So whilst both won't look any better, reusing the same bitrate may result in something that looks noticably worse. CBR is more than just an average, that would be more ABR, but then in terms of video it isn't ever 100% CBR. VBR should always look better, since it means more bits for the scenes that need them. With CBR the encoder may have to bad a still scene and then use lower than desirable bitrates for a high speed action scene. Bandwidth: http://en.wikipedia.org/wiki/Bandwidth Why mp4? Because it is the official mp4 container. Why only mp4? You'd have to ask apple. No reason really why they couldn't have supported XviD/DivX/mp3 avi's, especially since they have become a quassi standard in their own right. SP = Simple Profile, ASP = Advanced Simple Profile. It also I believe only supports Baseline Profile when it comes to AVC. mod16, means divisable by 16. 624/352=1.77 which is basically 16:9, it is also mod16 and I guess for a 40min show at 350MB's it just makes sense. Another thing though, if the iPod supports non 1:1 SAR resizing, which it should since it is part of MPEG-4 specs, then you can encode at a different resolution than for playback. So say encode at 352x576, but then have it playback as 16:9.
cheers for the help mate. I really would like to know a bit more about this stuff, but have come across a few bumps in the road. - "nearest neighbour" / "a bad bilinear" resize... what are these? Are these resize algorithms built into devices such as TVs / DVD players? - "the encoder has to preserve old artifacts" - sorry, but why? I understand your "lossy to lossy" argument, makes sense. CBR vs VBR - makes sense, cheers. - any idea why videos I download are in CBR then? (well, as watching, the bitrate never seems to change. Framerate does though) - so where does h.264 come into all this? is it a wrapper / container for mp4? - what's the point of mod16? (better quality?) - 1:1 SAR resizing? what is this?