| «« Keeping Unused Fields Around | Removable Media »» |
|
About
I'm Ryan Lowe, a Software Engineering graduate living in Ottawa, Canada. I like agile software development and Ruby on Rails.
I write this blog in Canadian English and don't use a spell checker. Typos happen.
Projects
» Full-time Ruby on Rails freelancer
» Full-time with Rails since May 2005 » Former committer for RadRails (now Aptana) » I also have a few Rails side-projects in development: 1. wheretogoinTO.com Toronto nightlife 2. Hey Heads Up! TODO list and sharing 3. Layered Genealogy family history research 4. foos for foosball scoring 5. fanconcert for music fans (on hold) Hiring Rails developers? I can telecommute by the hour from Ottawa, Canada »» Email: rails AT ryanlowe DOT ca
BulletBlog
Now hosted on Hey! Heads Up -- check it out!
Syndication
Pings
Recent
Derek Lowe's (Ryan's older brother) words at Ryan's funeral
blog@ryanlowe.ca no more Forging Email Headers: Good, Bad or Ugly? Sarcastic Dictionary (Part 1 of Many) Tags Hierarchies Twisting Rails is Risky Business Risky Business? My Take on Early Alphas Whoa, it's August 2007 Closing Comments A Postscript to "Growth at the grassroots" »» All Blog Posts
Linkage
del.icio.us/ryanlowe
technorati/ryanlowe.ca/blog Aurora Roy Jim Andrew Trasker Travis Kibbee Karen Dr. Unk Ayana Van Bloggers Joel Spolsky Robert Scoble Tim Bray Dave Winer Raymond Chen James Robertson Ruby/Rails Bloggers rubyonrails.org weblog David Heinemeier Hansson Dave Thomas James Duncan Davidson Mike Clark Jamis Buck Signal vs. Noise Tobias Luetke Amy Hoy: (24)slash7 Jeremy Voorhis Eclipse Bloggers Planet Eclipse EclipseZone Luis de la Rosa Eclipse Foundation Kim Horne Billy Biggs Ian Skerrett Mike Milinkovich Bjorn Freeman-Benson Denis Roy
Archives
|
Getting Ahead of MP3
To make testing files for AudioMan, often I only need the first 20k or so of a 5MB file. So I transfer the file to my Mac and use the command: head -n 50 file.mp3 > clip.mp3 The Unix utility head is used to send an arbitrary number of lines of a text file to stdout, so it counts 50 end of line characters into the original file and (after redirecting stdout it) outputs the result into clip.mp3. Odds are the original file will have bytes that are the same as end of line characters, so all you have to do is adjust the -n number to get the output file size you want. Then you get the head of the mp3 file without modifying it. I originally tried tools like mp3splt to get the start of an audio file but it modified the tag of the output file. So it wasn't much use to me when I wanted to keep iTunes tags, for instance. Posted at February 27, 2004 at 05:37 PM ESTLast updated February 27, 2004 at 05:37 PM EST Comments
Instead of always copying the file to your Mac, you could install Cygwin on your PC, that should allow you to run basic Unix commands. » Posted by: Patrick Ritchie at February 28, 2004 12:35 AMYa, I use that at uhh, NOT work... and it works great. My question about this is are you reattaching the id3v1 tags (since they are at the end of the file), or are you just dropping them? If you want to keep them, you'd probably just have to figure out how to keep the last 128 bytes and append it to your clip. » Posted by: Jim at February 28, 2004 09:57 AMYes, I am dropping the id3v1 tag. I'm not using these files to test conflict resolution between id3v1 and id3v2 yet. However, when I want to do that I can just use the Unix "tail" command the same way as "head" and then "cat" the head and the tail together to make a complete file. » Posted by: Ryan at February 28, 2004 10:11 AM |