Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add APE-Tag support for formats like WavPack and Musepack #29

Open
perfect7gentleman opened this issue Oct 25, 2017 · 6 comments
Open

Comments

@perfect7gentleman
Copy link

Subj

@Martchus
Copy link
Owner

WavPack is currently only supported when muxed in a Matroska file (not sure whether MP4 supports WavPack).

I did not find any useful information about that audio format. Only http://www.wavpack.com/397/wavpack_doc.htm which doesn't contain a specification of the file format.

Regarding tags, the documentation states:

WavPack provides limited support for tags. Although it will not create the tags, it will allow you to use another program to append any kind of tag to the end of the .WV file (and the .WVC file, if desired). During decompression, WvUnpack will discard the tag so as not to corrupt the .WAV file. Additionally, if the tag is an ID3v1 tag or an APEv2 tag, the Winamp plugin will display the full artist and title in the playlist and additional items in the info dialog.

So adding an ID3v1 tag should be unproblematic. This is already possible with the tag editor if you ignore the warning that the format is unsupported or use the CLI options --treat-unknown-as-mp3 --id3v1-usage always --id3v2-usage never. Maybe I can let the editor know that WavPack officially allows ID3v1 and use it by default in that case.

Not sure whether that statement means that WavPack itself really doesn't provide any tagging by itself. Even if it would, implementing support for it is not very high on my priority list. I'll keep this issue open as it is a valid feature request, of course.


Note that from the developer view this issue actually belongs to the tagparser repository and it maybe makes sense to implement it on top of the v7 branch.

@Martchus
Copy link
Owner

Martchus commented Oct 29, 2017

After reading https://wiki.multimedia.cx/index.php/WavPack I really don't think there's much tagging support provided by WavPack. However, the utility wvtag seems to use APEv2 tags. This is currently not supported by this tag editor.

Adding ID3 tags seems possible as well. An ID3v1 tag is recognized by VLC player and MPV. ID3v2 can at least be skipped, MPV even shows it correctly.

Since ID3 tags are already supported, I made the tag editor treat WavPack files as MP3 files so it adds ID3 tags according to the specified usage (Martchus/tagparser@cdccc24). At least adding ID3v1 tags this way should be safe.

I change the title of the issue accordingly.

@Martchus Martchus changed the title Add WavPack support Add APE-Tag support for formats like WavPack and Musepack Oct 29, 2017
@perfect7gentleman
Copy link
Author

perfect7gentleman commented Oct 30, 2017

I can confirm that TagEditor doesn't read ID3v2/APEv2 tags from wavpack-files. So by supporting it, I mean not only writing tags but also reading them.

@Martchus
Copy link
Owner

Martchus commented Oct 30, 2017

It should read ID3v2 - independently of the file format. I've just tested that with a version even before the change.

If a file has an ID3v2 tag at the beginning, it is recognized:

tageditor get -f luckynight.wv 
Tag information for "luckynight.wv":
 - File has no (supported) tag information.

tageditor set title=testtitle album=testalbum --treat-unknown-as-mp3 --id3v1-usage never --id3v2-usage always -f luckynight.wv 
Setting tag information for "luckynight.wv" ...
 - [100%] Updating ID3v2 tags ...
 - [100%] Preparing streams for rewriting ...
 - [100%] Writing ID3v2 tag ...
 - [100%] Writing frames ...
 - Changes have been applied.

tageditor get -f luckynight.wv 
Tag information for "luckynight.wv":
 - ID3v2 tag (version 2.3.0)
    Title             testtitle
    Album             testalbum

APEv2 (or v1) is not supported of course (neither reading nor writing).

@ghost
Copy link

ghost commented Nov 18, 2017

Spec is here:

http://github.com/dbry/WavPack/blob/master/doc/WavPack5FileFormat.pdf

Here are my test results with FFmpeg:

  1. muxer: mp4, encoder: wavpack, result: bad
  2. muxer: matroska, encoder: wavpack, metadata: global, result: good
  3. muxer: matroska, encoder: wavpack, metadata: stream, result: good
  4. muxer: wv, encoder: wavpack, metadata: global, result: good
  5. muxer: wv, encoder: wavpack, metadata: stream, result: bad

So:

  1. WavPack doesnt work with MP4 at all
  2. WavPack metadata can be stored at the global level, either with the WavPack
    muxer or MKV muxer
  3. WavPack metadata can only be stored at the stream level with MKV

@Martchus
Copy link
Owner

Martchus commented Nov 18, 2017

As far as I know MP4 is primarily designed to work with MPEG formats. So 1. is not really surprising.

Note that the fact FFmpeg can mux something does not mean it is standardized or well supported. For example, FFmpeg is able to mux Vorbis into MP4. However, this is not standard and not supported by some players (which support MP4 and Vorbis in general - just not in combination).


The tag editor should also be able to handle WavPack metadata when it is muxed into Matroska. It is possible to use targets to store tags at stream level, too. I have to admit that specifying targets is not really convenient, though.


And thanks for pointing to the documentation. So yes, this boils down to supporting APEv2 tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants