This commit is contained in:
usernames122
2025-09-02 14:45:14 +02:00
parent a107da9170
commit ef0ceeddfe
36 changed files with 49 additions and 3 deletions

View File

@@ -1,4 +1,6 @@
# roblox-assets
# roblox-assets
Companion repo to
Hazzy/rbxl-files and includes ripped assets from the saveinstance games
Hazzy/rbxl-files and includes ripped assets from the saveinstance games
Scanner.py is just the sorter i use for sorting out long audio (>30s) out of the normal audio_files folder

44
scanner.py Normal file
View File

@@ -0,0 +1,44 @@
import os
import shutil
import subprocess
# Folders
source_folder = "audio_files"
destination_folder = "music_prolly"
# Ensure destination folder exists
os.makedirs(destination_folder, exist_ok=True)
def get_audio_duration(file_path):
"""Returns duration of audio file in seconds using ffprobe."""
try:
result = subprocess.run(
[
"ffprobe",
"-v", "error",
"-show_entries", "format=duration",
"-of", "default=noprint_wrappers=1:nokey=1",
file_path
],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT
)
return float(result.stdout)
except Exception as e:
print(f"Error reading duration for '{file_path}': {e}")
return 0
# Process files
for filename in os.listdir(source_folder):
file_path = os.path.join(source_folder, filename)
if not os.path.isfile(file_path):
continue
duration = get_audio_duration(file_path)
if duration > 30:
shutil.move(file_path, os.path.join(destination_folder, filename))
print(f"Moved '{filename}' ({duration:.2f}s) → '{destination_folder}'")
else:
print(f"Kept '{filename}' ({duration:.2f}s)")