Relax the 256 MiB per-stream size cap on android.display.video (display video)
- Dominant language
- C++
- Stars
- 6.5k
- Forks
- 868
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 218
Description
The `android.display.video` data source (display video capture) is currently limited to **256 MiB per display stream**, enforced independently in two places:
- **On device** — `DisplayVideoConfig.max_stream_size_bytes` defaults to 256 MiB per stream in `VideoFrameDataSource`. Once a displays encoded output reaches it, the stream is torn down with a `VideoFrameError` (`SIZE_CAP_HIT`).
- **In trace_processor** — the video-frame importer independently drops frames once a stream exceeds 256 MiB (`kDefaultMaxStreamSizeBytes`), recording the `android_video_parse_size_cap_hit` data-loss stat.
These caps exist because of memory/technical limitations in holding the stream, not a fundamental constraint. For longer sessions or higher resolutions they can truncate the video before the trace ends.
If raising or removing these limits would help your use case, please comment and 👍 so it can be prioritised.
Contributor guide
Research direction
Start by reading DisplayVideoConfig.max_stream_size_bytes in VideoFrameDataSource and the trace_processor video-frame importer that uses kDefaultMaxStreamSizeBytes. Determine a coordinated higher or removed limit for both paths, then verify that long or high-resolution streams are no longer truncated and that SIZE_CAP_HIT and android_video_parse_size_cap_hit behave as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100