Download utils/ffmpeg_utils.py from laohur/CrabCut: direct link, hf CLI and curl.
- Browser
- Download file 365 Bytes
-
https://huggingface.co/spaces/laohur/CrabCut/resolve/main/utils/ffmpeg_utils.py
- Command line
-
hf download hf://spaces/laohur/CrabCut/utils/ffmpeg_utils.py
-
curl -L -o ffmpeg_utils.py https://huggingface.co/spaces/laohur/CrabCut/resolve/main/utils/ffmpeg_utils.py
365 Bytes
| def get_ffmpeg_path(): | |
| try: | |
| import imageio_ffmpeg | |
| return imageio_ffmpeg.get_ffmpeg_exe() | |
| except ImportError: | |
| return "ffmpeg" | |
| def get_ffprobe_path(): | |
| import shutil | |
| ffprobe = shutil.which("ffprobe") | |
| if ffprobe: | |
| return ffprobe | |
| return "ffprobe" | |
| FFMPEG_PATH = get_ffmpeg_path() | |
| FFPROBE_PATH = get_ffprobe_path() | |