-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some videos having offseted (incorrect) timestamps (#8029)
### What * fixes #7960 .. and adds a few more "expert" information fields to video blob plus improving the selection panel view overall a bit Before: <img width="372" alt="image" src="https://github.com/user-attachments/assets/b80bdceb-b594-4864-8639-ecf3159c110a"> After: <img width="376" alt="image" src="https://github.com/user-attachments/assets/6948f24a-2ffd-40c2-8fbe-d81dda486df2"> -> note how the timestamp component and the timestamped etched into the video are now the same. The problem is that in the presence of B-frames it can happen that presentation timestamps don't start at 0. This is because in MP4 (and other formats?) timestamps can't be negative and the first timestamp may have a decode timestamp of zero but a presentation timestamp some point later. Turns out this happens in a bunch of the example video material I'm using - not too surprising given that ffmpeg's default encoding settings on h264 tend to produce this! From what I found (see links in comments) this is compensated by players. We do so now on the fly in key locations, preserving the internal PTS/DTS values of the samples. I tried to sharpen the docs where appropriate. (on a personal note: I don't quite fully follow yet how this makes sense practically given that the first frame should be an IDR frame (it is, right?). But that's 100% what's happening and I found strong indication that players compensate for this just like we do here now) ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/8029?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/8029?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/8029) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
- Loading branch information
Showing
16 changed files
with
382 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
crates/store/re_types/src/archetypes/video_frame_reference.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.