Hi I need some help with this question if anyone can help me with this
Does anyone know of any software that will split and convert like a 4 minute WAV file to a 5 second WAV file parts. I have got some WAV files that are like 4 minutes long of sounds and what I want to do if it can be done is can I split and convert like a 4 minute WAV file into parts like 5 second WAV audio files parts. I can do this manual with AudaCity but doing this with like over 50 WAV 4 minute files would take ages to do I know that when you convert video files you can leave a software to convert a load of video files but this is audio files. and I want to split like a 4 minute WAV file into like 5 second wav files is there any software that will do this instead of doing this manual file by file. like is there a converter we’re you put in like how long you want your audio file to be and it splits it into parts I don’t know of any software that will do this only doing it manual with audacity one file at a time which does take ages to do any help will do.
+ Reply to Thread
Results 1 to 10 of 10
-
-
Something like:
Code:ffmpeg.exe -i input.wav -codec copy -f segment -segment_time 5 -reset_timestamps 1 "output%%03d.wav"
-
If you have a lot of files, create a batch file (.bat in the folder with the files). It will check the entire folder for wav files, cut each of them into 5-second fragments, and place them in separate folders.
Code:@echo off setlocal enabledelayedexpansion for %%f in (*.wav) do ( set "filename=%%~nf" mkdir "!filename!" 2>nul ffmpeg -i "%%f" -f segment -segment_time 5 -c copy "!filename!\!filename!_%%03d.wav" )
-
Hi LISTYDOM How DO I CREATE A BATCH FILE THEN I have got over a 100 WAV audio files how do I do that then
-
I just wanted to test the codes.
I could not get either the code or the .bat to work.
I need a better guide & I believe the OP does too. -
It seams to work, as was explained
-put ffmpeg.exe into windows PATH or into the folder where wav files are
-create bat file, by creating a txt file in notepad, paste that posted text and rename it to something.bat, put that bat into folder where those wav files are
-run that bat by double clicking it or right click it and press Run -
but I'd recommend to tweak ListyDoM script to just call a function instead of using enabledelayedexpansion, it is a good habit to call functions.
Code:@echo off for %%f in (*.wav) do call :split_wav_files "%%f" echo press any key to exit&pause>nul&exit :split_wav_files <some wav file which becomes %1 in this function> set "filename=%~n1" mkdir "%filename%" 2>nul ffmpeg -i "%~1" -f segment -segment_time 1 -c copy "%filename%\%filename%_%%03d.wav" goto :eof
-
@ _Al_,
The Code you posted worked fine.
I did change the -segment_time 1 to -segment_time 5 to get the 5 seconds the OP wanted.
The code or script ListyDoM did not work foe me. -
If there is "!" character in names, it does not work, if using enabledelayedexpansion, otherwise not sure what is going on.
Similar Threads
-
Question convert WAV files to vag files software needed
By barry25 in forum Software PlayingReplies: 1Last Post: 6th Feb 2025, 13:31 -
OpenShot won't play. wav file
By Ross Milburn in forum AudioReplies: 1Last Post: 19th Dec 2024, 03:07 -
trim a wav file by time stamp
By loninappleton in forum AudioReplies: 2Last Post: 23rd Jan 2023, 01:23 -
how to create a .wav file empty correspondant to a video-only file?
By marcorocchini in forum Newbie / General discussionsReplies: 19Last Post: 22nd Jul 2022, 15:11 -
How to convert WAV [PCM] to FLAC file?
By ConverterCrazy in forum Newbie / General discussionsReplies: 7Last Post: 14th Nov 2021, 10:19