From c458bb00afb1f790cefc6b440cd3cfc95b2ea828 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 22 Jul 2013 11:19:03 +0200 Subject: [PATCH] scale extracted frames to square pixels --- pandora_client/extract.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_client/extract.py b/pandora_client/extract.py index ee44857..e64dfbf 100644 --- a/pandora_client/extract.py +++ b/pandora_client/extract.py @@ -65,7 +65,9 @@ def frame(video, target, position): pre = 0 else: position = 2 - cmd = [command('ffmpeg'), '-y', '-ss', str(pre), '-i', video, '-ss', str(position), '-an', '-vframes', '1', target] + cmd = [command('ffmpeg'), '-y', '-ss', str(pre), '-i', video, '-ss', str(position), + '-vf', 'scale=iw*sar:ih', + '-an', '-vframes', '1', target] r = run_command(cmd) return r == 0