Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Using foobar for Subsonic transcoding (Read 3972 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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!

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?

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"

Using foobar for Subsonic transcoding

Reply #3
Thanks, I'll give it a try.

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.