PythonDancer - A port of FunscriptDancer to Python

This is a port of FunscriptDancer by ncdxncdx to Python

It has a ready to run executeable for Windows.
Check the latest release at: Releases · NodudeWasTaken/PythonDancer · GitHub

Features:

  • Audio beat scripting
  • Qt5 UI
  • Commandline interface
  • Heatmap export
  • Funscript export
  • CSV export (cli only)
  • Automap to a speed specific speed (in units/s, same as OFS)

Automap works by averaging a certain speed at a given energy magnitude.
This means it doesnt work well if there are large silent sections.

Thanks to @ncdxncdx for the original app!

9 Likes

I just get initialization of internal failed whenever I try it with a song :person_shrugging:

I even tried building it from the source in a venv, but I get to like 20% loading and then it just won’t work with mp3, ogg, m4a files.

I’m able to get the oldest release working though…

This is actually pretty cool to get the beat of a song, sweet.

Here’s a preview of it working on a song:


my audio was low and I should’ve used OBS lol next time

Thats apparently an incompatibility between numba and numpy 1.24+
Im downgrading to numpy 1.23 to hopefully fix it for systems experiencing that

1 Like

I’ve had a report of malware (wacatac trojan from windows defender) on this download, could you give it a scan to check?

I imagine it’s a false positive since this is being built from open source, but might be worth giving the relase .exe a double check just in case :slight_smile:

It’s because the .exe has code for the downloader to download ffmpeg, yeah.
You can also build it yourself, just a bit of a hassle of you don’t program ofc. I had to play with Windows Defender a bit.

Im not inclined to remove the ffmpeg downloader as i would take a serious usability hit.
But getting detected by windows defender is a serious fault, so i will be considering alternative strategies.
For now you can have a scan of the latest build (numpy downgrade): VirusTotal
EDIT:
I did remove it

FFMpeg was missing
Please install ffmpeg using your package manager!
Suggestions:
Official Website: Download FFmpeg
Ubuntu/Debian: sudo apt install ffmpeg
Arch/Manjaro: sudo pacman -S ffmpeg
Homebrew: brew install ffmpeg
dancer\ui.py:41: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations.
self.canvas.draw()

how to fix it :frowning:

If you’re on windows, download ffmpeg and place ffmpeg.exe alongside pythondancer.exe
Or use winget or chocolatey.
If you’re on linux or macos, use the appropriate package manager.

1 Like

hi, i just downloaded the build.zip from the latest release and run the exe but this appears
“dancer\ui.py:41: UserWarning: Tight layout not applied. The bottom and top margins cannot be made large enough to accommodate all axes decorations.”

thank you very much i solved it :slight_smile:

This is a very useful tool, thank you. @Nodude

Anybody found a sweet spot for the settings?

I find that 225-250 is the sweetspot

sorry to bump,

but is it possible to generate more than one at a time? Setting up the settings and then just batch processing like 10 at once

The UI doesn’t support this, but with a bit of linux parallel magic you can use it via CLI, see the git description.
Like:
parallel --jobs 4 python -m dancer.cli -c -a --auto_speed 265 {} ::: ./videos/*.mp4

1 Like

thanks for the input. I dont use linux, but gpt made me a small script that uses the command line. It iterates through every mp4 file in the directory and puts the resulting funscripts into the output folder,

thanks again

care to share?

sure

import os

# Get the list of files in the current directory
files_in_directory = os.listdir()

# Filter out only the .mp4 files
mp4_files = [file for file in files_in_directory if file.endswith(".mp4")]

# Iterate over each .mp4 file
for mp4_file in mp4_files:
    # Output directory
    output_dir = "output"
    # Create the output directory if it doesn't exist
    os.makedirs(output_dir, exist_ok=True)
    
    # Command to execute
    command = (
        f'PythonDancer.exe --cli --automap --out_path "{output_dir}/{mp4_file}.funscript" "{mp4_file}"'
    )
    
    # Execute the command
    os.system(command)

be sure to delete the .mp4 from the funscript file. I use renamer for that.

Be sure to have the pythondancer.exe and the script in the same directory as your videos

1 Like