WIP: libavformat/matroskadec.c: export profile container metadata #21787
No reviewers
Labels
No labels
avcodec
avdevice
avfilter
avformat
avutil
CLI
doc
swresample
swscale
vulkan
API
API major
bug
duplicate
enhancement
fix/bug
fix/regression
GSoC
GSoC-Qualification
help wanted
important
invalid
LGTM
meta
needs backport
needs docs
needs fate test
needs sample
needs testing
new
question
regression
security
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
FFmpeg/FFmpeg!21787
Loadingâ¦
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "toots/matroska-webm-profile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It looks like it is not currently possible to distinguish between
matroskaandwebmwhen working withAVFormatContextandAVInputFormat.This PR adds a
"doctype"metadata to the demuxer's metadata that can be used to make such distinction at runtime.libavformat/matroskadec.c: export profile container metadata toto libavformat/matroskadec.c: export profile container metadataWhat is this information supposed to be good for?
Exporting this as metadata is problematic, because simply remuxing a matroska/webm file into a container (like Matroska) that supports the "profile" metadata (i.e. writes it) will add a such metadata from the demuxer, although it is likely wrong for the muxer. This is likely why fate doesn't pass for your commit.
518aaeb5929271f9ca75@mkver wrote in #21787 (comment):
Yes this is the reason. I just pushed a change to exclude it from the muxer.
In the application I'm looking at, we want to be able to know the exact format to initialize a new output from a
AVFormatContextand be specific regarding the underlying container.The same issue exists with
mov,mp4etc. In this case, the metadatamajor_brandcan be used so it felt natural to also use a metadata in this case.Happy to consider other methods.
9271f9ca75ae24bfcf33ae24bfcf33e49c3fcb1ae49c3fcb1a84b5740fb0@mkver and, yes, the same metadata leak happens when re-encoding to e.g.
oggfrommp4:If you have any suggestion for a better approach, I'd be interested to hear.
Metadata may be the only feasible way to export this, but not as a "profile" key. Maybe "doctype" instead, much like mp4/mov export handler_name and *_brand.
84b5740fb0187818d7a6187818d7a672eaca523d72eaca523ddcb82456c4a) Run FATE locally and send patches that actually pass FATE.
b) Using "doctype" is still unacceptable: It makes it impossible to write a doctype tag into Matroska and doctype tags will leak into other containers.
@mkver wrote in #21787 (comment):
Then a proper way to signal this kind of information is needed, and implemented in mp4 too in order to also not leak the aforementioned tags into other containers.
@mkver wrote in #21787 (comment):
This is proving difficult on mac but I'll have another pass.
Tags already leak into other containers as exemplified above.
I'm not attached to any particular name but
doctypeworks great for me because it is actually a technically accurate description of the value that's exported.Re: tag leak, I think that it should be a different effort. I wrote on IRC about maybe using tags attached to dictionary values, somthing like:
AV_DICT_INTERNALthat would prevent values with such tags from being re-exported.Happy to get feedback on that!
libavformat/matroskadec.c: export profile container metadatato WIP: libavformat/matroskadec.c: export profile container metadataView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.