-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To get ffmpeg 6 to work, we need to set AVFrame.channels. This does not exist in FFmpeg 7, and worse yet, Cython's compile time is terrible. To get the builds working for both 6 and 7, we implement our own comptime in scripts/comptime.
- Loading branch information
Showing
7 changed files
with
84 additions
and
48 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
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
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
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,30 @@ | ||
import os | ||
import sys | ||
|
||
def replace_in_file(file_path): | ||
try: | ||
with open(file_path, "r", encoding="utf-8") as file: | ||
content = file.read() | ||
|
||
modified_content = content.replace("# [FFMPEG6] ", "") | ||
|
||
with open(file_path, "w") as file: | ||
file.write(modified_content) | ||
except UnicodeDecodeError: | ||
pass | ||
|
||
|
||
def process_directory(directory): | ||
for root, dirs, files in os.walk(directory): | ||
for file in files: | ||
file_path = os.path.join(root, file) | ||
replace_in_file(file_path) | ||
|
||
if sys.platform == "win32": | ||
is_6 = sys.argv[1].startswith("6") | ||
else: | ||
is_6 = os.environ.get("PYAV_LIBRARY").startswith("ffmpeg-6") | ||
|
||
if is_6: | ||
process_directory("av") | ||
process_directory("include") |
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