Repository navigation
Conversation
teidesu
requested changes
Nov 2, 2026
teidesu
left a comment
Owner
There was a problem hiding this comment.
few nits from claude:
- The probe and the converter can disagree on the decoder. findDecoderForFormat checks profile and size, but MediaCodecVideoConvertor.getDecoderByFormat uses createDecoderByType(mime), which takes the first decoder for the mime. Example: a hw AV1 decoder without 10-bit support is listed first, and the probe says yes only because of the sw c2.android.av1. The UI then allows editing and conversion fails. The fix is to pass the chosen codec name through, or at least accept that limit knowingly.
- setDataSource(fd, fileOffset, Long.MAX_VALUE): offset + length overflows in the native FileSource. It should use File(path).length() - fileOffset.
| Trace.beginSection("AnimatedFileNative#getVideoInfo"); | ||
| try { | ||
| nGetVideoInfo(src, params, fileOffset); | ||
| + desu.inugram.helpers.media.MediaSendHelper.updateVideoConversionSupport(src, params, fileOffset); |
Owner
There was a problem hiding this comment.
claude says that this line makes av1/vvc videos transcoded to h264 even with no edits. is that correct/intended?
Contributor
Author
There was a problem hiding this comment.
yeah, you're right about transcoding. “Original” now preserves unedited videos regardless of codec. also separated the cache key so it won't reuse an older transcoded copy
converter now uses the same format-aware decoder lookup as the probe, so it can pick a compatible software decoder if needed
AOSP clamps the length before adding the offset, so the overflow shouldn't happen there, but changed it to the actual remaining file length anyway
upload cached documents again so Telegram receives their video attributes, and regenerate thumbnails for the new upload
check Android decoder capabilities for codecs missing from the native allowlist, including AV1. keep crop controls disabled when video editing is unavailable and restore them when switching to photos
teidesu
pushed a commit
that referenced
this pull request
Nov 2, 2026
…g mp4 documents as videos (#83)
Owner
|
merged in 2af7538, thanks! |
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.
this PR enables editing of videos in formats such as AV1, AVP, H.266, etc., provided the device supports them