Skip to content

Commit 0e34c9c

Browse files
committed
allow specifying ffmpeg exe path using --ffmpeg-path
1 parent de75bdb commit 0e34c9c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ffsubsync/ffmpeg_utils.py

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ def ffmpeg_bin_path(bin_name, gui_mode, ffmpeg_resources_path=None):
7070
if platform.system() == "Windows":
7171
bin_name = "{}.exe".format(bin_name)
7272
if ffmpeg_resources_path is not None:
73+
if not os.path.isdir(ffmpeg_resources_path):
74+
if bin_name.lower().startswith("ffmpeg"):
75+
return ffmpeg_resources_path
76+
ffmpeg_resources_path = os.path.dirname(ffmpeg_resources_path)
7377
return os.path.join(ffmpeg_resources_path, bin_name)
7478
try:
7579
resource_path = os.environ[SUBSYNC_RESOURCES_ENV_MAGIC]

0 commit comments

Comments
 (0)