Stereo Tool
https://forums.stereotool.com/

Please help with using Stereotool in Subsonic
https://forums.stereotool.com/viewtopic.php?f=4&t=3679
Page 1 of 2

Author:  DJC [ Thu May 12, 2011 4:49 am ]
Post subject:  Please help with using Stereotool in Subsonic

Hi everyone,

Some weeks ago I came across this amazing software called Subsonic that allows you to stream from your PC all your music in whatever format you like (you can access individual songs, run playlists, etc.). Then I came across this other amazing software called I-sub, that allows to capture that stream in your Iphone, over wifi or even 3G (it works perfect, almost no interruptions whatsoever, with all the quality that your net can give). So finally it seems that I can get around listening to my music (+400 GB of FLAC) in my Iphone processed in real time by Stereotool. Or not?

The developer of I-sub very kindly suggested that using the command line version of Stereotool I could process my FLAC files before streaming, since Subsonic does transcoding (to MP3) just before sending it to the web. Subsonic is an open source development, ran almost solely by one person, so it's basic settings are pretty straight forward, but the transcoding process is a bit difficult for me.

Questions:

1. Has anyone tried this? If so, how is it done?
2. Is command line version suitable for this purpose? If so, how should I insert it?

The recommended lines given to me are the following (for MP3):

mp3 > mp3
mp3
mp3
ffmpeg -i %s -f wav -
stereo_tool_cmd - - C:\the\full\path\to\your\settings.sts
lame -b %b - -

From the Subsonic website:

Transcoding is the process of converting music from one format to another. Subsonic's transcoding engine allows for streaming of media that would normally not be streamable, for instance lossless formats, such as the ones you'll hear on your iPhone 4 via iTunes or high-quality rips from CDs. The transcoding is performed on-the-fly and doesn't require any disk usage.

The actual transcoding is done by third-party command line programs which are installed in:

Windows c:\subsonic\transcode
Mac /Library/Application Support/Subsonic/transcode
Linux /var/subsonic/transcode

Up to three transcoders can be chained together. For instance, to convert FLAC to MP3 you would typically use a FLAC decoder which converts to WAV, and chain it with a WAV to MP3 encoder.

Recommended configuration

The recommended settings for audio transcoding is:

Step 1 ffmpeg -i %s -f wav -
Step 2 lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -

The recommended settings for video transcoding is:

Step 1 ffmpeg -ss %o -i %s -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -

Note that "%s" is substituted with the path of the original file at run-time, and "%b" is substituted with the max bitrate of the player. "%t", "%a" and "%l" are substituted with the song's title, artist and album.

Adding custom transcoders

You can add your own custom transcoder given that it fulfills the following requirements:
» It must have a command line interface.
» It must be able to send output to stdout.
» If used in transcoding step 2 or 3, it must be able to read input from stdin.


Any hints would be very appreciated.

Regards,

Daniel

Author:  hvz [ Thu May 12, 2011 10:44 am ]
Post subject:  Re: Please help with using Stereotool in Subsonic

Hi Daniel,

Looks like the suggestion you got should do it. Just add the stereo_tool_cmd - - C:\path\to\your\settings.sts between the decoding (ffmpeg) and encoding (lame) steps.

Sounds interesting - I was thinking about making an Android or iPhone version of Stereo Tool - but I really don't know when I'll have time for that.

Author:  DJC [ Thu May 12, 2011 3:20 pm ]
Post subject:  Re: Please help with using Stereotool in Subsonic

It does not work. All I'm doing is inserting the stereotool command line suggested as a second step, between the other two. Something must be missing cause the subsonic client reports that no round is arriving. Is there a way to test the chain out of Subsonic? Sorry to bother you, but the Subsonic forum has not been too responsive.

Author:  hvz [ Thu May 12, 2011 3:39 pm ]
Post subject:  Re: Please help with using Stereotool in Subsonic

You could try piping the three. So:

[quote]
ffmpeg -i %s -f wav -
stereo_tool_cmd - - C:\the\full\path\to\your\settings.sts
lame -b %b - -
[quote]

