Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Sangeet Helper

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.

What this does

Downloads audio from YouTube, trims exactly where you need, outputs MP3. Works for anything - music, podcasts, sound effects, whatever.

How to get this

Option 1: Download ZIP (Easiest)

  1. Go to the GitHub repo
  2. Click the green "Code" button
  3. Click "Download ZIP"
  4. Extract it anywhere on your computer

Option 2: Git Clone (If you have Git)

git clone https://github.com:5h1Vm/Sangeet-Helper.git
cd Sangeet-Music-Trimmer

How to use it

Step 1: Create your song list

Open 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_payal

Step 2: Run the script

Easy way: Double-click Run.bat

PowerShell way: Right-click in the folder → "Open PowerShell here" → type:

.\YT-MusicTrimmer.ps1

First run takes 2-3 minutes (downloads ffmpeg and yt-dlp). After that it's instant.

Step 3: Get your music

Your trimmed MP3s are in the Music folder. Copy them to your phone/USB and you're done.

CSV format

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

Finding timestamps

Open YouTube, pause where you want to start, note the time; and that's it!

When it finishes

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.

Tips

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"

Troubleshooting

"Can't run scripts"

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

Video 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.

Quality

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.

What you need

  • Windows 10/11
  • PowerShell (you already have it)
  • 100MB space
  • Internet

Speed

8 songs took me 90 seconds. 20 songs probably 3-4 minutes. 50 songs maybe 10-12 minutes.

Depends on your internet mostly.

Legal stuff

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.

Why I made this

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.

License

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 ✌️

About

Batch YouTube audio trimmer. Download and trim any YouTube video to exact timestamps. Auto-installs dependencies, outputs 320kbps MP3, auto-cleanup. PowerShell script - zero manual setup needed.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages