media icon indicating copy to clipboard operation
media copied to clipboard

Is a custom Media3 Extractor backed by an FFmpeg muxer possible or already implemented?

Open muaaz-fa opened this issue 6 months ago • 2 comments

Hi,

I’d like to know if it’s possible to implement a custom Media3 Extractor that parses local audio and video files using an FFmpeg-based muxer.

Has this been tried before, or is there any existing implementation or example of this in Media3?

muaaz-fa avatar Jun 20 '25 19:06 muaaz-fa

Do you mean wrapping FFmpeg extractors in a custom Media3 extractor, or wrapping FFmpeg muxers in a custom Media3 muxer? (Not wrapping a muxer in an extractor - or am I missing the key point here?)

In either case, I'm not aware of anything that makes this infeasible to do, but we don't have an example implementation in Media3 and we don't plan to do this. By the way, if there are any gaps in the implementations in Media3 that are motivating this it could be interesting to hear about those. Thanks!

andrewlewis avatar Jun 21 '25 18:06 andrewlewis

Thanks for the quick response! Sorry for the confusion — I mean using FFmpeg’s demuxer to read containers and then exposing the streams to Media3 via a custom Extractor. Essentially I want to leverage FFmpeg’s broad container/codec support instead of reimplementing those formats as new Media3 extractors. Do you have any guidance or examples for bridging native demuxers into Media3 extractors efficiently?

muaaz-fa avatar Jun 22 '25 08:06 muaaz-fa

Thanks for the clarification. I think what you're describing is possible for a custom implementation, but it isn't directly supported in Media3.

andrewlewis avatar Jun 23 '25 11:06 andrewlewis