ffmpeg -i inputfile.flac -f wav - | stereo_tool_cmd - - C:\the\full\path\to\your\settings.sts | lame -b %b - outputfile.mp3

This should result in a valid, processed, MP3 file.

Author:  DJC [ Thu May 12, 2011 6:32 pm ]
Post subject:  Re: Please help with using Stereotool in Subsonic

Sorry for the silly question, but I really know nothing about command lines: where exactly shall I type

"ffmpeg -i inputfile.flac -f wav - | stereo_tool_cmd - - C:\the\full\path\to\your\settings.sts | lame -b %b - outputfile.mp3"

In a DOS window? (I'm in Windows 7)

Author:  DJC [ Fri May 13, 2011 4:13 am ]
Post subject:  Re: Please help with using Stereotool in Subsonic

Ok, after some time, I could get ffmpeg to convert a FLAC to an MP3 :oops: . This is the command I had to use in Windows 7:

C:\subsonic\transcode\ffmpeg -i "F:\MUSIC\FLAC\4 Non Blondes\1992 - Bigger, Better, Faster, More!\03. What's Up.flac" -f wav - | C:\subsonic\transcode\lame -b %b -> "C:\Users\DJC\Desktop\PRUEBA ST CMD\output.mp3"

Then I inserted stereotool, in the following way (I am trying to follow your line):

C:\>C:\subsonic\transcode\ffmpeg -i "F:\MUSIC\FLAC\4 Non Blondes\1992 - Bigger, Better, Faster, More!\03. What's Up.flac" -f wav - | C:\subsonic\transcode\stereo_tool_cmd - - "C:\Users\DJC\Music\Stereotool Presets\ExtremeForTestIsub.sts" | C:\subsonic\transcode\lame -b %b -> "C:\Users\DJC\Desktop\PRUEBA ST CMD\output.m
p3"

But I get the following error:

aError: Stereo Tool takes only 2 file names as arguments.
Input file name: -
Output file name: -
Don't know what to do with 3rd file name: C:\Users\DJC\Music\Stereotool Presets\
ExtremeForTestIsub.sts

What does this error means?

Author:  hvz [ Fri May 13, 2011 12:51 pm ]
Post subject:  Re: Please help with using Stereotool in Subsonic

Ah! My bad!

I apparently completely forgot to update the download page. The command line interface has changed some time ago (I updated it when I created the Linux version).

Usage is now:
stereo_tool_cmd - - -s "C:\Users\DJC\Music\Stereotool Presets\ExtremeForTestIsub.sts"

Type stereo_tool_cmd -h (or --help) at the command line to see the parameters. You can now for example directly load presets at the command line:

List of all generic presets: stereo_tool_cmd.exe -p "GENERIC PRESETS"
Processing using specific preset: stereo_tool_cmd.exe - - -p "GENERIC PRESETS/Constant volume, increased stereo"

To allow for changes like that, I had to change the interface to specify the STS file.

Author:  DJC [ Fri May 13, 2011 3:30 pm ]
Post subject:  Re: Please help with using Stereotool in Subsonic

Perfect! Works as a command prompt in Windows. Now I'll try it on Subsonic.

Author:  DJC [ Fri May 13, 2011 4:03 pm ]
Post subject:  Re: Please help with using Stereotool in Subsonic

WORKS PERFECT!!! THANKS A LOT!!! EVERYBOY SHOULD KNOW THIS!!!

Author:  eurodancetest [ Mon Sep 22, 2014 9:24 pm ]
Post subject:  Re: Please help with using Stereotool in Subsonic

Sorry for bringing this up but I can't really figure out how to setup the server to process the songs before sending it to the phones.
Here is the default configuration:
Image

I've tried adding Stereo tool as per the instructions above in step 2 but this way it doesn't work.
(this in step 1)
Code:
ffmpeg -i %s -f wav - | C:\subsonic\transcode\stereo_tool_cmd - - -s C:\subsonic\transcode\preset.sts -k <key> | C:\subsonic\transcode\lame -b %b - -
Any suggestions?

Page 1 of 2 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/