Skip to content
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

Add subtitle->audio track linking #471

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rcombs
Copy link
Contributor

@rcombs rcombs commented Mar 28, 2021

Useful for cases where the appropriate tracks are otherwise ambiguous; see added notes.md section for a few examples.

Also clarified that TrackOverlay refers to tracks by their UIDs rather than their numbers; as far as I can tell this is the intent, but I can't find anything existing confirming this either way (nor any implementation code), so I could be wrong, but it seems consistent with other elements.

Previously it was suggested that TrackLink should go in a dedicated container element with maxOccurs=1, but I don't see any particular technical reason for that, and TrackOverlay already allows multiple instances without a container, though I can add one if that's a policy for newly-added elements or something.

ebml_matroska.xml Outdated Show resolved Hide resolved
notes.md Show resolved Hide resolved
@robUx4 robUx4 added format addition matroska-v5 spec_codecs Codec Matroska spec document target labels Mar 28, 2021
@robUx4
Copy link
Contributor

robUx4 commented Mar 28, 2021

The TrackOverlay refers to the SilentTrack feature which itself has SilentTrackNumber. This is a track number.

Given there's probably 0 use anywhere in the wild of this feature I don't mind the change. We may also change the name to TrackUIDOverlay or OverlayTrackUID.

Now given all of these are unused we might as well mark them as deprecated so they are not used while not specified properly or are of any use to anyone. This feature is basically used to replace parts of a track by another track the container level. This can be useful in video to encode a whole movie normally and have some parts with translated text on the video encoded in different tracks. But then it says the overlay picks the first available track, so I don't know how this can be of any use.

Maybe silently replacing parts of a video that have been removed by another part without reencoding, maybe even using a different codec. In this scenario the multiple TrackOverlay and the order to pick them would correspond to different edits of the video file.
You should move the TrackOverlay change in a separate PR as it's not used at all by the TrackLink feature.

For the TrackLink part, I think all the values should be held in a master element. When translating the spec to code, if the generated code has hierarchy (ie not a flat structure) it's easier to look for the master element and then its children, rather than iterating through all the elements of the TrackEntry to find all the TrackLink values.

ebml_matroska.xml Outdated Show resolved Hide resolved
@rcombs
Copy link
Contributor Author

rcombs commented Jan 14, 2025

Forgot about this PR for (checks notes) almost 4 years, but I've rebased this and addressed all the comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format addition matroska-v5 spec_codecs Codec Matroska spec document target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants