IPB

Welcome Guest ( Log In | Register )

Need a metaflac hint!, Want to reduce padding size
Neasden
post Aug 24 2008, 01:50
Post #1





Group: Banned
Posts: 185
Joined: 1-July 08
Member No.: 55148



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.
Go to the top of the page
+Quote Post
 
Start new topic
Replies (1 - 6)
jcoalson
post Aug 24 2008, 05:17
Post #2


FLAC Developer


Group: Developer
Posts: 1526
Joined: 27-February 02
Member No.: 1408



there's no way to reduce padding like that without rewriting the file (doesn't re-encode though).
Go to the top of the page
+Quote Post
Neasden
post Aug 24 2008, 19:09
Post #3





Group: Banned
Posts: 185
Joined: 1-July 08
Member No.: 55148



so the solution lies on the rejected options above?

This post has been edited by Neasden: Aug 24 2008, 19:09
Go to the top of the page
+Quote Post
jcoalson
post Aug 25 2008, 19:56
Post #4


FLAC Developer


Group: Developer
Posts: 1526
Joined: 27-February 02
Member No.: 1408



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.
Go to the top of the page
+Quote Post
AliL
post Sep 3 2008, 21:26
Post #5





Group: Members
Posts: 95
Joined: 18-August 07
Member No.: 46314



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
--picture="C:\Pictures\%a - %t.png"
Then I'd have no need to add the padding and remove the excess later on.

This post has been edited by AliL: Sep 3 2008, 22:18
Go to the top of the page
+Quote Post
AliL
post Sep 4 2008, 13:32
Post #6





Group: Members
Posts: 95
Joined: 18-August 07
Member No.: 46314



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
--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

This post has been edited by AliL: Sep 4 2008, 14:24
Go to the top of the page
+Quote Post
jcoalson
post Sep 7 2008, 05:36
Post #7


FLAC Developer


Group: Developer
Posts: 1526
Joined: 27-February 02
Member No.: 1408



QUOTE (AliL @ Sep 4 2008, 07:32) *
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.


QUOTE (AliL @ Sep 3 2008, 15:26) *
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.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th August 2014 - 07:56