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: No metadata for large dsf files (Read 1901 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

No metadata for large dsf files

I have a dsf file with 2.03GB (1bit 2822kHz 6channels 18minutes).
I tried different DLNA players. None shows me the metadata correctly.
The artist is unknown and the album is the artist. The file size is displayed for the duration.
They are displayed correctly in info tools or tag editors.
(May I name the programs here if it helps?)
If I cut the file and it is then under 2GB in size, the metadata is displayed correctly everywhere.
What can be the reason?

Re: No metadata for large dsf files

Reply #1
What ID3 tag type(s) does it have? Could it per chance be that it has a tag chunk at the beginning and one at the end?

Re: No metadata for large dsf files

Reply #2
If I cut the file and it is then under 2GB in size, the metadata is displayed correctly everywhere.
What can be the reason?
It seems likely that the players in question have difficulty scanning the end of large files, probably due to their source code using too small a variable (eg the max value for 32-bit signed is 2^31-1, ie 2 gig).  If the tagging scheme you are using puts the tags at the end of the file, there is a pointer at the start of the file which is read to locate the tag block... and if the designer of the media player (or DLNA server) never envisaged a file being that big, then the pointer value exceeds the scope of the player to access the tags.

Using tags at the beginning of the file should solve this.  The downside of that is adding or modifying tags then takes a significant amount of time because the entire file has to be re-written when all the data shuffles up.  This is mitigated to some extent by inserting some reserved space after the tags and before the payload, so that if the tag block expands it has space to expand into without having to move the payload.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: No metadata for large dsf files

Reply #3
I tried ID3V2.3 and ID3V2.4 tags. Nothing changed.

How can I place the metadata at the beginning of the file?

Re: No metadata for large dsf files

Reply #4
Of course, one can use WavPack (the CLI, not by way of a player), which losslessly compresses this stoooopid format in gigabytes sizes (and will likely get it down below the limit too). WavPack is also tagged at the end of the file.
Try the --import-id3 option (in addition to -hmv ) and check what follows over. It cannot import everything, and who knows how well it will import broken tags, but just try.

(WavPack cannot do DST-compressed DTS.)

Re: No metadata for large dsf files

Reply #5
OK.
I downloaded wavpack.
I am an absolute wavpack newbie. Can you tell me the command line.

input-DSD64.dsf -parameter output.DSD64.dsf

Re: No metadata for large dsf files

Reply #6
Either you give the command
wavpack -hxvm --import-id3 filename.dsf
and it will output "filename.wv" - or, to achieve the same, you can use drag and drop:
Rrename your wavpack.exe (or a copy of it) to this filename: 
wavpack{--pause}{--drop}{-hxvm}{--import-id3}.exe
When you drag and drop your .dsf file onto the .exe icon, it will do the same thing as above. It will output a WavPack file. If you drag and drop it onto wvunpack.exe, you will get back your filename.dsf, provided that it was a compliant .dsf file in the first place (a not uncommon error is to miss a bit at the end, it will be inserted) - and you need to watch filenames for collision.

Renaming for those options is what was suggested by the developer in https://hydrogenaud.io/index.php/topic,122626.msg1012159.html#msg1012159 . Where to find back that suggestion without knowing it? I linked to it in the wiki at https://wiki.hydrogenaud.io/index.php?title=WavPack#Encoding.2Fdecoding_by_drag_and_drop_.28Windows.29 , not convinced I wrote it clearly enough ...
The options do the following:
-h: "high" mode, compresses better. -x: does nothing for DSD, but for PCM it will compress even better without making decoding any heavier.
-m writes MD5 checksum for verification and fingerprint, and -v verifies immediately (closes the file, reopens it, reads it and makes sure it was written as it should).
--import-id3: Guess what. But it doesn't support every kind of tag.
--drop: Allow drag+drop for several files (not folders!). Moot for the CLI, use wildcard instead.
--pause: Keep window open afterwards for you to read the output. Irrelevant for the CLI where the window anyway stays open.

Edit: If you want to specify output filename in the CLI, append the following at the end: -o outfilename.wv

Re: No metadata for large dsf files

Reply #7
@Porcus
Thanks for the guide.
I've done it like this now. It worked perfectly.
ID3V2.4 tags were used in the original. After restoring everything is back. The metadata error persists.
Unfortunately.

Re: No metadata for large dsf files

Reply #8
......
I have now tried it with ID3V2.3 tags. Unfortunately same result.
Then I packed untagged .dsf into .wv, added tags with wvtag and then wvunpacked. unfortunately metadata gone again.

Re: No metadata for large dsf files

Reply #9
The idea was to actually play the .wv file instead of the .dsf file.

WavPack will not fix metadata in the original - indeed, the way WavPack works is to store headers and footers so that the file can be restored completely and bitwise the same as the original, with whatever non-audio chunks.

Re: No metadata for large dsf files

Reply #10
OK. This also works brilliantly. But my players cannot play wavpack files.
Thanks for the great work.

I'm now using the Flac format with manipulated bit depth and sample rate to make the file smaller until I come up with new ideas.


Re: No metadata for large dsf files

Reply #11
I tried ID3V2.3 and ID3V2.4 tags. Nothing changed.

How can I place the metadata at the beginning of the file?
A little googling indicates that (a) FLAC has metadata at the beginning, and (b) it is not advised to use ID3 tags, it requires its own tag format.  This might be why your players are not recognising the ID3 tags (in some way connected with file size).

https://www.mediamonkey.com/forum/viewtopic.php?t=30377

Maybe the ID3 tags are getting stuck on the end, with the FLAV/Vorbis tags present at the beginning and a pointer in there to "extended tags" at the end.  If it were me, I would examine the binary and see what's actually in there (at the beginning of the file).
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: No metadata for large dsf files

Reply #12
I tried different DLNA players. None shows me the metadata correctly.
But my players cannot play wavpack files.
Considering changing it? If the problem is that your players cannot handle large files, you will run into issues with uncompressed DSD files, they are excessively large. (It is not a useful format in any way, so your "intermediate" solution doing a lossy could be just as good. Say high-bitrate Opus, and keep the original for archive of course.)

A player with large file support and WavPack playback capability would solve the problems? Can you get foobar2000 with https://www.foobar2000.org/components/view/foo_upnp working? (You cannot use the x64 version of fb2kv2.0, you need either the 32-bit version or version 1.6.)

I don't know how the DSD file formats are tagged (and I am on the road now and cannot test), but what if you try to change a tag in Mp3tag or Musicbrainz Picard (https://picard.musicbrainz.org )? They might write it back in a different way, and that could maybe fix your problem.

Re: No metadata for large dsf files

Reply #13
Sorry, I posted about FLAC not DSD – I misremembered.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: No metadata for large dsf files

Reply #14
I've now met with Musicbrainz Picard APEv2 and looked at my previous attempts in the binary viewer. The metadata is always at the end of the file starting at 819C005C with variable length.
.dff would be an option because the file is smaller. However, the format cannot be reliably tagged.

Re: No metadata for large dsf files

Reply #15
Sounds like progress.  At least you now know what the problem is, and can make proper decisions how to address it.
It's your privilege to disagree, but that doesn't make you right and me wrong.