Skip to content

Commit

Permalink
allow specifying ffmpeg exe path using --ffmpeg-path
Browse files Browse the repository at this point in the history
  • Loading branch information
smacke committed Mar 18, 2024
1 parent de75bdb commit 0e34c9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ffsubsync/ffmpeg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def ffmpeg_bin_path(bin_name, gui_mode, ffmpeg_resources_path=None):
if platform.system() == "Windows":
bin_name = "{}.exe".format(bin_name)
if ffmpeg_resources_path is not None:
if not os.path.isdir(ffmpeg_resources_path):
if bin_name.lower().startswith("ffmpeg"):
return ffmpeg_resources_path
ffmpeg_resources_path = os.path.dirname(ffmpeg_resources_path)
return os.path.join(ffmpeg_resources_path, bin_name)
try:
resource_path = os.environ[SUBSYNC_RESOURCES_ENV_MAGIC]
Expand Down

0 comments on commit 0e34c9c

Please sign in to comment.