Compare commits

...
7 Commits
5 changed files with 1007 additions and 947 deletions

No files matched your search

+24 -24
View File
@@ -18,34 +18,34 @@ jobs:
gh-token: ${{ secrets.GITHUB_TOKEN }}
parse-changelog: false
build-windows:
runs-on: windows-latest
# build-windows:
# runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# steps:
# - uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.9'
- name: Install dependencies with Poetry
run: |
pip install poetry
poetry install
# - name: Install dependencies with Poetry
# run: |
# pip install poetry
# poetry install
- name: Download ffmpeg binary
run: python platform/download_ffmpeg.py
# - name: Download ffmpeg binary
# run: python platform/download_ffmpeg.py
- name: Build EXE with PyInstaller
run: poetry run pyinstaller karaoke-prep.spec
# - name: Build EXE with PyInstaller
# run: poetry run pyinstaller karaoke-prep.spec
- name: Upload EXE as Artifact
uses: actions/upload-artifact@v2
with:
name: karaoke-prep-windows
path: |
build/
*.exe
*/*.exe
# - name: Upload EXE as Artifact
# uses: actions/upload-artifact@v2
# with:
# name: karaoke-prep-windows
# path: |
# build/
# *.exe
# */*.exe
@@ -33,6 +33,7 @@ class KaraokeFinalise:
youtube_description_file=None,
rclone_destination=None,
discord_webhook_url=None,
non_interactive=False,
):
self.logger = logging.getLogger(__name__)
self.logger.setLevel(log_level)
@@ -82,6 +83,7 @@ class KaraokeFinalise:
self.public_share_rclone_enabled = False
self.skip_notifications = False
self.non_interactive = non_interactive
self.suffixes = {
"title_mov": " (Title).mov",
@@ -166,6 +168,10 @@ class KaraokeFinalise:
raise Exception(exit_message)
def prompt_user_bool(self, prompt_message, allow_empty=False):
if self.non_interactive:
self.logger.warning(f"Non-interactive mode, responding True for prompt: {prompt_message}")
return True
options_string = "[y]/n" if allow_empty else "y/[n]"
accept_responses = ["y", "yes"]
if allow_empty:
@@ -550,7 +556,16 @@ class KaraokeFinalise:
env_mov_input = f"-i {end_mov_file}"
ffmpeg_filter = '-filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0]concat=n=3:v=1:a=1[outv][outa]"'
join_ffmpeg_command = f'{self.ffmpeg_base_command} -i {title_mov_file} -i {karaoke_mov_file} {env_mov_input} {ffmpeg_filter} -map "[outv]" -map "[outa]" -c:v libx264 -c:a aac_at -q:a 14 {output_final_mp4_file}'
aac_codec = "libfdk_aac"
# Check if aac_at codec is available
codec_check_command = f'{self.ffmpeg_base_command} -codecs'
result = os.popen(codec_check_command).read()
if 'aac_at' in result:
aac_codec = "aac_at"
join_ffmpeg_command = f'{self.ffmpeg_base_command} -i {title_mov_file} -i {karaoke_mov_file} {env_mov_input} {ffmpeg_filter} -map "[outv]" -map "[outa]" -c:v libx264 -c:a {aac_codec} -q:a 14 {output_final_mp4_file}'
self.logger.debug(f"Running command: {join_ffmpeg_command}")
self.execute_command(join_ffmpeg_command, "Joining title and instrumental videos")
+1
View File
@@ -60,6 +60,7 @@ def main():
nargs="+",
default=[
"UVR_MDXNET_KARA_2.onnx",
"mel_band_roformer_karaoke_aufr33_viperx_sdr_10.1956.ckpt",
"2_HP-UVR.pth",
"model_bs_roformer_ep_317_sdr_12.9755.yaml",
"MDX23C-8KFFT-InstVoc_HQ_2.ckpt",
Generated
+964 -920
View File
File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "karaoke-prep"
version = "0.22.2"
version = "0.23.0"
description = "Prepare for karaoke video creation, by downloading audio and lyrics for a specified song or playlist from youtube and separating audio stems. After syncing, finalise the video with a title screen!"
authors = ["Andrew Beveridge <andrew@beveridge.uk>"]
license = "MIT"
@@ -26,7 +26,7 @@ google-auth-httplib2 = "*"
pyperclip = ">=1.8"
thefuzz = ">=0.22"
numpy = "^1"
audio-separator = { version = ">=0.17.5", extras = ["cpu"] }
audio-separator = { version = ">=0.21.0", extras = ["cpu"] }
lyrics-converter = ">=0.2.1"
[tool.poetry.group.dev.dependencies]