File Writer output plugin for Winamp 2/5
Up | Previous | Next | Down
NOTE: This plugin is no longer being developed, I AM most certainly still available for questions, suggestions and specific requests though.
The source code is also available to any one who asks.
I created this plugin to make it possible to give files date and time stamps in their filenames, now I have made a file writer plugin with multiple file format support that is quite powerful and extensible (by me that is :).
At the moment it will let you specify a directory to write files in, it will let you choose between the raw, ape, flac, mp3, ogg and wave file formats and it supports three different modes for creating a filename:
- Simply use the title
- Simply uses the title as a filename
- Use the title and expand it
- Uses the title but expands some variables similar to the title option of my LineIn plugin (the syntax has changed in v1.20 and is now very similar to the syntax used by Foobar2000 and some Winamp input plugins)
- Use the following expandable string to create the filename
- This enables you to specify an expandable string which is used to create the filename (usefull with a setting like: %_title% - on %_current_date_long%), you should use at least %_title% (unexpanded title), %_expanded_title% (expanded title) or %_playlist_number% (playlist index, use the $fpad function to pad the playlist number with zeroes) with that option.
Also note you can specify relative paths by simply putting backslashes in the expandable string for the filename. See the Expandlib help in the configuration dialog of the plugin for an overview of all the things you can use in the expandable strings. Some of the things you can use (besides the ones mentioned above) are:
- the current username (%_user_name%)
- the computername (%_computer_name%)
- the number of tracks in the playlist (%_playlist_length%)
- all kinds of metadata (see the ExpandLib help in the configuration dialog of the plugin)
- functions that operate on strings (like $fpad to pad a string, see the ExpandLib help in the configuration dialog of the plugin)
For some formats/functions to be available you need seperate dlls or commandline utilities, I have not included them in the standard distributable because they are relatively large and probably not everybody needs everything anyway, so if you want them you should go to the site of the format and download them:
- MP3 (LAME): LAME site, NOTE: this site only has the source available, see the FAQ for info on getting a binary (if you don't want to compile it yourself), you need either lame_enc.dll or lame.exe.
- Ogg Vorbis: Ogg Vorbis site (you need the sdk), alternatively (recommended) you can download them from RareWares, you need either the Ogg Vorbis dll's (ogg.dll, vorbis.dll and vorbisenc.dll) or OggEnc (oggenc.exe or oggenc2.exe).
- Tag: RareWares, this is needed if you want to write tags to the files you write with my plugin (of course you can always add tags later).
If you are unable to find what you want, just mail me.
Any input / comments / real-life results are immensely appreciated.
The latest version is 1.21b (uploaded on January 21, 2005).
To download please click on the link:
- File Writer output plugin v1.21b (233 KB) Readme (15 KB)
- NOTE: If you used to use %_current_time...% or %_current_date...% in an expandable string with my plugin, this new version of 1.21 will restore the old behaviour of these variables (while preserving the new behaviour if you use parts). Version 1.21b makes tagging work again.
Quite a few bugs have been fixed and a lot of things have been improved. There are also some new features, but these are mostly invisible to the common user (they need registry changes because I haven't made a GUI for these settings, yet).
Previous release notes: This release has seen a lot of bugfixes, new features and enhancements of old features. The most notable changes are support for very large files, the Tag commandline utility and the new expandlib, the latter made it possible for me to implement better support for commandline utilities and some other very nice features. Take some time to get used to the possibilities of the plugin (for example: I have added commandline templates for the commandline utilities and both these as well as the original commandline options are expandable strings now).
If you are using my plugin, this is basically a must-have version, it is about twice as big as previous versions but also has a lot more to offer.
NOTE: If you used a previous version of my plugin this version will automatically update any old settings to a new format if needed (it will convert traditional expandable strings to the new format for example).
If you have any questions, just mail me.
I also have a mailinglist (for updates and so on). To join it, just mail me (don't forget to mention you want to join the File Writer mailinglist). But before you ask anything, check out the FAQ first.
Current features:
- Lets you specify an output directory (as well as a relative directory per file by using backslashes in the expandable string for the filename)
- Has support for three different filename modes (including expanding like with the title option of my LineIn plugin)
- Supports .mp3, .ogg, .ape, .flac, .wav and .pcm file writing
- Can use the Tag commandline utility to tag the written files
- Works on Windows 9x/ME, NT, 2000 and XP
Known bugs:
- v1.20 can crash when using the Ogg Vorbis dll's (fixed in v1.21)
- v1.20 might behave badly when using a commandline encoder under Windows 95/98/ME, it will work fine under Windows NT/2000/XP
- There is a known problem when used in combination with Tara's RealAudio input plugin (might also affect other RealAudio plugins, but with this one it has been thoroughly verified), which will cause Winamp to hang. I'm still unsure of the cause, although I do know what code is causing the problem (and I have posted on their forum some time ago, but I'm afraid nothing much came out of this).
Version history:
- v1.21b (January 21, 2005):
- fixed problems with size log only mode (some checks were the wrong way around)
v1.21a (January 21, 2005):
- made _current_time/_current_date work again when not using parts/triggers, _current now contains exactly the same time/date as _begin when not using parts or, if you are using parts, when writing the first part
- fixed crash when OpenFile didn't succeed
v1.21 (December 27, 2004):
- added triggers (useful for splitting up a file into multiple parts, but no GUI yet, so mail me if you want to use it)
- made trigger for maximum time in one file
- added support for only counting the total file size (SizeLogFile and SizeLogMode registry settings)
- added a default settings button for each config screen (except the main one)
- gave fileformats identifiers, just like tagsystems
- added tooltips in the configuration dialogs
- added CloseHandle's for the process and thread that is created when using commandline tools, without this the process would remain in memory
- made the commandline encoder functionality compatible with Windows 95/98/ME (it now uses a separate thread)
- some improvements to the stopping mechanism, should result in cleaner stops when problems occur
- improved error checking in some areas (during writing for example)
- made some improvements to the messagebox code, it now correctly uses the systemwide font defined for messages, and the Unicode conversions have been improved somewhat
- switched to a newer version of the Monkey's Audio SDK (3.99)
- moved the SendMessage calls in Open to an as late as possible point in a not very successfull attempt to do something about the hangs in combination with Tara's RealAudio input plugin
- made the expand code handle parentheses better than it used to (something like this: [(%hello%)] used to cause trouble)
- fixed the Ogg Vorbis (from dll) format (it doesn't crash anymore), it now only uses ogg.dll and vorbis.dll
- fixed and improved the configuration dialog (and configuration handling) of the LAME (from dll) format, it now properly stores and handles VBR/ABR settings
- fixed a bug in the registry helper functions that would cause settings of formats to not be stored and read correctly
v1.20 (November 23, 2003):
- implemented support for the new expand lib
- made it possible to use paths in the filename (by putting a backslash in the expand string)
- added support for tags (through using the commandline Tag utility)
- the commandline formats are now able to use expandable strings (and they now make use of a user-defined template along with, partial, commandlines)
- the plugin can now pipe the output data of a commandline encoder to a file itself, possibly circumventing any problems the commandline encoder might have with this (filename problems, file size problems, etc.)
- made GetWrittenTime return a nicer value when dealing with extreme playing times
- Ogg Vorbis writing now supports 8, 16, 24 and 32 bits per sample (used to be just 16)
- FLAC, Ogg Vorbis, MP3 and RAW writing now support very large files (larger than 2-4GB), and WAV has a check that makes sure this boundary isn't crossed (Monkey's Audio doesn't have this, as I think it might be able to support very large files, I'm just not sure)
- made LAME (from dll) and Ogg Vorbis (from dll) handle errors in the loading of the dll's better (LAME now makes a difference between having loaded the dll and having found all the imports, and Ogg Vorbis now checks wether it has found all the imports)
- let the config dialog always list all formats, but check wether they are enabled when closing the config dialog (optionally giving the user a choice to stay in the dialog and select a different format)
- added a lot of error checks (especially during writing, it used to check almost nothing during writing and now it checks almost everything it can check)
- some errors now look nicer (you don't get a flood of message boxes anymore)
- I now use custom-made message boxes, which I use to show message boxes with more descriptive text on the buttons (instead of "OK" they display "Continue loading" for example)
- made sure SetThreadPriority is called only once for each write session
- made formats check wether the necessary dll's are available whenever they might be needed in stead of just when the plugin is loaded (so you can now install the dll's while the plugin is loaded and use them immediately)
- made settings system more robust
- made the plugin check at startup wether this is a newer version and if so the plugin converts the settings to the current version
- the plugin now also checks for control characters in the filename and removes them (charactercodes < 32)
- fixed FLAC writing of 24bps files
- fixed Auto Extension option (it now works correctly when you disable it)
- cleaned build (it used two different versions of the same file, as well as an old boost version (1.30.0))
- tweaked priority of the write thread
- made sure my plugin will pad the data chunk of a wav file to a multiple of two bytes if necessary (it usually isn't)
v1.17(b) (July 13, 2003, (b/c) August 20, 2003):
- added support for lame.exe
- added support for oggenc.exe
- added support for FLAC
- (b) fixed the browse buttons in the newly added config dialogs
- (c) fixed anti-overwrite code (it used to simply ignore it in at least some cases)
v1.16(b) (April 18, 2003):
- increased the maximum buffer size, the old maximum wasn't high enough for some input plugins (which caused them to never start playing)
- fixed a bug in the Open code, it used to return the wrong value if an error occurred
v1.15 (March 21, 2003):
- added an option to disable automatically appending an extension to the output filename
- added an option to automatically overwrite the output file if it already exists
- added the variable %n# (where # is a number), which gives you the length of the playlist in tracks, padded with zeroes upto # digits
- fixed minor glitch in the Ogg Vorbis config dialog (the slider position would not be accurately calculated because of some strange floating-point issue)
- fixed the VBR/ABR radio buttons in the LAME config dialog
v1.14 (August 10, 2002):
- added support for Monkey's Audio
- made the plugin faster while still letting Winamp be responsive (it now changes the threadpriority instead of using Sleep(1))
- updated the LAME support (some new constants)
- made the error box look a little nicer
- added two variables for the filename (%ur and %cr)
- fixed some things in the config dialog (tab order and some fields didn't initialize correctly)
- changed some char*'s to string's
v1.13 (May 6, 2002):
- improved the support for filenaming (modified the add expandable string option to be: use expandable string, where one of the variables is the (un-)expanded title)
- added the variable %p# (where # is a number), which gives you the playlist position, padded with zeroes upto # digits
- made winamp much more responsive during writing (by using Sleep(1))
- nicer error message if the plugin hasn't been configured yet
v1.12 (April 13, 2002):
- fixed a bug in the wav writer that made a wav file look 44 bytes too large
- fixed a minor bug in the config dialog (the config button for formats wasn't grayed when you entered the dialog with wav or raw as the default format)
v1.11 (February 18, 2002):
- added support for Ogg Vorbis (see http://www.vorbis.com/)
- made lame optional (it will simply not show the mp3 possibility if lame is not installed), the same goes for Ogg Vorbis
- made the config button gray when format has no config
- moved the browse button a little bit
- made the combobox handle absent formats in a nice way
- fixed a minor bug in the lame (and ogg) config dialog (it wouldn't do enablewindow on wm_destroy)
v1.10 (January 10, 2002):
- added support for MP3 (through LAME)
- added a browse button for directory selection
- changed the style of the comboboxes (they are now drop lists)
v1.00 (January 3, 2002):
- it plays
- raw and wave support
- just title, expanded title and just title + expanded string filename support
- creates valid filenames
- lets you specify an output directory
Up | Previous | Next | Down
To contact me, please mail to: th.v.d.gronde@hccnet.nl
I hope you'll enjoy my program(s).