Option to use the lowset rez needed.
If I want to be able to watch HD videos via pyTivo, I have to set height to 720. But that means that SD videos are transcoded to 720, wasting space. It should transcode videos to an appropriate format.
I have patched pyTivo to do just that. I've added a new config option, optres, which, when set to true, makes pyTivo interpret the width and height options as maxima, and chooses the closest resolution to transcode to less than those values.
The patch is very small and is attached. There's also a line that changes the max bitrate from being specified in Mbps to being specified in kbps. This is to fix a problem I had with my ffmpeg not understanding the "M" suffix and is unrelated to the transcode optimization.