Repository navigation
Send song_seconds on conversion_succeeded (2.3.5) - #70
Merged
Merged
Conversation
The event taxonomy in docs/feedback-and-analytics.md specifies a song_seconds property on conversion_succeeded, but it was never wired: every event to date has shipped without it, so there is no song-length data to separate slow hardware from long tracks in duration_ms. Derive it from the CDG stream (300 packets/sec x 24 bytes = 7200 bytes/sec), which measures the graphics duration without decoding the MP3. The output video runs to the usually slightly longer audio length, but this is close enough to characterize song length.
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.
Problem
The event taxonomy in docs/feedback-and-analytics.md specifies
conversion_succeeded { resolution, duration_ms, song_seconds, output_mb_bucket }, butsong_secondswas never wired intotrackConversionSucceededor its call site. Every event to date has shipped without it, so there is no song-length data: a 16-minuteduration_mscannot be split into slow hardware vs. long track.Change
cdgSongSeconds(bytes)insrc/lib/analytics.ts: song length in whole seconds derived from the CDG stream (300 packets/sec x 24 bytes = 7200 bytes/sec). No audio decoding. This measures the graphics duration; since Hold the last CDG frame instead of ending the video at the graphics end (2.3.4) #69 the output runs to the usually slightly longer MP3 length, which is close enough to characterize song length.Converter.tsxpassessong_seconds: cdgSongSeconds(pair.cdg.byteLength)onconversion_succeeded, and the tracker type now requires it.Applies from this build forward; historical events remain without the property.
Verification
vitest82/82,tsc -bclean, eslint clean (3 pre-existing warnings), prettier clean, Playwright e2e 5/5