Youtube Playlist as Imput - Songs are named by the Playlist name
Opened this issue · 1 comments
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.
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
`