Update Rtmp Library - #6
Open
daroltidan wants to merge 1367 commits into
Open
Conversation
pedroSG94
force-pushed
the
master
branch
2 times, most recently
from
November 7, 2025 08:32
d54eeb0 to
1af26b2
Compare
…match fix: addresses slow frame emission due to time unit mismatch
…ns.kotlin.android-2.3.21 Bump org.jetbrains.kotlin.android from 2.3.20 to 2.3.21
Bump ktor from 3.4.2 to 3.4.3
Bumps `agp` from 9.1.1 to 9.2.1. Updates `com.android.application` from 9.1.1 to 9.2.1 Updates `com.android.library` from 9.1.1 to 9.2.1 --- updated-dependencies: - dependency-name: com.android.application dependency-version: 9.2.1 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.android.library dependency-version: 9.2.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps `coroutines` from 1.10.2 to 1.11.0. Updates `org.jetbrains.kotlinx:kotlinx-coroutines-android` from 1.10.2 to 1.11.0 - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](Kotlin/kotlinx.coroutines@1.10.2...1.11.0) Updates `org.jetbrains.kotlinx:kotlinx-coroutines-test` from 1.10.2 to 1.11.0 - [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases) - [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md) - [Commits](Kotlin/kotlinx.coroutines@1.10.2...1.11.0) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-test dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…1.11.0 Bump coroutines from 1.10.2 to 1.11.0
Bumps [androidx.media3:media3-inspector](https://github.com/androidx/media) from 1.10.0 to 1.10.1. - [Release notes](https://github.com/androidx/media/releases) - [Changelog](https://github.com/androidx/media/blob/release/RELEASENOTES.md) - [Commits](androidx/media@1.10.0...1.10.1) --- updated-dependencies: - dependency-name: androidx.media3:media3-inspector dependency-version: 1.10.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Java socket default
Fix get nals
Bumps `ktor` from 3.5.1 to 3.5.2. Updates `io.ktor:ktor-network` from 3.5.1 to 3.5.2 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md) - [Commits](https://github.com/ktorio/ktor/commits) Updates `io.ktor:ktor-network-tls` from 3.5.1 to 3.5.2 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md) - [Commits](https://github.com/ktorio/ktor/commits) --- updated-dependencies: - dependency-name: io.ktor:ktor-network dependency-version: 3.5.2 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.ktor:ktor-network-tls dependency-version: 3.5.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
fix reloadcodec and perfer color 19 on low api if possible
Stream stats
Camera2 features
Bump ktor from 3.5.1 to 3.5.2
fix camerax stop and file sources loop
Gltimestamp
Bumps [androidx.media3:media3-inspector](https://github.com/androidx/media) from 1.10.1 to 1.11.0. - [Release notes](https://github.com/androidx/media/releases) - [Changelog](https://github.com/androidx/media/blob/release/RELEASENOTES.md) - [Commits](androidx/media@1.10.1...1.11.0) --- updated-dependencies: - dependency-name: androidx.media3:media3-inspector dependency-version: 1.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
In SURFACE mode VideoEncoder.checkBuffer rebases every frame on firstTimestamp — the PTS of the first frame this encoder produced. AudioEncoder.calculatePts rebases on presentTimeUs, the origin StreamBase hands to every encoder in startSources(). The two timelines therefore start at different moments: audio at the instant the stream started, video at the instant its first frame came out of the encoder. Whatever sits between them — opening the camera, warming up GL — becomes a constant offset, with the picture running ahead of the sound. Measured on a Samsung SM-A065F (Android 15, camera source, built-in mic, RTMP): video ran 470 ms ahead of audio, 18 clap pairs, spread 427-517 ms. Lips move, speech follows. Both TimestampMode branches perform the same rebase, so switching CLOCK/BUFFER makes no difference — verified by measuring both. Rebasing on presentTimeUs is safe here: GlStreamInterface stamps frames through GlTimestamp, which anchors the first frame to TimeUtils and clamps later frames to within one frame of that clock, and StreamBase reads the same TimeUtils to start the encoders. Both sides are on CLOCK_BOOTTIME microseconds, so the subtraction is meaningful and matches what the audio path already does. Non-surface paths are untouched, and the old behaviour still applies when the encoder was started without a shared origin. With the same test the 490 ms cluster disappears; what remains is inside the resolution of a clap measurement.
…origin Fix/surface pts shares audio origin
VideoEncoder stores width/height exactly as prepareVideoEncoder received them and keeps rotation separately; at 90 or 270 it configures the codec as height x width. A portrait broadcast prepared with (1920, 1080, rotation = 90) therefore produces 1080x1920 frames, while getVideoResolution() reported 1920x1080. That pair goes straight into onMetaData: GenericStream.kt:111 val resolution = super.getVideoResolution() RtmpStream.kt:73 val resolution = super.getVideoResolution() MultiStream.kt:188 val resolution = super.getVideoResolution() so every portrait broadcast through the newer API told the server it was landscape. Players trust onMetaData: YouTube opens a 16:9 window and pillarboxes the vertical picture, which is what our users reported. MultiCamera1/2 already swapped at their call sites (MultiCamera2.kt:197-201), so only the newer classes were affected. Fixed in getVideoResolution() rather than at the three call sites, so anything else reading it gets the shape that is actually on the wire. Verified on a Samsung SM-A065F: prepared 1920x1080 with rotation 90, the encoder emits 1080x1920 (confirmed from the SPS of the captured stream), and the metadata now matches instead of claiming landscape.
Announce the rotated resolution so portrait streams are not pillarboxed
…dia3-media3-inspector-1.11.0 Bump androidx.media3:media3-inspector from 1.10.1 to 1.11.0
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.
No description provided.