android / android/camera-samples

No way to mimic AVAssetWriterInput in Android

Offen
#359 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Kotlin
Sterne
5.5k
Forks
2.4k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Using CameraX 1.1.0-alpha02, there is not way to minic what iOS does with respect to taking the video buffer, modifying it with CISourceOverCompositing and then use the result to feed AVAssetWriterInput (save the video output). That allows them to easily do things like add overlays to video. We have no way to do that to this day on Android.

Given that we can pass frames to ImageAnalysis, the same mechanism should be able to be done where the final output feed is generated in Android's equivalent of CISourceOverCompositing (sample code available for that many places). It looks like two of the three components already exist then. Android can pull the frame and modify it. We just need a way to use the modified frame as the replacement for the original one in the stream.

So, outputFileOptions needs to be extended to take a frame/bitmap produced by a function (overlay function...the equivalent of CISourceOverCompositing), and then use that in videoCapture.startRecording

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Überprüfe die CameraX 1.1.0-alpha02 VideoCapture API, insbesondere outputFileOptions und videoCapture.startRecording, zusammen mit dem bestehenden ImageAnalysis-Mechanismus. Bestimme das erforderliche API-Design, um bearbeitete Videoframes zu akzeptieren, und validiere, dass ein mit einem Overlay verarbeiteter Stream als Videoausgabe gespeichert werden kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android
Bereich
mobile
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.