Opened 5 years ago
Last modified 5 years ago
#8791 new defect
Metadata will not copy over going from opus to mp4
Reported by: | Tupsi | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | opus, mp4, metadata, m4b |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
I noticed that when I change containers and codecs for an audio file that for some combination the metadata gets lost in transit.
For instance reencoding an audio file from aac (inside an mp4 container) to opus works fine, copying over all relevant meta data like album, artist, genre, date, title, comment, etc.
e.g.
ffmpeg -i input.m4b -c:a libopus -b:a 32k output.opus
works, all meta is copied.
ffmpeg -i input.m4b -c:a libopus -b:a 32k output.mp4
works as well, all meta is copied.
Now if you copy the mentioned .opus above back into an mp4 container, the information is lost.
ffmpeg -i output.opus -c:a copy newoutput.mp4
file runs fine (audio wise), but all meta is lost.
No idea, which component is doing this, so I will leave that to you guys to change, sorry for that.
How to reproduce:(you need the opus to have a few metadata like album, comment)
% ffmpeg -i input.opus -c:a copy output.mp4 ffmpeg version git-2020-07-15-a54b367 built on with gcc 9.3.1 (GCC) 20200621
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Change History (5)
comment:1 by , 5 years ago
Summary: | Metadata will not copied over going from opus to mp4 → Metadata will copy over going from opus to mp4 |
---|
comment:2 by , 5 years ago
Summary: | Metadata will copy over going from opus to mp4 → Metadata will not copy over going from opus to mp4 |
---|
follow-up: 4 comment:3 by , 5 years ago
comment:4 by , 5 years ago
Replying to mkver:
This needs a sample file to make this a valid ticket. Small files can be attached here directly, bigger files can be uploaded via this website.
uploaded via videolan an opus file you can test it with like this:
ffmpeg -i TheRecluse.opus -c:a copy TheRecluse.mp4
comment:5 by , 5 years ago
Keywords: | m4b added |
---|
I found another bug related to this. If you try the output suffix .m4b instead of mp4 ffmpeg complains
[ipod @ 000002752a9ea380] Could not find tag for codec opus in stream #0, codec not currently supported in container Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
but isnt mp4 and m4b the some container, the difference only explaining to the user that the latter is an audiobook (with chapters) where the first is mp4 in general, but in the end, we are talking about the same container?
Not that I need the .m4b suffix atm as I am "apple free" atm, but for completeness that could be changed as well.
This needs a sample file to make this a valid ticket. Small files can be attached here directly, bigger files can be uploaded via this website.