HMS

Home Media Server for Roku Players
git clone https://www.brianlane.com/git/HMS
Log | Files | Refs | README | LICENSE

commit e10ea7f60ed072ff92c2faa86f230d17cb69f23f
parent ec79ce4c54810cf20d51d1a8b18bb3457552becf
Author: Brian C. Lane <bcl@brianlane.com>
Date:   Thu, 18 Mar 2010 21:03:00 -0700

Add big height based on video aspect ratio

Pull the video size from the file and adjust the bif image size
accordingly.

Diffstat:
Mserver/scripts/makebif.py | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/server/scripts/makebif.py b/server/scripts/makebif.py @@ -145,8 +145,13 @@ def main(): # This may be useful for determining the video format # Get info about the video file -# videoInfo = getMP4Info(videoFile) -# print videoInfo + videoInfo = getMP4Info(videoFile) + if videoInfo["size"]: + size = videoInfo["size"].split("x") + aspectRatio = float(size[0]) / float(size[1]) + width, height = videoSizes[options.mode] + height = int(width / aspectRatio) + videoSizes[options.mode] = (width, height) tmpDirectory = tempfile.mkdtemp()