Primer milestone, zoom a segmento de imagen
Browse files- .gitignore +3 -0
- run.py +19 -0
.gitignore
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
/venv/
|
2 |
+
/media/
|
3 |
+
/resultados/
|
run.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import subprocess
|
2 |
+
|
3 |
+
ffmpeg_command = [
|
4 |
+
'ffmpeg', '-y',
|
5 |
+
'-loop', '1',
|
6 |
+
'-i', 'media/tp.jpg',
|
7 |
+
'-t', str(3),
|
8 |
+
'-vf',
|
9 |
+
# f"scale=16:9:force_original_aspect_ratio=increase,"
|
10 |
+
# f"crop=16:9,"
|
11 |
+
f"zoompan=z='zoom+0.0005':d=25*60",
|
12 |
+
'-r', str(25),
|
13 |
+
'-pix_fmt', 'yuv420p',
|
14 |
+
'-c:v', 'libx264',
|
15 |
+
'-preset', 'fast',
|
16 |
+
'resultados/resultado.mp4'
|
17 |
+
]
|
18 |
+
|
19 |
+
subprocess.run(ffmpeg_command, check=True)
|