Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A set of scripts to auto-trim the start/end of podcasts Apps
With subscriptions to 100+ podcasts, I felt like I was wasting a lot of time fast forwarding through intro and outro music in each podcast. I figured since these sections were always a set length in each podcast, I could write some scripts to automatically trim these portions of the podcasts using the iTunes "Start time" and "Stop time" settings for each song. When these are set, and the songs are synced to your iPod, that iPod will honor these trimmed times, without having to create a new song.

This set of three scripts I wrote can be downloaded here (macosxhints.com mirror) and once unzipped, include a Read Me largely reproduced here. They are intended to set up automatic trimming of the beginning and end of any song, video, or podcast in your iTunes Library, to remove intro and outro music that you might not want to listen to.

To use these scripts:
  1. Place the scripts in the ~/Library/iTunes/Scripts folder so they show up in the iTunes script menu, or anywhere you can find them easily.
  2. Find a podcast (or other song or video), and play a representative entry from this "album" (collection of podcasts) to the point where you want it trimmed.
  3. Hit pause
  4. Run the "Trim podcast" script. It will ask you if you want to trim off the beginning or end of the podcast, but it tries to be smart about which one you intend, i.e. if the podcast is paused in the first half of the duration, it assumes the start, otherwise it assumes the end.
  5. The script will then go through and trim by the same amount and uncheck the "skip when shuffling" checkbox (see note below) all the podcasts in the same album (see same note below), and remember the trim time for that podcast "album." Unchecking "Skip when shuffling" is necessary due to a bug in iPod firmware 1.1 through 1.1.2 that doesn't include podcasts when "shuffle songs" setting is turned on, even if they are the only thing in a playlist. The end trim is relative, i.e. if you have paused it 10 seconds before the end of a particular podcast that is 2 minutes long, it will trim 10 seconds off the end of all podcasts in the same "album" regardless of how long they are, rather than making them all end at 1:50.
  6. If you set up a trim that you didn't really want, run the "Trim remove podcasts" script and it will give you a list of all the beginning and end trims you've set up so far. You can select one or many and hit "Remove" and they will be taken off the automatic list. The beginning and ending trim are listed separately for each podcast, as not ever podcast has both.
  7. Once you have all the podcast trims you want set up, create a mechanism to run the "Trim all podcasts" on a regular basis, e.g. once a day at 4 AM, using cron or iCal (alarm set to "Open File", not "Run script," as the latter doesn't recognize script applications). This will then go through after any new podcasts have been added to iTunes, and trim them each accordingly to their "album" name.
I hope this is useful to you. Please modify to make more useful, just leave the credit to me in the revised version.

Note: Including all the songs in the same album and unchecking "Skip when shuffling" is automatic for the script as is, but this behavior can be modified in the beginning of the "Trim podcast" script as follows:

property shuffle_default : true Set this to false if you want it to ask you to before turning on the "include in shuffle" bit.
property all_default : true Set this to false if you want it to ask you to before applying this change to all songs and podcasts with the same album name.

Open this script in Script Editor and set these to false instead of true, and it will give you a dialog box asking you if you want to do these things. Save the script and run it again. Make sure to do this before setting up a bunch of trims with the script, because they will all be erased from the settings when the script is recompiled or saved!
    •    
  • Currently 1.60 / 5
  You rated: 2 / 5 (5 votes cast)
 
[14,138 views]  

A set of scripts to auto-trim the start/end of podcasts | 1 comments | Create New Account
Click here to return to the 'A set of scripts to auto-trim the start/end of podcasts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A set of scripts to auto-trim the start/end of podcasts
Authored by: DougAdams on Feb 09, '07 08:01:38AM
Nice work!

Batch Trim Start or Stop Time (Seconds), Copy From Start to Stop, and Player Position to Start or Stop may also be helpful in this regard.

---
Doug's AppleScripts for iTunes
http://www.dougscripts.com/itunes/

[ Reply to This | # ]