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: SEEKTABLE: metaflac decimal point, "inheriting block size upon reencode", ++ (Read 1397 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SEEKTABLE: metaflac decimal point, "inheriting block size upon reencode", ++

I metaflac-scanned my FLAC files for seektables, tried to remove and add. Some oddities I could report at github, but maybe ask the HA braintrust first:

* I discovered some "weird" frame_samples=1152 in files with blocksizes 4096. Explanation: I had ran test encodes with flac -0, and then re-encoded with a more suitable setting. But the seektable still keeps the original file's frame_samples.
Is that ... intended? (Does it matter ... to the extent that seektable matters?)

* Supposedly, metaflac should be able to add seekpoints at intervals specified in seconds, not restricted to integer.
Does that work for anyone whose locale uses "." for decimal separator? My locale uses "," and I couldn't make it neither 9.3 or 9,3 ...

* The reason I dug into this, was this weird behaviour in foobar2000 (which in turn was discovered as a silence testfile grew from 6 kilobytes to 48 for no appearent reason).
That looks like a foobar2000 issue, or is it? Is it behind the scenes a FLAC issue?

Re: SEEKTABLE: metaflac decimal point, "inheriting block size upon reencode", ++

Reply #1
I seem unable to replicate. Re-encoding a file flips frame_samples from 1152 to 4096 at my end. Also, I can add seekpoints twice a second with metaflac --add-seekpoint=0.5s somefile.flac. My locale uses a "," but it seems only a "." works.
Music: sounds arranged such that they construct feelings.

Re: SEEKTABLE: metaflac decimal point, "inheriting block size upon reencode", ++

Reply #2
Weirder ... adding seekpoints to *.flac vs to individual files - and the latter doesn't work?!
What effing stupid user error am I doing that I cannot spot at a glance?

Adding with wildcard yields the following. Note, point 1 is at 86 frames, i.e. at 7.99 seconds, not 8.5.
Code: [Select]
C:\bin>metaflac.exe --remove --block-type=SEEKTABLE "04*.flac"

C:\bin>metaflac.exe --add-seekpoint=8.5s  "04*.flac"

C:\bin>metaflac.exe --list --block-type=SEEKTABLE "04*.flac"
04.flac:METADATA block #1
04.flac:  type: 3 (SEEKTABLE)
04.flac:  is last: false
04.flac:  length: 1584
04.flac:  seek points: 88
04.flac:    point 0: sample_number=0, stream_offset=0, frame_samples=4096
04.flac:    point 1: sample_number=352256, stream_offset=543082, frame_samples=4096
04.flac:    point 2: sample_number=704512, stream_offset=1122729, frame_samples=4096
[...omitted most of them]
04.flac:    point 87: sample_number=30691328, stream_offset=52749204, frame_samples=4096

But adding to the filename yields an empty seektable. Note, no asterisk in the --add-seekpoint command line:
Code: [Select]
C:\bin>metaflac.exe --remove --block-type=SEEKTABLE "04*.flac"

C:\bin>metaflac.exe --add-seekpoint=8.5s  "04.flac"

C:\bin>metaflac.exe --list --block-type=SEEKTABLE "04*.flac"
04.flac:METADATA block #1
04.flac:  type: 3 (SEEKTABLE)
04.flac:  is last: false
04.flac:  length: 0
04.flac:  seek points: 0

Edit: doesn't matter whether I use =8s or =8.5s, doesn't matter whether I use quotation marks around 04.flac - I deliberately arranged it with no space in path.

1.4.2,  64-bit version of metaflac.exe


Concerning the 1152, I wonder if I just managed to destroy the example by a --remove rather than --list :-(
Stupid user error I said, stupid user error I did, and with great chance, stupid user error I then covered up.

Re: SEEKTABLE: metaflac decimal point, "inheriting block size upon reencode", ++

Reply #3
The "1152" upon reencoding was false alarm. I have found the likely stupid user error.
(Ran a FOR loop where I output seektables to a text file, but cd'ed up one level too much and the source files were included.  :-[ )