Repository navigation
fix(video): re-tag YCgCo recordings before scaling analyzer clips - #235
Open
sergeikolos-idt wants to merge 1 commit into
Open
sergeikolos-idt wants to merge 1 commit into
sergeikolos-idt wants to merge 1 commit into
Conversation
Some devices (seen on a Nothing A063 / Android 15 with scrcpy 3.3.3) tag the
screen recording as color_space=ycgco, color_trc=log316. swscale cannot
convert from YCgCo, so the scale filter in render_timeline_clip fails the
whole graph ("Impossible to convert between the formats supported by the
filter 'Parsed_setpts_1' and the filter 'auto_scale_0'", rc 178). Every
video_analyzer and analyze_audio_only call then fails after all retries.
Re-tag the input as BT.709 with setparams before trim/scale. Pixels are not
changed; only the colour metadata that swscale uses to pick a conversion.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On some real devices the scrcpy screen recording is tagged
color_space=ycgco,color_trc=log316. We saw this on a Nothing A063 (Android 15) with scrcpy 3.3.3. swscale cannot convert from YCgCo, so thescalefilter inrender_timeline_clipfails the whole filter graph:As a result, every
video_analyzerandanalyze_audio_onlycall on such a device fails after all retries ("Failed to trim video segment after retries"). In our run the Flash agent spent about 4 minutes in these retries while a live phone call stayed open.Change
artemis/utils/video.py: putsetparams=colorspace=bt709:color_trc=bt709:color_primaries=bt709beforetrim/scalefor recording pieces. The pixels do not change. Only the colour metadata changes, which swscale uses to choose a conversion.tests/unit/test_unified_controller_video.py: a new test renders a clip from a recording tagged YCgCo/log316 withh264_metadata. The test fails onmainwith the error above and passes with this change.Testing
pytest tests/unit/test_unified_controller_video.py: 23 passed. The new test fails without the fix.ruff format --checkandruff checkon the changed files: clean.pytest: the same 80 pre-existing failures as on a cleanmainin this environment (flash step summarizer, video analyzer agent tests). This change adds no new failures.🤖 Generated with Claude Code