Cousin’s wedding coming up, and obviously I got auto-assigned as the “music guy” for the Sangeet.
My mom sends me a list of songs, but not full tracks—very specific asks: “this line only”, “skip the intro”, “start from this hook”, “cut it before the boring part.” Pure chaos.
First instinct: download everything and trim in Audacity. Three hours later I’m still in the same loop—download video, import, scrub to the right second, trim, export, repeat. After the fourth song, sleep-deprived brain said “enough” and I swapped from manual labour to automation.
Wrote a small PowerShell + ffmpeg workflow to handle the whole pipeline: download, cut, convert. Two hours of scripting later, the remaining 17 songs were processed in roughly 2 minutes end-to-end. Way better trade-off than babysitting waveforms at 1 AM.
If this setup saved my sanity for one Sangeet, chances are someone else stuck with “music duty” can reuse it too.
Downloads audio from YouTube, trims exactly where you need, outputs MP3. Works for anything - music, podcasts, sound effects, whatever.
- Go to the GitHub repo
- Click the green "Code" button
- Click "Download ZIP"
- Extract it anywhere on your computer
git clone https://github.com:5h1Vm/Sangeet-Helper.git
cd Sangeet-Music-TrimmerOpen clip_jobs.csv in Notepad or Excel and add your songs:
url,start_time,duration,output_name
https://youtu.be/FtU0NuE6Y0Q,0:05,1:15,dil_se_bandhi
https://youtu.be/5nk8OgM0k-k,0:29,0:55,maine_payalEasy way: Double-click Run.bat
PowerShell way: Right-click in the folder → "Open PowerShell here" → type:
.\YT-MusicTrimmer.ps1First run takes 2-3 minutes (downloads ffmpeg and yt-dlp). After that it's instant.
Your trimmed MP3s are in the Music folder. Copy them to your phone/USB and you're done.
Just copy the timestamp from YouTube. Seriously, that's all.
- url = YouTube link
- start_time = Where to start (copy from YouTube: 0:05, 1:30, whatever)
- duration = How long the clip (0:45, 1:15, etc)
- output_name = What to call the file
Open YouTube, pause where you want to start, note the time; and that's it!
Script asks if you want to clean up. Say yes (Y) and it deletes all the temporary stuff - downloads, tools, everything.
You're left with just a Music folder full of MP3s. Copy to USB, done.
Test before the event: Play each clip once. Make sure the timing is right before you're at the function.
Make backups: Copy the Music folder to your phone too. Just in case.
Labels matter: Name your files something you'll remember. "Kala_Chasma_Final_Final" is better than "song_5.mp3"
"Can't run scripts"
Set-ExecutionPolicy -Scope CurrentUser RemoteSignedVideo doesn't work: It's probably blocked or deleted. Find another version.
Timestamps wrong: Just copy what YouTube shows. Script handles it.
It's really slow: That's your internet, not the script.
YouTube gives you ~128kbps audio. This outputs 320kbps MP3 for compatibility, but you can't improve quality that wasn't there.
If you really want perfect quality, buy the songs from Spotify or iTunes.
- Windows 10/11
- PowerShell (you already have it)
- 100MB space
- Internet
8 songs took me 90 seconds. 20 songs probably 3-4 minutes. 50 songs maybe 10-12 minutes.
Depends on your internet mostly.
Personal use only. This is for your family function. Don't upload these clips to YouTube or sell them. Songs are copyrighted.
Use for your Sangeet, enjoy the function, don't redistribute. That's it.
Because I'd rather spend 2 hours writing code than 3 hours in Audacity at midnight.
If you're in the same situation, hopefully this saves you a few hours of your life.
MIT. Use it, break it, fix it, whatever.
Good luck with your Sangeet. Don't forget to backup your Music folder to your phone.
Peace Out ✌️