Skip to content

Commit

Permalink
Merge branch 'main' into moviepy2
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimas committed Dec 19, 2024
2 parents 82e334b + 58db5e9 commit f06769a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: dev run-tests
.PHONY: dev run-tests run-e2e-tests publish-release

PATHS = open_dubbing/ tests/ e2e-tests/

Expand Down
6 changes: 2 additions & 4 deletions open_dubbing/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def embed_subtitles(
video_file: str,
subtitles_files: List[str],
languages_iso_639_3: List[str],
) -> str:
):
filename = ""
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
shutil.copyfile(video_file, temp_file.name)
Expand Down Expand Up @@ -131,14 +131,12 @@ def embed_subtitles(
logging.debug(f"embed_subtitles. Command: {' '.join(cmd)}")

# Run the command using the _run method
self._run(command=cmd, fail=True)
self._run(command=cmd, fail=False)
filename = temp_file.name

if os.path.exists(filename):
os.remove(filename)

return output_file

@staticmethod
def is_ffmpeg_installed():
cmd = ["ffprobe", "-version"]
Expand Down

0 comments on commit f06769a

Please sign in to comment.