ulduldp commited on
Commit
312953e
·
verified ·
1 Parent(s): be16784

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -260,7 +260,7 @@ def generate():
260
  image.save(image_path)
261
  audio.save(audio_path)
262
 
263
- cmd = [
264
  "ffmpeg",
265
  "-y",
266
  "-loop", "1",
@@ -273,6 +273,24 @@ def generate():
273
  "-pix_fmt", "yuv420p",
274
  "-shortest",
275
  output_path
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  ]
277
 
278
  try:
 
260
  image.save(image_path)
261
  audio.save(audio_path)
262
 
263
+ """cmd = [
264
  "ffmpeg",
265
  "-y",
266
  "-loop", "1",
 
273
  "-pix_fmt", "yuv420p",
274
  "-shortest",
275
  output_path
276
+ ]"""
277
+ cmd = [
278
+ "ffmpeg",
279
+ "-y",
280
+ "-loop", "1",
281
+ "-i", image_path,
282
+ "-i", audio_path,
283
+
284
+ "-vf",
285
+ "scale=trunc(iw/2)*2:trunc(ih/2)*2",
286
+
287
+ "-c:v", "libx264",
288
+ "-tune", "stillimage",
289
+ "-c:a", "aac",
290
+ "-b:a", "192k",
291
+ "-pix_fmt", "yuv420p",
292
+ "-shortest",
293
+ output_path
294
  ]
295
 
296
  try: