Skip to content

Read Matroska stream duration tags - #1627

Open
mavenlin wants to merge 1 commit into
meta-pytorch:mainfrom
mavenlin:agent/matroska-stream-duration
Open

Read Matroska stream duration tags#1627
mavenlin wants to merge 1 commit into
meta-pytorch:mainfrom
mavenlin:agent/matroska-stream-duration

Conversation

@mavenlin

@mavenlin mavenlin commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • fall back to the per-stream Matroska DURATION tag when AVStream::duration is unavailable
  • add a regression fixture whose video-track duration differs from the container duration

Why

Matroska commonly exposes per-track duration through a string metadata tag while leaving the typed stream duration unset. TorchCodec then falls back to container duration, which can describe a different or longer stream.

@pytorch-bot

pytorch-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1627

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 14, 2026
@mavenlin
mavenlin force-pushed the agent/matroska-stream-duration branch from a5ccf26 to f377557 Compare August 14, 2026 05:02
@mavenlin
mavenlin marked this pull request as ready for review August 14, 2026 05:41
@mavenlin
mavenlin force-pushed the agent/matroska-stream-duration branch from f377557 to 0271f1b Compare August 14, 2026 06:03
@mavenlin

mavenlin commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

This PR and #1628 are both bug fixes which fix the wrong behavior on mkv & vfr videos.
Would you consider merging them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant