-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from actlaboratory/cat/lfs_is_useless
FFmpegを外部リソースから持って来るスクリプトを追加
- Loading branch information
Showing
6 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
ffmpeg.exe filter=lfs diff=lfs merge=lfs -text | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ runCMD.bat | |
*.po~ | ||
temp/ | ||
*.zip | ||
ffmpeg.exe |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os | ||
import sys | ||
sys.path.append(os.getcwd()) | ||
|
||
from tools import ffmpegDownloader | ||
|
||
|
||
if os.path.isfile("ffmpeg.exe"): | ||
print("ffmpeg.exe already exists!") | ||
else: | ||
ffmpegDownloader.downloadFFmpeg() | ||
# end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import urllib.request | ||
import os | ||
import shutil | ||
import zipfile | ||
|
||
def downloadFFmpeg(): | ||
ffmpegVersion = "6.1.1" | ||
remoteFile = "ffmpeg-%s-full_build" % ffmpegVersion | ||
url = "https://github.com/GyanD/codexffmpeg/releases/download/%s/%s.zip" % (ffmpegVersion, remoteFile) | ||
print("Downloading FFmpeg from %s" % url) | ||
urllib.request.urlretrieve(url, "ffmpeg.zip") | ||
print("Extracting FFmpeg...") | ||
with zipfile.ZipFile("ffmpeg.zip", "r") as zip: | ||
zip.extract("%s/bin/ffmpeg.exe" % remoteFile) | ||
# end with | ||
print("moving ffmpeg.exe to current directory...") | ||
shutil.move(os.path.join(remoteFile, "bin", "ffmpeg.exe"), "ffmpeg.exe") | ||
print("removing temporary files...") | ||
shutil.rmtree(remoteFile) | ||
os.remove("ffmpeg.zip") | ||
print("got ffmpeg!") |