INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Conversion from FLAC to Ogg  (Read 3031 times)

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Conversion from FLAC to Ogg
« on: October 04, 2006, 01:51:37 pm »

Hi,

I want to use the latest, bestest Oggenc2.exe as an external encoder. It can encode FLAC files directly.

However, when MediaCenter is configured for an external encoder it converts to WAV first and renames the file adding (temp) to the end of the filename.

2 Problems with this, conversion takes longer and the ogg file keeps the (temp) in the filename.

Can I prevent MediaCenter from renaming and converting to wav first?

Also, can I have mediacenter suppress the CMD it spawns, or at least let it do it minimized?

TIA,
Ingemar.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Conversion from FLAC to Ogg
« Reply #1 on: October 04, 2006, 05:33:50 pm »

The External Encoder option is not needed.

Just rename the oggen2.exe file to oggenc.exe and replace the oggenc.exe file in the [MC Program path]\Plugins folder.

After that MC uses the new encoder file with the standard Ogg Vorbis option. You can use the Custom option in the Ogg Vorbis settings with your preferred command line string.

Just keep in mind that you need to copy the file again after each time you have reinstalled MC.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Conversion from FLAC to Ogg
« Reply #2 on: October 05, 2006, 01:29:39 pm »

Thx, I'll try it out but I am afraid its still gonna convert to wave first.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Conversion from FLAC to Ogg
« Reply #3 on: October 05, 2006, 04:18:04 pm »

It would work exactly like the default Ogg Vorbis encoder.

Quote
I want to use the latest, bestest Oggenc2.exe as an external encoder. It can encode FLAC files directly.

By the way, this is not exactly correct. The actual Vorbis codec can handle only PCM data. The oggenc2.exe program is just designed to be helpful so that it can decompress a FLAC file on the fly similarly like MC does. In any case the audio data must be decompressed first. It doesn't matter which program component is used for the that.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Conversion from FLAC to Ogg
« Reply #4 on: October 05, 2006, 04:51:17 pm »

Sorry to be a smartass, but actually it does matter.

I'm using the oggenc2 lancer or something, its optimized for P4 core2duo. It encodes a general size flac in 3,5 seconds. From what I understand it encodes to wave and then to ogg on the fly. I tried it, encoding the wave to ogg or (the same file) directly from flac and there's no difference in speed.

MC converts to a temporary wave first which takes around 3 seconds, it then converts to ogg in 3,5 seconds (using the same oggenc2 as above using your trick). Basically total time for a conversion is doubled.

So the oggenc2 is a one-step process, MC a 2-step process using a temp file.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Conversion from FLAC to Ogg
« Reply #5 on: October 05, 2006, 06:48:05 pm »

I have assumed that the internal encoders are used directly without temp files, but I have not tried to monitor the disk traffic. What folder MC used for the temp files in you case?

A command line Oggenc2 encoder can feed the encoder codec directly with decoded data. I suppose that system is always faster. Programs like MC just don't work like that. MC uses separate input and output plugins in the conversion process. The process goes like this: source file > FLAC decoder plugin > MC > Ogg Vorbis encoder plugin > converted file > and as a last step Ogg decoder plugin is used for file tagging

Perhaps someone from JRiver could answer to the temp file question. Is a temp file always used or can MC send PCM data directly to stdin?
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Conversion from FLAC to Ogg
« Reply #6 on: October 05, 2006, 07:43:28 pm »

The temp file is next the original file and has (temp) added to its name. Quite annoying actually because oggenc2 picks that up of course.

That's only when using an external encoder btw. When using the internal encoder it doesn't do that.

And now I must eat my own words. When I said "it then converts to ogg in 3,5 seconds (using the same oggenc2 as above using your trick)" I hadn't actually tried it, it was based on an assumption. Sorry for the confusion.

I actually really tried it out just now and I don't see it convert to wave first but with the latest bestest ogg encoder ;) it still taking 10 secs instead of 3,5.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Conversion from FLAC to Ogg
« Reply #7 on: October 06, 2006, 01:11:39 am »

Have you tried to convert uncompressed wave with MC? It would tell what is MC's Ogg Vorbis encoding speed without the FLAC decoding step.


I checked what is listed in Oggenc2's help. From the Ogg Vorbis aoTuv release v.1 "-h" listing:

Quote
INPUT FILES

OggEnc input files must currently be 32, 24, 16, or 8 bit PCM WAV, AIFF, or AIFF/C files, or 32 bit IEEE floating point WAV.

Files may be mono or stereo (or more channels) and any sample rate. ALSO with this version, you may input FLAC, MONKEYS AUDIO, WAVPACK, LAPC, OPTIMFROG and SHORTEN files. You MUST ensure that the appropriate encoder/decoder (i.e., flac.exe, etc) is in the same dir/folder as oggenc2.exe, or is in the defined path.

Alternatively, the --raw option may be used to use a raw PCM data file, which must be 16bit stereo little-endian PCM ('headerless wav'), unless additional parameters for raw mode are specified.

You can specify taking the file from stdin by using - as the input filename. In this mode, output is to stdout unless an output filename is specified with -o

So it uses a separate FLAC decoder program. The decompressed file is probably inputted through stdin.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: Conversion from FLAC to Ogg
« Reply #8 on: October 06, 2006, 04:19:18 am »

Converting a song to Wave took 4 seconds. Converting that wave to Ogg took 5 seconds. Converting that song from Flac to Ogg took 10 secs. Those numbers are rounded so I think that explains the 1 sec difference.

All codec tools are in my path, but they are also in plugin dir so I can use them as external codecs. Yesterday I followed your tip and replaced the existing ones as well (lame.exe, Oggenc.exe).

I think we just found a  new feature request for MC12 :) (enable or disable the use of stdin).

But its gets crazier. When I select external encoder again, oggenc2, and select the wave MC created in the step above, and encode it, it converts the wave to a temp wave (check the screenshots). Hmmmm....

Check the path and filename in the tooltip




CHeck the path and filename; note the (temp)?


pls try this as well if you want, so we know its not something in my config.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Conversion from FLAC to Ogg
« Reply #9 on: October 06, 2006, 01:06:33 pm »

I think we just found a  new feature request for MC12

Yes, this discussion should continue in the MC12 forum. This is not a bug and JRiver is not going to change MC11.1 anymore.

I may run some tests later, but just now I am busy with other things.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755
Pages: [1]   Go Up