Edit
Attach
Printable
topic end
<!-- * Set TOPICTITLE = #define private public - Claus Brod on stuff (22 Apr 2009) --> <style type="text/css"> pre {background-color:#ffeecc;} </style> %STARTINCLUDE% <a name="22"></a> ---+++ [[DefinePrivatePublic20090422SpeedingThroughTheCrisis][Speeding through the crisis]] (22 Apr 2009) <summary> That darn ol' MP3 player. Five years old, but still looks cute. Stubbornly refuses to break, too, so no excuse to go out and buy a new one. Which, of course, I wouldn't do anyway these days. You know, the <i>crisis</i> and all - who has the guts to make investments like this now. I mean, a new player could easily cost me as much as <i>30 euros</i>! ;-) </crisis> So I'm sticking to the old hardware, and it works great, except for one thing: It cannot set bookmarks. Sure, it remembers which file I was playing most recently, but it doesn't know where I was within that file. Without bookmarks, resuming to listen to that podcast of 40 minutes length which I started into the other day is an awkward, painstakingly slow and daunting task. But then, those years at university studying computer science needed to finally amortize themselves anyway, and so I set out to look for a software solution! The idea was to preprocess podcasts as follows: * Split podcasts into five-minute chunks. This way, I can easily resume from where I left off without a lot of hassle. * While I'm at it, speed up the podcast by 15%. Most podcasts have more than enough verbal fluff and uhms and pauses in them, so listening to them in their original speed is, in fact, a waste of time. Of course, I don't want all my podcasts to sound like Mickey Mouse cartoons, of course, so I need to preserve the original pitch. * Most of the time, I listen to technical podcasts over el-cheapo headphones in noisy environments like commuter trains, so I don't need no steenkin' 320kbps bitrates, thank you very much. * And the whole thing needs to run from the command line so that I can process podcasts in batches. I found it surprisingly difficult to find the single right tool for the purpose, so after experimenting for a while, I wrote the following <tt>bash</tt> script which does the job. <pre> #! /bin/bash # # Hacked by Claus Brod, # http://www.clausbrod.de/Blog/DefinePrivatePublic20090422SpeedingThroughTheCrisis # # prepare podcast for mp3 player: # - speed up by 15% # - split into small chunks of 5 minutes each # - recode in low bitrate # # requires: # - lame # - soundstretch # - mp3splt if [ $# -ne 1 ] then echo Usage: $0 mp3file >&2 exit 2 fi bn=`basename "$1"` bn="${bn%.*}" lame --priority 0 -S --decode "$1" - | \ soundstretch stdin stdout -tempo=15 | \ lame --priority 0 -S --vbr-new -V 9 - temp.mp3 mp3splt -q -f -t 05.00 -o "${bn}_@n" temp.mp3 rm temp.mp3 </pre> The script uses [[http://lame.sourceforge.net/][lame]], [[http://www.surina.net/soundtouch/soundstretch.html][soundstretch]] and [[http://mp3splt.sourceforge.net/][mp3splt]] for the job, so you'll have to download and install those packages first. On Windows, =lame.exe=, =soundstretch.exe= and =mp3splt.exe= also need to be accessible through =PATH=. The script is, of course, absurdly _lame_ with all its hardcoded filenames and parameters and all, and it works for MP3 files only - but it does the job for me, and hopefully it's useful to someone out there as well. Enjoy! <!-- TBD: Try sox, http://sox.sourceforge.net/Main/HomePage TBD: Review http://wiki.gpodder.org/wiki/Time_stretching TBD: Review http://www.hackerpublicradio.org/eps.php?id=0185 --> --- %STOPINCLUDE% %COMMENT{type="below" nonotify="on"}% ---
to top
End of topic
Skip to action links
|
Back to top
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
Refresh
|
More topic actions
Revisions: | r1.3 |
>
|
r1.2
|
>
|
r1.1
|
Total page history
|
Backlinks
You are here:
Blog
>
DefinePrivatePublic20090422SpeedingThroughTheCrisis
r1.3 - 28 Apr 2009 - 06:07 -
ClausBrod
to top
Blog
This site
2017
:
12
-
11
-
10
2016
:
10
-
7
-
3
2015
:
11
-
10
-
9
-
4
-
1
2014
:
5
2013
:
9
-
8
-
7
-
6
-
5
2012
:
2
-
10
2011
:
1
-
8
-
9
-
10
-
12
2010
:
11
-
10
-
9
-
4
2009
:
11
-
9
-
8
-
7
-
6
-
5
-
4
-
3
2008
:
5
-
4
-
3
-
1
2007:
12
-
8
-
7
-
6
-
5
-
4
-
3
-
1
2006:
4
-
3
-
2
-
1
2005:
12
-
6
-
5
-
4
2004:
12
-
11
-
10
C++
CoCreate Modeling
COM & .NET
Java
Mac
Lisp
OpenSource
Scripting
Windows
Stuff
Changes
Index
Search
Maintenance
Impressum
Datenschutzerklärung
Home
Webs
Atari
Blog
Claus
CoCreateModeling
Klassentreffen
Main
Sandbox
Sommelier
TWiki
Xplm
Jump:
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback