Skip to main content

Topic: Using foobar for Subsonic transcoding (Read 2722 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • gorman
  • [*][*]
Using foobar for Subsonic transcoding
Now that the iSub app for iOS supports gapless playback, but still lacks replaygain support, I'm wondering whether it would be possible to use foobar, from the commandline, to handle transcoding, using its processing capabilities to apply the desired gain (album in my case) to the converted files that get sent to the device (an iPhone) on 3G.

I'm currently using these steps for transcoding MP3s and FLACs to Ogg Vorbis (don't shiver for the mp3 transcoding, the source is pretty high bitrate and 3G data limits are unbearable otherwise).

FLAC

flac -d --totally-silent --decode-through-errors --stdout %s
followed by
oggenc2 -Q -q2 -t %t -a %a -l %l -

MP3

lame --silent --mp3input --decode -h %s -
followed by
oggenc2 -Q -q2 -t %t -a %a -l %l -

So my solution would be:

Install a dedicated, portable version of foobar2k. Invoke it through the commandline using the Convert / [last used] command, after having setup the conversion with the above oggenc2 settings (that outputs to stdout) and replaygain processing applying gain to the output.

What I'm not sure about:
1) Is this doable?
2) Are the context commands available through the commandline?
3) Would that oggenc2 actually output to stdout when used in fb2k? Or would it output to disk anyway?

Thanks for any help. Cheers!
  • Last Edit: 30 March, 2012, 05:42:08 AM by gorman

  • gorman
  • [*][*]
Using foobar for Subsonic transcoding
Reply #1
Anyone? Instead of relying on the converter, which apparently can't do without the %d option (thus making it impossible to handle stdout), it could be enough to have an output module that outputs to stdout. I guess the Null Output option is not the same, right?

  • Rollin
  • [*][*][*][*]
Using foobar for Subsonic transcoding
Reply #2
it could be enough to have an output module that outputs to stdout.


Foobar2000 itself can output to stdout when you are using encoder that supports stdin...
If you need to apply replaygain, just scan source files and set foobar to apply gain during conversion (Processing-> replay gain).
If you want stdin input to encoder and file output, command line must be like "-Q -q9,000000 - -o %d"
  • Last Edit: 05 April, 2012, 09:24:33 AM by Rollin

  • gorman
  • [*][*]
Using foobar for Subsonic transcoding
Reply #3
Thanks, I'll give it a try.

  • gorman
  • [*][*]
Using foobar for Subsonic transcoding
Reply #4
Ok, I setup a portable install in the transcoders directory of Subsonic.

I am using this convert settings in foobar:

Output format: oggenc2 -s %r -Q -q2 - -o %d

Destination: Output folder: C:\temp
Output type: tracks into individual files.
File name pattern: %filename%
Overwrite existing files.

Processing: Replaygain

This preset is saved as Subsonic

Now I've tried setting it up for Subsonic use like this:
Code: [Select]
c:\subsonic\transcode\foobar2000 /context_command:Subsonic "E:\Protected\M\FLAC Rips\Pink Floyd - Dark Side Of The Moon (20th Anniversary Edition)\Pink Floyd - Dark Side Of The Moon (20th Anniversary Edition) - 01 - Speak To Me.flac"


This line, even when invoked from a command prompt, just launches foobar, nothing else happens.

Using "/context_command:Convert / Subsonic" produces the same result.