Prev Previous Post   Next Post Next
Old 8th December 2013, 05:20   #12
mjbrown
Senior Member
 
Join Date: Aug 2001
Posts: 114
Great news! All along, there was a workaround: pbelkner's in_ffsox, a.k.a. FFSoX Player. This input plug-in reads pretty much any type of audio (or video) file you want, and it can use SoX to convert the sample rate with high quality, producing whatever the SHOUTcast DSP needs.

I owe a huge thanks to pbelkner for his patience and willingness to help me get it working, especially after I kept prodding him to fix some issues with the title formatting, which mainly affect people who are not using Advanced Title Formatting. These fixes will hopefully be in the next release of the plug-in.

Here are some detailed instructions for those who need them:

1. Close Winamp and run the FFSoX Player plug-in installer. This will put in_ffsox.dll in your Winamp plugins folder, along with an in_ffsox folder which contains SoX, FFmpeg, and other supporting libraries.

Don't start Winamp yet.

2. Decide what audio file types you want in_ffsox to handle. At the very least, you want it to handle the file types that you expect to sometimes need resampling. FFmpeg can handle all the common formats except Windows Media, so to keep it simple, I suggest using it for every type of file you expect to have in your playlist except WMA. For me, that's FLAC, M4A (AAC in MP4 container), MP3, MP2, and Ogg Vorbis. Just in case, I'll also plan to use it for AIFF, APE, WV, and raw AAC, if I ever have any such files.

3. In the plugins folder, disable the extensions that normally handle those file types. This may not strictly be necessary, but it will ensure there are no conflicts. I prefer disabling them instead of uninstalling them through Winamp, so they won't be deleted, in case something goes wrong and you want to re-enable them.

To disable them, just rename them to have something other than a .dll extension. In my case, there are four files to rename:
  • in_flac.dll → in_flac.dll.DISABLED
  • in_mp3.dll → in_mp3.dll.DISABLED
  • in_mp4.dll → in_mp4.dll.DISABLED
  • in_wave.dll → in_wave.dll.DISABLED
(If you're doing this through Windows Explorer, you will need to have already disabled "Hide extensions for known file types" in the Folder Options.)

4. The plug-in ships with minimal FFmpeg libraries that don't support all formats (exactly which ones are supported, I don't know; why isn't this documented?).

Based on a comment earlier in this thread, in order read MP3 and some of the other formats, you probably need to replace the DLLs with more robust versions. There's a link to the 32-bit Zeranoe builds on the FFSox Player homepage; follow the instructions to replace the relevant DLLs in the in_ffsox folder.

5. Start Winamp. Go to Preferences > Plug-ins > Input, and go into the FFSoX Player configuration.

In the General tab, make the Extensions list match the file types you decided upon in step 2. In my case, it's
code:
WAV;AIFF;AIF;FLAC;APE;WV;AAC;M4A;MP4;MP3;MP2;MP1;OGG;

In the Audio tab, in the SoX section, set the following:

Mode: Automatic
Sample Rate: 44100 Hz Very High Minimum Multiple

It's important to make sure Minimum and Multiple are unchecked.

That should be all you need, although I recommend also disabling ReplayGain in the plug-in, so that Winamp's ReplayGain will still be used.

6. Make sure it's working. Load your playlist, go to a file with a non-44.1 KHz sample rate, and look at the File Info (Alt+3). You should see something like this, if it's a 48 KHz MP3:
Decoder: FFmpeg
Length: 2:14
Audio codec: mp3float
Bitrate: 192 kb/s
Bits per Sample (in): 32
Sample Rate (in): 48000 Hz
Bits per Sample (out): 16
Sample Rate (out): 44100 Hz
Look for the text in bold. If it doesn't say FFmpeg, then a different input plug-in is handling the file. If it does say FFmpeg, then it will show the output sample rate, which should be 44100. This is what becomes the input to the SHOUTcast DSP.

That's it! Your stream should sound great, with no more "fuzzy" sound from the bad resampling.
mjbrown is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Tags
sample rate conversion, src

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