Skip to content

stsd: add roundtrip support for unknown codec - #236

Open
paroga wants to merge 1 commit into
kixelated:mainfrom
paroga:codec_encode
Open

paroga wants to merge 1 commit into
kixelated:mainfrom
paroga:codec_encode

Conversation

@paroga

@paroga paroga commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e6861e94-5103-45e7-96ec-f6a712797e3d

📥 Commits

Reviewing files that changed from the base of the PR and between 8f1ef32 and 1b74ecf.

📒 Files selected for processing (2)
  • src/error.rs
  • src/moov/trak/mdia/minf/stbl/stsd/mod.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bradh bradh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, what is the intent? If we don't understand the codec, you can't make meaningful changes, so why read or write it...

@paroga

paroga commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

what is the intent?

merging a fragmented mp4.

as long as the codec has no strange behavior it should be possible to merge samples from multiple moof+mdat into a single moov+mdat without understanding the full details of stsd

@bradh

bradh commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

what is the intent?

merging a fragmented mp4.

For what purpose?

as long as the codec has no strange behavior it should be possible to merge samples from multiple moof+mdat into a single moov+mdat without understanding the full details of stsd

There are a bunch of strange behaviours in the codecs we don't support, like layer enhancements, scaling, image sequences etc. I think this behaviour is dangerous. I might be able to live with it behind a feature flag, but would prefer to see the specific codecs implemented if you need them.

@paroga

paroga commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

merging a fragmented mp4.

For what purpose?

allow playback in players which don't support fragmented files (check out windows)

but if you don't like that point, take an even more simple use case: parse a MP4 file, add/edit some meta atoms and write it again. in that case the actual codec should not matter

There are a bunch of strange behaviours in the codecs we don't support, like layer enhancements, scaling, image sequences etc. I think this behaviour is dangerous. I might be able to live with it behind a feature flag, but would prefer to see the specific codecs implemented if you need them.

i'd more prefer some kind of runtime flag. using feature flags in bigger project can lead to problems if they change behavior. some other crate in a workspace can enable a feature and then it's enabled for all crates (see also #105)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants