You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use Augly to perform data enhancement operations on videos, I encounter this problem:
Compression Mode is disabled, Kindly enable it to access this function.
But I have installed ffmpeg and configured the environment. Then I tried to debug the code and found a bug.
When the function add_augmenter() calls WriteGear(),The value of parameter custom_ffmpeg is not specified. But later in the code, it is necessary to use its real value:
So that in function get_valid_ffmpeg_path(), the value returned is always False, which causes the program to fail to get the locally downloaded ffmpeg package and must download it again.
Line885inhelper.py:
defget_valid_ffmpeg_path(
custom_ffmpeg="", is_windows=False, ffmpeg_download_path="", logging=False
):
""" ## get_valid_ffmpeg_path Validate the given FFmpeg path/binaries, and returns a valid FFmpeg executable path. Parameters: custom_ffmpeg (string): path to custom FFmpeg executables is_windows (boolean): is running on Windows OS? ffmpeg_download_path (string): FFmpeg static binaries download location _(Windows only)_ logging (bool): enables logging for its operations **Returns:** A valid FFmpeg executable path string. """final_path=""ifis_windows:
# checks if current os is windowsifcustom_ffmpeg:
# if custom FFmpeg path is given assign to local variablefinal_path+=custom_ffmpegelse:
# otherwise auto-download themtry:
ifnot (ffmpeg_download_path):
# otherwise save to Temp Directoryimporttempfileffmpeg_download_path=tempfile.gettempdir()
loggingandlogger.debug(
"FFmpeg Windows Download Path: {}".format(ffmpeg_download_path)
)
# download Binariesos_bit= (
("win64"ifplatform.machine().endswith("64") else"win32")
ifis_windowselse""
)
_path=download_ffmpeg_binaries(
path=ffmpeg_download_path, os_windows=is_windows, os_bit=os_bit
)
# assign to local variablefinal_path+=_path
2 Solution
Giving the path to the local ffmpeg package when use get_valid_ffmpeg_path(). Like this:
1 Issues
When I use
Augly
to perform data enhancement operations on videos, I encounter this problem:But I have installed
ffmpeg
and configured the environment. Then I tried to debug the code and found a bug.When the function
add_augmenter()
callsWriteGear()
,The value of parametercustom_ffmpeg
is not specified. But later in the code, it is necessary to use its real value:So that in function
get_valid_ffmpeg_path(),
the value returned is always False, which causes the program to fail to get the locally downloadedffmpeg
package and must download it again.2 Solution
Giving the path to the local
ffmpeg
package when useget_valid_ffmpeg_path()
. Like this:Its path can be obtained using the following method:
This way you won't need to reinstall the
ffmpeg
package every time you use it.The text was updated successfully, but these errors were encountered: