Spaces:
Paused
Paused
Commit 路
5bdcc47
1
Parent(s): 94c3fc3
Update app.py
Browse files
app.py
CHANGED
|
@@ -110,7 +110,7 @@ def process_video(Video, target_language):
|
|
| 110 |
#transcript_file_abs_path = os.path.abspath(transcript_file)
|
| 111 |
try:
|
| 112 |
if target_language_code == 'ja': # 'ja' 茅 o c贸digo de idioma para o japon锚s
|
| 113 |
-
result = subprocess.run(["ffmpeg", "-i", Video, "-vf", f"subtitles={transcript_file}:force_style='FontName=Noto Sans CJK JP',charenc=UTF-8, "-scodec", "mov_text", "-metadata:s:s:0", "language=jpn", output_video], capture_output=True, text=True)
|
| 114 |
else:
|
| 115 |
result = subprocess.run(["ffmpeg", "-i", Video, "-vf", f"subtitles={transcript_file}:force_style='FontName=Arial Unicode MS'", output_video], capture_output=True, text=True)
|
| 116 |
if result.returncode == 0:
|
|
|
|
| 110 |
#transcript_file_abs_path = os.path.abspath(transcript_file)
|
| 111 |
try:
|
| 112 |
if target_language_code == 'ja': # 'ja' 茅 o c贸digo de idioma para o japon锚s
|
| 113 |
+
result = subprocess.run(["ffmpeg", "-i", Video, "-vf", f"subtitles={transcript_file}:force_style='FontName=Noto Sans CJK JP',charenc=UTF-8", "-scodec", "mov_text", "-metadata:s:s:0", "language=jpn", output_video], capture_output=True, text=True)
|
| 114 |
else:
|
| 115 |
result = subprocess.run(["ffmpeg", "-i", Video, "-vf", f"subtitles={transcript_file}:force_style='FontName=Arial Unicode MS'", output_video], capture_output=True, text=True)
|
| 116 |
if result.returncode == 0:
|