-
Notifications
You must be signed in to change notification settings - Fork 76
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
Enhancement Request: Preserve MP3 Metadata When Watermarking #56
Comments
I've been working on a way to preserve tags for mp3 files by simply using The solution has two parts:
The code for The Example:
|
I have seen reports from other users running into similar issues. Since Audiowmark reads files via libsndfile, it happily supports WAV, VOC, FLAC, MP3, OGG/Vorbis, Opus and a few more formats as input, which can easily lead to the expectation that the same format is supported as output format (without reading the full documentation, since the README does point out that only WAV and RAW can be written). Since Audiowmark happily writes a WAV file as output even if the user provided output file name ends in .ogg, .flac, etc, users might not even detect their error early on. This is aggravated by the fact that many players auto-detect sound formats, so those won't complain about mismatching file extensions either. To improve usability I'd therefore suggest: |
Hi.
When using
audiowmark
to watermark an MP3 file, it successfully reads the MP3, adds the watermark but outputs the result as a WAV file, regardless of the file extension used as the output file name.I.e. the resulting
out.mp3
file with an MP3 extension actually contains WAV file data.That behavior might be according to spec, but is quite surprising.
And, if the output file is a
out.wav
file, and e.g. lame is used to re-encode the WAV into MP3 data, the resulting MP3 file will lack the metadata from the original MP3, e.g. title, artist, album.Here is the process I have come up with to preserve the metadata:
ffmpeg
.ffmpeg
again.The commands are:
It would be great if
audiowmark
could detect that the output file is supposed to be an MP3 file and handle the watermarking process in a way so that the output file is an MP3 with the original metadata intact and encoded with a bitrate similar to the input (some heuristics might be needed to guess the input bit rate). This would greatly improve usability and be less error prone than doing it all manually.Regarding the WAV output even if the file extension is
.mp3
, I'd suggest to at least warn the user about the possible surprise and maybe require--force
or similar, in case the user really wants that (which is highly unlikely).To summarize:
If that is preferred, I could help with the creation of a wrapper script to achieve the above. (I just suspect that a standalone script couldn't support streaming mode really well...)
Thanks for consideration.
The text was updated successfully, but these errors were encountered: