You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What would it take to support webm format for audio?
My understanding is it is an "audiovisual media file format" so it has both audio and video, but popular websites use this as a container for audio only since it supported by the HTML5 spec.
#218 is almost done now. There are still a few features to work on, like cover art support. But you can read/write tags and most audio properties are supported. If anyone has files in their library to test with that'd be great.
@milesegan@uklotzde any chance you have Matroska/WebM files in your libraries?
❯ ffprobe test.webm
Input #0, matroska,webm, from 'test.webm':
Metadata:
title : THIS IS THE BEGINNING OF THE END (El Principio del Fin)
COMMENT : https://archive.org/details/78_this-is-the-beginning-of-the-end-el-principio-del-fin_buddy-clark-bud-freeman-mor_gbia0349177b
ARTIST : BUDDY CLARK, Bud Freeman, Morey Feld, Jess Stacy, Marty Marsala, Brad Gowans, Pee Wee Russell, Sid Weiss, Mack Gordon
track : 01
ALBUM : THIS IS THE BEGINNING OF THE END (El Principio del Fin)
GENRE : Fox-Trot
TLEN : 175.19
ENCODER : Lavf61.7.100
Duration: 00:02:55.20, start: -0.007000, bitrate: 145 kb/s
Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp
Metadata:
ENCODER : Lavc61.19.101 libopus
DURATION : 00:02:55.202000000
Interesting I had no idea. Here's another mka I created using the mkvmerge command. Do you know if VLC is more standard compliant for reading tags? When I open that webm in VLC it doesn't find any tags but it does for this mka. The matroska branch of lofty doesn't seem to but I'm not sure if these tags are standard either. I don't know much about mka.
There are also some test files here that seem to crash the current matroska branch but do scan ok in VLC & ffmpeg. Apologies if these are also non or pre-standard:
The tags in test.mka look a lot better. They don't show up with the tag_reader though since they're attached to an audio track.
Matroska lets you optionally attach tags to specific audio/video tracks, chapters, and AttachedFiles. Those tags are read, and you can see them in the MatroskaTag, but when they get converted to Tag they get ignored:
Didn't think that feature was actually used. Good to know. Not really sure how to retain that information though, especially since you can write a Tag to many different files, in which case the track UID would be garbage.
Also good to know that the official test files crash. I have them in the test assets and forgot to actually make tests for them.
Activity
Serial-ATA commentedon Feb 11, 2023
Matroska support would have to come before WebM, since WebM is a subset of that.
I've always wanted to support both, but I'm currently very low on time. It could be quite awhile before I'm able to get around to implementing it.
Serial-ATA commentedon Jun 8, 2023
I'll work on this in the next few weeks for 0.15.0. :)
Serial-ATA commentedon Aug 5, 2023
I finally got back around to working on this. Sorry this didn't make 0.15.0. This time I won't make any promises about when I'll get it done 😄.
canadaduane commentedon Aug 6, 2023
No need to apologize! Your working on it is a gift to the audio-listening community :)
azzamsa commentedon Jun 14, 2024
Related:
Serial-ATA commentedon Jul 12, 2025
#218 is almost done now. There are still a few features to work on, like cover art support. But you can read/write tags and most audio properties are supported. If anyone has files in their library to test with that'd be great.
@milesegan @uklotzde any chance you have Matroska/WebM files in your libraries?
milesegan commentedon Jul 12, 2025
Sure I can do some testing of this.
milesegan commentedon Jul 12, 2025
Ok here's some test data. I took a free mp3 from archive.org and transcoded it to webm using this command:
When I then run the lofty tag_reader example from the
matroskabranch on the file it doesn't seem to pick up the tags. Should this work?ffprobe seems to be able to read the tag:
webm-tag-test.zip
Serial-ATA commentedon Jul 12, 2025
FFmpeg doesn't handle Matroska metadata correctly at all right now: #218 (comment)
There's a patch that'd make it significantly better, but who knows when/if that'll get in.
I'm not really sure where to get real world Matroska files, it's not super well supported by taggers.
milesegan commentedon Jul 12, 2025
Interesting I had no idea. Here's another mka I created using the
mkvmergecommand. Do you know if VLC is more standard compliant for reading tags? When I open that webm in VLC it doesn't find any tags but it does for this mka. Thematroskabranch of lofty doesn't seem to but I'm not sure if these tags are standard either. I don't know much about mka.test.mka.zip
milesegan commentedon Jul 12, 2025
There are also some test files here that seem to crash the current
matroskabranch but do scan ok in VLC & ffmpeg. Apologies if these are also non or pre-standard:https://github.com/ietf-wg-cellar/matroska-test-files
Serial-ATA commentedon Jul 12, 2025
The tags in
test.mkalook a lot better. They don't show up with thetag_readerthough since they're attached to an audio track.Matroska lets you optionally attach tags to specific audio/video tracks, chapters, and
AttachedFiles. Those tags are read, and you can see them in theMatroskaTag, but when they get converted toTagthey get ignored:lofty-rs/lofty/src/ebml/tag/generic.rs
Lines 197 to 202 in d8081be
Didn't think that feature was actually used. Good to know. Not really sure how to retain that information though, especially since you can write a
Tagto many different files, in which case the track UID would be garbage.Also good to know that the official test files crash. I have them in the test assets and forgot to actually make tests for them.
akashskypatel commentedon Sep 10, 2025
Would this solution also include WebA, the audio-only portion of a WebM file?
Serial-ATA commentedon Sep 11, 2025
@akashskypatel Yes, they should be fine assuming they're just WebM files that only have audio tracks. Lofty only cares about the audio tracks, anyway.