Old 26th October 2012, 03:17   #1
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,009
Send a message via Skype™ to thinktink
3rd party developer MP3 encoding licensing

Finally after getting one of the public sample rate converters compiled I'm currently working on a custom in-house project that I may or may not release to the public. It's a custom disk writer output plugin that deploys a better re-sampling algorithm than the official one from Nullsoft (going from 48k mono to 44.1k stereo sounds heavily distorted from the Nullsoft Disk Writer plugin.) I finished writing WAV format output and am currently working on issues with the lame_enc.dll mp3 output. I don't know if I got that dll from the Winamp installer itself or from an older version of the SHOUTcast DSP or maybe even a 3rd party plugin. I just know it's there with no action on my own.

I also understand that MP3 encoding is not free. You have to have a license to encode to MP3. I will not be distributing the DLL obviously. However, I am concerned that if I keep the mp3 encoding support in a potential public release of the plugin that I might get in trouble. Would I still be covered by Nullsoft's already current use (if any) of the lame_enc.dll support?

tia

P.S.
Can somebody point me in the correct direction for encoding to AAC?
thinktink is offline   Reply With Quote
Old 26th October 2012, 19:28   #2
sheh
Junior Member
 
Join Date: May 2004
Posts: 10
I think the Nero and Apple AAC encoders are considered the better ones, but this one's open source:
http://www.audiocoding.com/downloads.html
http://www.rarewares.org/aac-encoders.php
sheh is offline   Reply With Quote
Old 26th October 2012, 19:50   #3
DrO
 
Join Date: Sep 2003
Posts: 27,873
out_disk doesn't do the resampling itself, that's all done via the old ACM interfaces i.e. Win3.x stuff if memory serves me right. so yes it most likely is crap but i think out_disk can assumed to be dead as it's not been touched in years (nothing actually related to functionality).

if something is small enough then it is generally ignored / goes under the radar (it's only large projects that generally get the attention and so need to have to do licensing) so the best way is to leave the support in but don't ship lame_enc if it's that much of a concern, or just provide a link to where it can be obtained from if not already present (like from rarewares, etc). though it's very likely the Winamp install will have lame_enc present since it's shipped but not used unless it's a pro-version for encoding so is nothing stopping you from relying on that.

as for AAC encoding, i'd just use the enc_* encoder unless you really need to do things with external libraries (since the current one using FhG's libraries was tested on a HydrogenAudio test and found to be better than the CodingTech one). but choice is yours though AAC needs licensing as well though using the enc_* should generally cover you under Winamp's license for it (hence it not being restricted to a pro-only encoder).

-daz
DrO is offline   Reply With Quote
Old 27th October 2012, 00:38   #4
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,009
Send a message via Skype™ to thinktink
Awesome news. Thanks.
thinktink is offline   Reply With Quote
Old 27th October 2012, 18:05   #5
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,009
Send a message via Skype™ to thinktink
So I was finally able to figure out how to get all of the encoders to encode most of the data and outchuck the data into a file. However, I'm not getting all of the data unless I throw a crapton of empty buffers into the encode function (which then introduces a crapton of silence at the end of the file.) I'm calling PrepareToFinish (when available) and FinishAudio3(W) after closing the output file handle but it's not flushing the remaining encoded data. What do I do to get the remaining data?

Also, is there another way to determine what the file extensions of the resulting output file should be from the encoders themselves? I've tried using the FOURCC data type and it mostly works correctly but not always. The SHOUTcast encoder gives me ADTS (not so much a big deal) and the wave encoder gives me ACM (which is fine for GoldWave and some other audio editing programs but not for Winamp apparently.) At the moment what I'm doing is everything in the FOURCC that is not uppercase or a number I discard and then change it to lowercase. Works fine for the MP3 encoder, the WMA encoder, the FLAC encoder, the Ogg Vorbis Encoder, and the MPEG-4 AAC Encoder, but not the two others I previously mentioned.


[EDIT/]
Nevermind about the remaining buffers stuff, figured it out with trial-and-error testing.
thinktink is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump