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: OggEnc2 Replaygain (Read 12427 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

OggEnc2 Replaygain

Trying to transcode FLAC files into OGG on the fly, streaming from Subsonic to an iPhone. Works great in two steps.
Step 1) flac -d --totally-silent --decode-through-errors --stdout %s
Step 2) oggenc2 -Q -q7.7 -t %t -a %a -l %l -
Would like to utilize the replaygain values in the FLAC files to be carried over. However, can't make sense of the help in OggEnc2.exe (oggenc2.88-1.3.6-aoTuVb6.03-Lancer-SSE3-x.64). Using 1 or 2 in place of "n" doesn't seem to do anything and is not the instruction anyway.
 --FLAC-scale n       Scale input data using FLAC Replaygain Tags where:
                               c = 1 to use Title Replaygain value, and
                               c = 2 to use Album Replaygain value.
Also, this version is supposedly able to take FLAC files directly as long as FLAC.exe is in the same directory. Haven't succeeded with that either. Any help appreciated

Re: OggEnc2 Replaygain

Reply #1
The ReplayGain values from the FLAC do not carry over, because information is lost when converting to Ogg Vorbis. The results will be different, because the audio is actually different, even if likely not audibly different.

Re: OggEnc2 Replaygain

Reply #2
"oggenc2 -q 7.7 input.flac" will convert the input file 'input.flac' to 'input.ogg'. All standard Flac tags, except Replaygain taqs, will be copied over to the .ogg output file automatically. The 'FLAC-scale n' option will read either the Title gain or the Album gain tag and apply the gain to the decoded Flac data prior to encoding to oggvorbis. FLAC.exe is not required to be present anywhere as the Flac decoding routines are built in to the oggenc2 executable. I'm sorry if the 'help' is not clear, it appears to be a little out of date! ;) I must update it at some point.

Re: OggEnc2 Replaygain

Reply #3
Thank you so much for the quick responses. And thank you for creating such useful tools John33. Will try "oggenc2 -q 7.7 input.flac" tonight. Still confused by the following:
 --FLAC-scale n       Scale input data using FLAC Replaygain Tags where:
                               c = 1 to use Title Replaygain value, and
                               c = 2 to use Album Replaygain value.
What switch do I need if I wanted to apply Track gain? "n" is not "c", I still did try "--FLAC-scale 1" with two FLAC files with a huge difference in track gain. --FLAC-scale 1 made no difference to the resultant OGG volume.

Re: OggEnc2 Replaygain

Reply #4
OK, I'll try the scale option in the next day, or so, just to check it out. I really haven't checked in a long time!

Re: OggEnc2 Replaygain

Reply #5
I've just checked the FLAC usage, tag transfer and scale options.

The command line: "oggenc2 -q 7 --FLAC-scale 1 06.flac" does everything that is expected. The oggvorbis file is created with the vorbis comments copied across (excluding the Replaygain tags) and the Track Gain value is applied during the encoding. Using "FLAC-gain 2" in place also works and applies the Album Gain value.

The only caveat I would mention is that only 'vorbis style' comments will be copied and applied. If id3 or ape tags have been used, these will be ignored.

Re: OggEnc2 Replaygain

Reply #6
Can't thank you enough! Everything working perfectly. I had to search a bit to figure out how to handle input and output to stdout for the streamer I'm using (Subsonic). It all worked out. Thank you for creating a brilliant tool and for the help.
For anyone else searching for a FLAC to OGG streaming transcode solution utilizing Replaygain, oggenc2 can do it in one step without needing any other file: "oggenc2 -Q -q 7 --FLAC-scale 1 %s -o -"

Re: OggEnc2 Replaygain

Reply #7
Happy to be of help! ;)