From 4ebd64becfa327a026bf2456676810241cbe567c Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 25 Sep 2014 16:49:17 +0200 Subject: [PATCH] fix melt cmd --- pandora/archive/extract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/archive/extract.py b/pandora/archive/extract.py index 85f9273a..d49f8d50 100644 --- a/pandora/archive/extract.py +++ b/pandora/archive/extract.py @@ -365,6 +365,7 @@ def melt_frame_cmd(video, frame, position, height=128, info=None): if not info: info = ox.avinfo(video) fps = float(AspectRatio(info['video'][0]['framerate'])) + position = int(position * fps) format = frame.split('.')[-1] vcodec = 'mjpeg' if format == 'jpg' else 'png' cmd = [ @@ -372,14 +373,13 @@ def melt_frame_cmd(video, frame, position, height=128, info=None): '-silent', video, 'in=%d' % position, 'out=%d' % position, - '-consumer' 'avformat:%s' % frame, + '-consumer', 'avformat:%s' % frame, 'vcodec=%s' % vcodec ] if height: dar = AspectRatio(info['video'][0]['display_aspect_ratio']) width = int(dar * height) width += width % 2 - position = int(position * fps) cmd += ['-s', '%sx%s' % (width, height)] return cmd