Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube Playlist as Imput - Songs are named by the Playlist name #174

Open
mARTin-B78 opened this issue Oct 15, 2024 · 1 comment
Open

Comments

@mARTin-B78
Copy link

When using a Youtube Playlist as imput Source UltraSinger recognises the Songs in the Playlist but names the Output Folder and Files after the Playlist name and not by the individual Video Titles from the Youtube Videos.

@mARTin-B78
Copy link
Author

Sorry that I can not code Python.
Got this Batchfile as a working WORKAROUND and it Works.

Just change some Paths an the UltraSinger Command to your needs.

`@echo off
setlocal enabledelayedexpansion

:: Variablen definieren
:: Path to Python 3.10 installation https://www.python.org/downloads/release/python-31015/
set "PYTHON_PATH=C:\Users\YOUR_USER_NAME\AppData\Local\Programs\Python\Python310\python.exe"

:: Path to UltraSinger installation https://github.com/rakuri255/UltraSinger
set "ULTRASINGER_PATH=C:\Program Files (x86)\UltraSinger\src\UltraSinger.py"

:: Path to Musescore installation https://musescore.org/de/download
set "MUSESCORE_PATH=C:\Program Files\MuseScore 4\bin\MuseScore4.exe"

:: Output Folder Directory - For Example Songsfolder in UltraStar https://usdx.eu/downloads/
set "OUTPUT_PATH=C:\Program Files (x86)\UltraStar Deluxe\songs"

:: get the YouTube-Playlist-URL from the User
set /p PLAYLIST_URL="Enter YouTube-Playlist-URL: "

:: Python-Script to extract the Videos from the Playlist and generate a Playlist file.
%PYTHON_PATH% -c "from pytube import Playlist; playlist = Playlist('%PLAYLIST_URL%'); print('\n'.join(playlist.video_urls))" > playlist_urls.txt

:: Batch process all videos from the Youtube Playlist
for /f "tokens=*" %%a in (playlist_urls.txt) do (
echo Verarbeite: %%a
%PYTHON_PATH% "%ULTRASINGER_PATH%" -i "%%a" -o "%OUTPUT_PATH%" -m --crepe full --hyphenation True --format_version 1.1.0 --force_cpu True --musescore_path "%MUSESCORE_PATH%"
)

:: Cleanup
del playlist_urls.txt

echo ALL VIDEOS HAVE BEEN PROCESSED.
pause
`

batch_ultrasinger.bat.TXT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant