Sat, 03/29/2008 - 16:29
So just yesterday I’ve published a bash script which rips the audio stream of Flash Videos (
*.flv) to mp3 format. It’s nice, fast and imo all-purpose. But I didn’t like the audio quality. Thus below you can find a second version of the script which is using
lame instead of
ffmpeg. Usage and behaviour should be pretty much the same. Only the audio quality should be better on cost of a bit more computing.
Since it relies on the fact that the input
*.flv video already uses MP3 encoding for its audio stream this might not work for every flash file! Youtube works just fine though. You can find the script after the break, it’s also attached below. For usage / installation / more information read the old article.
If you wonder why I reencode the audiodump with lame: The dumped mp3 file is considered by most (all?) audio players to be ~10x the length. A five minute video gets a 45 minute audio dumpfile. It plays fine but seeking is a mess. Reencoding fixes this. If you know an alternative which does not require reencoding or is generally faster - please drop a comment!
Fri, 03/28/2008 - 00:03
UPDATE: Also check out mp3dump part 2
On some undefined occasion you might want to dump the audio stream of a flash file. This is how you do it:
- Get the
*.flv, e.g. visit youtube with Konqueror and check
/tmpfor a file like
FlashV5SQLt- this is your FLV.
- Install some dependencies:
ecasoundare optional but strongly recommended.
- Download the script below (it’s attached!) and save it inside your
$PATH, remember how you’ve called it!
I’ve saved the script inside
~/.binwhich is inside my
$PATHso all I have to do now is running it:
mp3dump FlashV5SQLt "Foo Bar" "All Your Base Are Belong To Us"
This would rip the audio stream of
FlashV5SQLtto a file named
Foo Bar - All Your Base Are Belong To Us.mp3- with emulated stereo sound and basic MP3 tags (artist and title). Coolio!