Undisputed Posted March 11 Share Posted March 11 i have a script that is supposed to edit the pitch and speed and save as a mp3 like the input mp3 it gives no result, nothing saves the input file #include <File.au3> #include <Array.au3> #include <Constants.au3> ; Set the path to the FFmpeg executable Global $ffmpegPath = "C:\Users\user\Downloads\ffmpeg-master-latest-win64-gpl\ffmpeg-master-latest-win64-gpl\bin\ffmpeg.exe" ; Set the path to the folder containing the audio files Global $audioFolder = "C:\Users\user\Downloads\mp3\mp3" ; Set the desired pitch and speed adjustments Global $pitchAdjustment = 0.72 ; Increase pitch by 50% Global $speedAdjustment = 0.83 ; Decrease speed by 50% ; Recursively search for all MP3 files in the specified folder and its subfolders Global $mp3Files = _FileListToArrayRec($audioFolder, "*.mp3", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT) ; Loop through each MP3 file and apply the pitch and speed adjustments using FFmpeg For $i = 1 To $mp3Files ; Get the full path to the current MP3 file Local $mp3File = $mp3Files[$i] ; Get the path to the folder containing the current MP3 file Local $mp3Folder = StringLeft($mp3File, StringInStr($mp3File, "\", 0, -1)) ; Get the base filename (without extension) of the current MP3 file Local $mp3BaseName = StringRegExpReplace($mp3File, "(.*\\)(.*)(\.mp3)", "$2") ; Construct the command-line arguments for FFmpeg Local $ffmpegArgs = "-i """ & $mp3File & """ -filter:a ""atempo=" & $speedAdjustment & ",asetrate=44100*" & $pitchAdjustment & """ -vn -c:a libmp3lame -q:a 2 """ & $mp3Folder & $mp3BaseName & ".mp3""" ; Call FFmpeg to process the current MP3 file RunWait('"' & $ffmpegPath & '" ' & $ffmpegArgs, "", @SW_HIDE) Next how to fix it mp3.rar Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now