Skip to main content

Topic: Need a metaflac hint! (Read 3442 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Neasden
  • [*][*][*]
  • Banned
Need a metaflac hint!
Need a command line hint to reduce padding size: ex. 200k down to original 8k.
Is it possible to do this without using "--remove --block-type=PADDING --dont-use-padding" + "--add-padding=8192", and of course not re-enconding the file.

  • jcoalson
  • [*][*][*][*][*]
  • Developer
Need a metaflac hint!
Reply #1
there's no way to reduce padding like that without rewriting the file (doesn't re-encode though).

  • Neasden
  • [*][*][*]
  • Banned
Need a metaflac hint!
Reply #2
so the solution lies on the rejected options above?
  • Last Edit: 24 August, 2008, 02:09:59 PM by Neasden

  • jcoalson
  • [*][*][*][*][*]
  • Developer
Need a metaflac hint!
Reply #3
I was going to say use 2 commands:

metaflac --add-padding=8192 && metaflac --remove --block-number=4 (or whatever) --dont-use-padding

the first command probably should use some of the 200k padding to make a new padding block, effectively splitting it into 8k + 192k, then you could remove the 2nd 192k block (which rewrites the file).

but the first command actually adds a new padding block, so that won't work.  even if that is fixed, maybe there should be a new shorthand option for it because anyway having to know which block number to delete is hard to automate.

  • AliL
  • [*][*]
Need a metaflac hint!
Reply #4
I've got a question along similar lines, but almost the opposite...

I like to embed the album art in my files rather than have them elsewhere as folder.jpg or whatever, so would it make sense to add a padding of say 175KB by using the "--add-padding=179200" when actually making the files e.g. from EAC, then adding the album art with metaflac/mp3tag, and then using metaflac to remove any excess padding by using the "--remove --block-type=padding" command? Of do I need to use a commandline similar to that above?

Slightly off-topic now: Is metaflac any faster at processing replaygain than foobar2000, and can it process multiple albums at once and distinguish between different ones?


EDIT:I've had a thought. Could I add the picture when encoding the file through EAC by using the "--picture=" parameter and use EAC 'shorthand' (like %n or %t) for pictures in "C:\Pictures\Artist - Album.png" by using
Code: [Select]
--picture="C:\Pictures\%a - %t.png"
Then I'd have no need to add the padding and remove the excess later on.
  • Last Edit: 03 September, 2008, 05:18:45 PM by AliL

  • AliL
  • [*][*]
Need a metaflac hint!
Reply #5
I've done a bit of trial and error and worked out that I can use these parameters (e.g. %n) as EAC puts in the string information before it is passed onto the encoder. However my album art is in a mixture of .png and .jpg format and no-matter what I try I can't seem to get any wildcards to work. For example:
Code: [Select]
--picture="C:\Art\%a - %g*"    or
--picture="C:\Art\%a - %g.*"


I think I read somewhere that the flac encoder can't use wildcards, is this true? If it can't I'll make 2 EAC profiles: one for .jpg art and one for .png art and just look up what file type the art of that album I'm going to rip is beforehand.

Secondly, if I do use this method I'm still going to want to edit the metadata later on anyway but there's no way I'll need 8KB of padding to do so, so if I add 512 bytes of padding (which should be plenty as I've already got most of the information there when encoding), will this remain after the encoding or will this padding be "eaten up" by the addition of the other tags or album art?

Oh, and is there a way of removing the preceding zeros in the track numbers from EAC (e.g. making 02 just 2) in flac or metaflac when encoding or will I have to edit this out later on in mp3tag?

Many thanks,

AliL
  • Last Edit: 04 September, 2008, 09:24:24 AM by AliL

  • jcoalson
  • [*][*][*][*][*]
  • Developer
Need a metaflac hint!
Reply #6
I think I read somewhere that the flac encoder can't use wildcards, is this true? If it can't I'll make 2 EAC profiles: one for .jpg art and one for .png art and just look up what file type the art of that album I'm going to rip is beforehand.

the shell is supposed to expand wildcards.  the windows shell is broken so if you use flac.exe in the windows shell, wildcards don't work.  if you use it in pretty much any other shell (e.g. bash from cygwin) it works fine.


I like to embed the album art in my files rather than have them elsewhere as folder.jpg or whatever, so would it make sense to add a padding of say 175KB by using the "--add-padding=179200" when actually making the files e.g. from EAC, then adding the album art with metaflac/mp3tag, and then using metaflac to remove any excess padding by using the "--remove --block-type=padding" command?

yep, that will work, but it's slow because it has to rewrite the whole file.