androidx / androidx/media

Feature Request: InputStream and OutputStream For Transformer

Open
#619 4 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

editing enhancement
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

[REQUIRED] Use case description

I work on an encrypted messaging app (https://github.com/signalapp/Signal-Android) and we want to use the media3 Transformer library for transcoding media before it is sent. A hard requirement of ours is "no unencrypted data leaves memory", which we have implemented by leveraging streams to do our video processing in memory without writing anything to disk. We would like to adapt our existing in-memory pipeline to use media3 rather than interfacing with MediaCodec directly.

Proposed solution

API support for the use of Transformer with arbitrary InputStreams/OutputStreams, including streams such as (or conceptually similar to) CipherInputStream and CipherOutputStream.

Alternatives considered

Custom output: Forking InAppMuxer to be able to be constructed with a specific FileOutputStream (and ignore the path) and use its factory as a builder param for Transformer.
Custom input: Duplicating DefaultDecoderFactory (which is package private) in order to be able to in the public constructor for DefaultAssetLoaderFactory to be used with a custom MediaSource.Factory but a default Codec.DecoderFactory.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.