scale extracted frames to square pixels
This commit is contained in:
parent
dc69a10e02
commit
c458bb00af
1 changed files with 3 additions and 1 deletions
|
@ -65,7 +65,9 @@ def frame(video, target, position):
|
||||||
pre = 0
|
pre = 0
|
||||||
else:
|
else:
|
||||||
position = 2
|
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)
|
r = run_command(cmd)
|
||||||
return r == 0
|
return r == 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue