20 Jun '13 - 13:01 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: Setting up FLAC as external encoder  (Read 2563 times)
Krzysiek
Guest
« on: 2 Oct '05 - 13:50 »
Reply with quoteQuote

Hi,

 I did following:
 - downloaded Flac and copied flac.exe to XMPlay dir
 - added new encoder in "Encoders" tab, named "FLAC":
      - command line: flac %i %o
      - Default file extension: flac
      - Resolution: Device

after starting playback in XMPlay it seems to work (there is visible playback activity) but in fact nothing is encoded, even output flac filename does not exist in destination path.

Is it working for anyone?

Thanks,
Krzysiek
Logged
Krzysiek
Guest
« Reply #1 on: 2 Oct '05 - 14:03 »
Reply with quoteQuote

It worked out when I put following:

flac %i -o G:\Filename.flac


But the problem is that the file isn't visible (I wonder where actually the stream is buffered) until I stop playback in XMPlay.

Best regards
Logged
Krzysiek
Guest
« Reply #2 on: 2 Oct '05 - 14:17 »
Reply with quoteQuote

OK, I checked it - when playing back FLAC puts temporary WAV file in Windows temp directory until stopped; but I need compression one the fly. Is is possible?

Thanks,
Krzysiek
Logged
Dotpitch
Posts: 2503


« Reply #3 on: 2 Oct '05 - 17:27 »
Reply with quoteQuote

no.

or is it? hmm, i believe it works with stdin, if your flac encoder supports that... something like "flac [options] -". anyway, as long as you put %i in the cmd-line, xmplay will decode the file to wav first and then process it Wink.
Logged
Ian @ un4seen
Administrator
Posts: 15368


« Reply #4 on: 2 Oct '05 - 18:06 »
Reply with quoteQuote

Yep, "flac -o %o -" should do it.
Logged
Krzysiek
Guest
« Reply #5 on: 2 Oct '05 - 19:09 »
Reply with quoteQuote

Oh right, I didn't know how to make it read from stdin. Thank You!

Best regards,
Krzysiek
Logged
rst
Posts: 74


« Reply #6 on: 4 Sep '12 - 16:15 »
Reply with quoteQuote

ok

flac -8 -V -o %o -

but howto add the tags ?
Logged
Ian @ un4seen
Administrator
Posts: 15368


« Reply #7 on: 4 Sep '12 - 18:12 »
Reply with quoteQuote

Something like this should do it:

   flac -T "TITLE=%1" -T "ARTIST=%2" -T "ALBUM=%3" -T "DATE=%4" -T "TRACKNUMBER=%5" -T "GENRE=%6" -T "COMMENT=%7" -o %o -

But that won't currently work properly because XMPlay inserts its own quotes (") when substituting the tags. To fix things, here's an update that should handle either case, ie. it'll only insert quotes if they aren't already in the provided command-line...

   www.un4seen.com/stuff/xmplay.exe
Logged
rst
Posts: 74


« Reply #8 on: 4 Sep '12 - 18:23 »
Reply with quoteQuote

thx a lot for yor reply.
i see that each used codec need different sintaxis.
i was trying near lame settings without results but for obvious reassons Tongue

i have tried this with partial success:

flac -8 -V --delete-input-file -w -T TRACK=%5 -T TITLE=%1 -T ARTIST=%2 -T ALBUM=%3 -T YEAR=%4 -o %o -

I think that XMplay dont allowed to flac.exe to delete source file....
« Last Edit: 4 Sep '12 - 18:25 by rst » Logged
Dotpitch
Posts: 2503


« Reply #9 on: 4 Sep '12 - 21:14 »
Reply with quoteQuote

Illustrated Manual > Advanced output > Encoders > scroll down to FLAC.

This used to work fine (since it bypasses the use of quotes in the tag definition):
flac -5 --tag=title=%1 --tag=artist=%2 --tag=album=%3 --tag=year=%4 --tag=track=%5 --tag=genre=%6 --tag=comment=%7 - -o %o
Logged
rst
Posts: 74


« Reply #10 on: 4 Sep '12 - 21:45 »
Reply with quoteQuote

yes, anyways i wanted that the encoder to perform the Verifiy and the delete source.
Logged
Dotpitch
Posts: 2503


« Reply #11 on: 5 Sep '12 - 06:20 »
Reply with quoteQuote

That's not possible with XMPlay. XMPlay opens the file, decodes it and passes the PCM data to the FLAC encoder. This means the encoder never sees the source file, so it cannot verify the output nor delete the source file.
Logged
rst
Posts: 74


« Reply #12 on: 5 Sep '12 - 14:14 »
Reply with quoteQuote

but Dotpitch, the -V verify feature in the flac codec, supossely is performed taking the wave data that uses.
I understand that lame cant delete source because the file is in use by XMplay, but the verify i think that is performed.
Logged
Ian @ un4seen
Administrator
Posts: 15368


« Reply #13 on: 5 Sep '12 - 16:03 »
Reply with quoteQuote

i have tried this with partial success:

flac -8 -V --delete-input-file -w -T TRACK=%5 -T TITLE=%1 -T ARTIST=%2 -T ALBUM=%3 -T YEAR=%4 -o %o -

This used to work fine (since it bypasses the use of quotes in the tag definition):
flac -5 --tag=title=%1 --tag=artist=%2 --tag=album=%3 --tag=year=%4 --tag=track=%5 --tag=genre=%6 --tag=comment=%7 - -o %o

Oh yeah, it looks like the XMPlay update above is unnecessary as the quotes don't have to be at the start and end of a parameter, eg. "TITLE=blah" is equivalent to TITLE="blah". Oh well, the update shouldn't do any harm anyway Smiley
Logged
Dotpitch
Posts: 2503


« Reply #14 on: 5 Sep '12 - 17:26 »
Reply with quoteQuote

but Dotpitch, the -V verify feature in the flac codec, supossely is performed taking the wave data that uses. I understand that lame cant delete source because the file is in use by XMplay, but the verify i think that is performed.
Reading the documentation...
Quote from: FLAC doc
-V, --verify     Verify the encoding process. With this option, flac will create a parallel decoder that decodes the output of the encoder and compares the result against the original. It will abort immediately with an error if a mismatch occurs. -V increases the total encoding time but is guaranteed to catch any unforseen bug in the encoding process.
Yep, that should work. What happens, is no file encoded? If not, what's the command line you're using?

Oh well, the update shouldn't do any harm anyway Smiley
There may be tag names that include spaces (album performer, track artist, etc.), so it's a nice addition for those cases.
Logged
Ian @ un4seen
Administrator
Posts: 15368


« Reply #15 on: 6 Sep '12 - 14:12 »
Reply with quoteQuote

Just to clarify, the release version does enclose the tags (and filenames) in quotes, so spaces shouldn't be a problem. For example, this:

   flac -T TITLE=%1 -o %o -

would become this:

   flac -T TITLE="blah" -o "blah.flac" -

The update above still supports that, but it also allows the user to specify the quotes instead of adding them automatically. For example, this:

   flac -T "TITLE=%1" -o %o -

would become this:

   flac -T "TITLE=blah" -o "blah.flac" -

Both command-line variations should work the same.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines