Opened 2 years ago
Last modified 2 years ago
#9962 new defect
-metadata has no effect for .ogg file containing opus audio
Reported by: | derkades | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
System info
ffmpeg: git master 20220910
os: ubuntu 22.04
How to reproduce:
./ffmpeg -i opus_with_title.ogg -codec copy -metadata title=somethingelse out.ogg
The output file will still have the original title.
I have attached a short sample file, but I can reproduce the issue with any ogg file containing opus audio.
Apparently this bug(?) has existed for a while, see this StackOverflow post from 2018: https://stackoverflow.com/questions/50522753/ffmpeg-add-metadata-to-oggopus-and-embed-image
Attachments (1)
Change History (3)
by , 2 years ago
Attachment: | opus_with_title.ogg added |
---|
comment:1 by , 2 years ago
comment:2 by , 2 years ago
I see now, thanks. For ogg files I indeed need to set metadata for the stream instead of the container. I don't know enough about file formats to say if ogg supports metadata or not (if it does, the ffmpeg muxer should probably support it?).
Your command only sets the format (i.e. whole file) metadata title, but this seems to be ignored by the muxer. Instead the muxer writes per-stream metadata and that is also what the demuxer reports. To set it, you need to set stream metadata: -metadata:s title=somethingelse (see the documentation for how to set it for specific streams only). Not sure if this is a bug; probably not.