Skip to content

Commit

Permalink
Use ffmpeg 7.0.2, flatten json
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Aug 8, 2024
1 parent 9cbb41b commit f9d375c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
33 changes: 16 additions & 17 deletions scripts/fetch-vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,19 @@ def get_platform():
if not os.path.exists(args.destination_dir):
os.makedirs(args.destination_dir)

for url_template in config["urls"]:
tarball_url = url_template.replace("{platform}", get_platform())

# download tarball
tarball_name = tarball_url.split("/")[-1]
tarball_file = os.path.join(args.cache_dir, tarball_name)
if not os.path.exists(tarball_file):
logging.info(f"Downloading {tarball_url}")
if not os.path.exists(args.cache_dir):
os.mkdir(args.cache_dir)
subprocess.check_call(
["curl", "--location", "--output", tarball_file, "--silent", tarball_url]
)

# extract tarball
logging.info(f"Extracting {tarball_name}")
subprocess.check_call(["tar", "-C", args.destination_dir, "-xf", tarball_file])
tarball_url = config["url"].replace("{platform}", get_platform())

# download tarball
tarball_name = tarball_url.split("/")[-1]
tarball_file = os.path.join(args.cache_dir, tarball_name)
if not os.path.exists(tarball_file):
logging.info(f"Downloading {tarball_url}")
if not os.path.exists(args.cache_dir):
os.mkdir(args.cache_dir)
subprocess.check_call(
["curl", "--location", "--output", tarball_file, "--silent", tarball_url]
)

# extract tarball
logging.info(f"Extracting {tarball_name}")
subprocess.check_call(["tar", "-C", args.destination_dir, "-xf", tarball_file])
4 changes: 2 additions & 2 deletions scripts/ffmpeg-6.0.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"urls": ["https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/6.0.0-1/ffmpeg-{platform}.tar.gz"]
}
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/6.0.0-1/ffmpeg-{platform}.tar.gz"
}
4 changes: 2 additions & 2 deletions scripts/ffmpeg-6.1.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"urls": ["https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/6.1.1-5/ffmpeg-{platform}.tar.gz"]
}
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/6.1.1-5/ffmpeg-{platform}.tar.gz"
}
4 changes: 2 additions & 2 deletions scripts/ffmpeg-7.0.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"urls": ["https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/7.0.1-1/ffmpeg-{platform}.tar.gz"]
}
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/7.0.2-1/ffmpeg-{platform}.tar.gz"
}

0 comments on commit f9d375c

Please sign in to comment.